Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: killerbot on December 30, 2005, 10:56:42 am

Title: Menu Icons are gone
Post by: killerbot on December 30, 2005, 10:56:42 am
I have noticed that on one machine I seem to have lost the icons in the build menu, on my laptop they are still there.
Anyone else suffering from this, or even better, who has a solution.
Probably will have to delete something in default.conf (no, don't want to delete the conf all together) ??

Thanks,
Lieven
Title: Re: Menu Icons are gone
Post by: thomas on December 30, 2005, 11:00:06 am
Hmmm... I doubt that doing anything with the config will fix the problem. The icons are (if I remember correctly) defined in XRC and not touched afterwards.

But before you delete anything, try renaming the config file. That way, you see if it is config-related, and you can go back in one second :)
Title: Re: Menu Icons are gone
Post by: killerbot on December 30, 2005, 11:47:03 am
Tried out your suggestion, nope they didn't come back.
The reason I thought it might have something to do with the conf file is, sometimes the debugger toolbar is gone, and youcan get that one back by removing <LAYOUT> crc ... from the conf file.

Just noticed something else, since CB wanted to create a new default conf, it also asked if it may b the default app for c++ files, etc ...,
well I clicke on "yes" --> failed to create the keys in the registry.
Why : I formatted my c-drive an reinstalled XP a few days ago, there's 1 admin account and all other accounts I have made restricted  (so the account I work in is restricted), so it was not allowed to change the registry.
It is important to keep that in mind (there are cooperations where the users all are restricted !!) !!

Just wondered, where does CB wants to write that info, in the (current) user part of the registry (seems like a setting per user, since other users migh want to stick to dev-cpp ;-)  ).
In the per-user part of the registry , the user is allowed to write !! -> seems like CB does not write it there ?

I remember in some other post that several people were having problems also with CB and the regisrty (double cliking a cbp fil, gave an error message, though it did load it, etc ...), so maybe someone should take a closer look on the registry usage.

kind regards,
Lieven
Title: Re: Menu Icons are gone
Post by: thomas on December 30, 2005, 12:08:54 pm
Code::Blocks stores its stuff in HKEY_CLASSES_ROOT. Unluckily, I don't know enough about this Windows crap to tell whether you can write file associations to HKEY_CURRENT_USER somehow. From a logical point of view that should be possible, but when has anything in Windows ever been logical, consistent, or understandable...

I would not know where to put the file type in the user section. In the root section, it is just a key with the name of the filetype's extension added to the root node, but there seems to be no place in the user section (or it is well hidden?).
Title: Re: Menu Icons are gone
Post by: takeshimiya on December 30, 2005, 12:56:12 pm
In Microsoft Windows NT 4.0, all entries specific to file type associations are stored in the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes (HKEY_CLASSES_ROOT is an alias of location)

In Windows 2000 and Windows Server 2003, a new location is added for storage of user-specific file type associations in the following registry key:
HKEY_CURRENT_USER\SOFTWARE\Classes
Title: Re: Menu Icons are gone
Post by: thomas on December 30, 2005, 01:01:27 pm
So that means we would have to use different locations for different Windows versions? Great...
What about Win98 -- same as NT4, I assume?
Title: Re: Menu Icons are gone
Post by: takeshimiya on December 30, 2005, 01:09:15 pm
I suppose. It's almost the same case to where default.conf is saved (It differs from XP to 98, or 2000, even it's different from 98 to 98SE......).

Anyways, very few programs store associations in HKCU... Even in most MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/fileassociations/fa_verbs.asp) articles seems to not talk about it.
I found about HKEY_CURRENT_USER\SOFTWARE\Classes in an article at MS support (http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257592), not MSDN.

Thanks, Microsoft. :roll:
Title: Re: Menu Icons are gone
Post by: killerbot on December 30, 2005, 02:40:03 pm
so it should become "HKEY_CURRENT_USER" and check on the windows versions, for the older ones, at the top level.
Win9x did not real have user concepts.
Nice software (as CB) should not hijack the entire system, user x wants cb for C++ files, where user Y wants dev-cpp, and user z wants MS (well give that person linux for x-mass).
And as I found out, it is needed for restricted user accounts (safety safety).


How do these things happen on linux ??

Lieven
Title: Re: Menu Icons are gone
Post by: killerbot on December 30, 2005, 02:52:05 pm
I will try to create a patch for it, I hope I do it well, so all info , just bring it on.
Gonna start by searching how we get to know the windows version in wx ...
[edit] : wxGetOsVersion()
Lieven
Title: Re: Menu Icons are gone
Post by: killerbot on December 30, 2005, 03:11:58 pm
Maybe we can simplify the problem, just check if "HKEY_CURRENT_USER\SOFTWARE\Classes" exists, if it does -> write it their, if not use "HKEY_CLASSES_ROOT".
Anyone with win 95/98/Me/NT ? Can you check if the "HKEY_CURRENT_USER\SOFTWARE\Classes" exist ?
Title: Re: Menu Icons are gone
Post by: takeshimiya on December 30, 2005, 03:18:34 pm
Win9x did not real have user concepts.

Wrong, Windows 95 and Windows 98 doesn't had user concepts. Windows 98 SE, Windows ME does have user concepts.

Ie. %APPDATA% is:

Windows 95/98/98SE/Me
C:\Windows\Application Data\

Windows 98SE/Me with user management enabled
C:\Windows\Profiles\<Windows user name>\Application Data\

Windows NT4
C:\Winnt\Profiles\<Windows user name>\Application Data\

Windows 2000/XP
C:\Documents and Settings\<Windows user name>\Application Data\

I don't know what's the situation in the registry, but for sure it's somewhat different to complicate the things...
Title: Re: Menu Icons are gone
Post by: killerbot on December 30, 2005, 04:03:23 pm
I created a patch for it, works on my XP machine.
https://sourceforge.net/tracker/index.php?func=detail&aid=1393650&group_id=126998&atid=707418

Note : the old problem of clicking on a project, workspace given the error (though opening correctly) is not gone yet, will try to take a look at that also someday.

Lieven
Title: Re: Menu Icons are gone
Post by: killerbot on December 30, 2005, 04:15:02 pm
A little bit of reading at the link :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/fileassociations/fa_verbs.asp

3 ways for those verbs : command (cb does that), DDE, cb does that also, and another one.
Why do we need that DDE. Because if the DDE failt, it falls back to the command one (unless you specify some other fallback). I get the impression if you double click for example on a cbp file, the DDE fails (the message box we see) and then switches back to the command version, which eventually opens the cbp file ok.

Who added that DDE : why ? Can we do without it ?

EDIT : I did the following test : for the cbp file renamed the ddeexec key, double click on a cbp file -> no error message at all. --> Die DDE, die, die  ;-)


Cheers,
Lieven

PS : I am not that familiar with all these registry things and verbs yet, so if I overlook something, please point it out to me, so at least I learn something.

Title: Re: Menu Icons are gone
Post by: Michael on December 30, 2005, 04:25:10 pm
Hello,

I have had some problems with icons too in my notebook, but this time with the debug icons in the toolbar (the ones for fast access). If I pressed with the right button of the mouse I could just add/remove the icons for the main and the compiler, but not for the debugger (there was not even the option :?). Anyway, after I tried in another computer C::B worked fine. I assume it was some local problem. I have had such problem with RC2 and several SVN binary snapshots.

Michael
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 03:13:41 am
back to topic "Menu Icons are gone"

just noticed, that the actual SVN Windows build lacks the most of the menu icons compared to the linux version

see the screenshots


[attachment deleted by admin]
Title: Re: Menu Icons are gone
Post by: duncanka on January 03, 2006, 04:45:51 am
Maybe we can simplify the problem, just check if "HKEY_CURRENT_USER\SOFTWARE\Classes" exists, if it does -> write it their, if not use "HKEY_CLASSES_ROOT".
Anyone with win 95/98/Me/NT ? Can you check if the "HKEY_CURRENT_USER\SOFTWARE\Classes" exist ?
I have Windows 98SE, and the registry does indeed appear to have that path ("HKEY_CURRENT_USER\SOFTWARE\Classes"), but it doesn't seem to contain any of the usual file-extension definition entries.  I have no idea if it looks there for those.
Title: Re: Menu Icons are gone
Post by: thomas on January 03, 2006, 08:42:00 am
back to topic "Menu Icons are gone"
just noticed, that the actual SVN Windows build lacks the most of the menu icons compared to the linux version
see the screenshots
Hmmm... my Windows build looks just like your Linux screenshot..? Checked in all three releases on my hd. Sure you don't miss a few files?

EDIT: btw, what are those strange artefacts in the menu bar? I don't have these either...
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 10:26:48 am
... my Windows build looks just like your Linux screenshot..? Checked in all three releases on my hd. Sure you don't miss a few files?
svn says i'm synchron with the repository - no files missing or modified ... 
and i did a full rebuild of the complete CB workspace ...
but if i interpret the original poster of this thread right (before all those win registry crap came into here),
i'm not the only ony one who's concerned .
[edit] tried everything with edited and new .conf file etc...
and the .png files are all in their proper files where they should be...
i'm lost  :? :? :? :?

Quote
EDIT: btw, what are those strange artefacts in the menu bar? I don't have these either...
those are coming from an display update/redraw problem whenever another application was in front of CB
and then CB gets the focus again. for example a console-application, which is running from the ide and the
console window popped up somewhere in front of the toolbar-region of CB, when CB gets the focus again,
the toolbar is redrawn but a few pixels below the toolbar-icons are not restored. this happened since the wxaui
was introduced.
[edit] just found, that it only appears with small 16x16 toolbar icons.

greetings, Tiwag
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 11:36:12 am
it must have to do something with my local windows installation !

i've installed the nightly-build version CB SVN 1648 and the menus are looking exactly same as with my own built version. the most of the menu icons are missing !

any hints and suggestions where i can start investigating ?

@killerbot - you've started this thread - are you concerned of the same problem or is yours different ?
Title: Re: Menu Icons are gone
Post by: killerbot on January 03, 2006, 11:50:13 am
I am still suffering from this problem.
These are my experiences :
 - build 1648 on linux (on my laptop) : OK
 - build 1648 on windows XP (my PC) : NOT OK
 - build 1648 on windows XP (my laptop) : NOT OK.

I should note that on my laptop (windows) untill 2 days ago everything was still ok, till that day it was running the last NON-UNICODE version. So maybe it has something to do with the unicode switch, but then again, maybe not.


Lieven
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 11:59:23 am
I am still suffering from this problem.
... maybe it has something to do with the unicode switch, but then again, maybe not.

@thomas & killerbot
did you test the nightly build, which is indeed an unicode build, on your system and check if the menu icons are ok ??
in order to verify if the same build behaves different on different windows installations .

thomas' unicode build shows all the menu icons if i interpret his posting correctly , do i ?
Title: Re: Menu Icons are gone
Post by: grv575 on January 03, 2006, 12:38:06 pm
tiwag: my windows binary looks the same as your windows screenshot.  - this is the CB_02jan2006_rev1648_win32 build.  A custom compile of a previous build - build 1610 windows unicode does not have this problem - it has all the icons the linux screenshot shows.  Tested both with the wx dll linked to on the codeblocks nightly release page and a wx dll build from source so that can be eliminated from being the problem.  Maybe the resources weren't packed correctly or ??? Does update.bat still need to be run after compiling on windows?
Title: Re: Menu Icons are gone
Post by: killerbot on January 03, 2006, 12:39:45 pm
yes run update.bat if you compile yourself, unless you run it from the devel dir

[EDIT] I stand corrected, stupid me. See below : next post.
Title: Re: Menu Icons are gone
Post by: mandrav on January 03, 2006, 12:59:27 pm
yes run update.bat if you compile yourself, unless you run it from the devel dir

You should run update.bat any time resources change, even if you 're using the devel dir (it might fail with programs but resources will be updated).
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 01:01:09 pm
...  Maybe the resources weren't packed correctly ...

i did run update.bat of course, and i checked also the "src\output\share\CodeBlocks\resources.zip"
- as i can determine all is looking ok, all xrc's and png's are in there as they should.
i also did run codeblocks under filemonitor observation and have nothing suspicious detected.

i'm staill waiting for a report, that the actual nightly build version shows all menu icons correctly,
if not i assume a general unicode build issue ...
Title: Re: Menu Icons are gone
Post by: killerbot on January 03, 2006, 01:03:53 pm
let's hope 'THE almighty" shines some light on this soon.

But .......  be patient ....    8)
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 01:07:48 pm
...  be patient ...

i'm the patience in person ... didn't you know of ?     :lol:
Title: Re: Menu Icons are gone
Post by: thomas on January 03, 2006, 02:39:40 pm
Just rebuilt to be 100% I am not talking of an old or non-Unicode version or anything, but it really looks fine:
(http://img341.imageshack.us/img341/9622/00016fy.png)

Did you change any of Windows' user interface settings (like menu item font/size)? You do not happen to carry around a bad wxWidgets dll in your path somewhere (one that cannot read the png images)?
Title: Re: Menu Icons are gone
Post by: killerbot on January 03, 2006, 02:45:09 pm
I can see some icons, but for example in the build menu : all are gone.
In the file menu, I do have print, and run script icon, others gone.

Nopre ,no other dll, renamed the one I think I am using and CB complains that there's no wx dll, so it should be that one.
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 02:50:43 pm
@thomas - did you notice in my posts, that i tested ALSO with the nightly build version in order to invalidate
all errors which could be happened in my build-flow ??!!
so the answer to all your questions is NO !

also i do not use any quirky settings regarding the font size or anything else in my windoze - just let it be all at windows defaults...

i'm lost ... no more ideas where to look for this bug  :x
Title: Re: Menu Icons are gone
Post by: killerbot on January 03, 2006, 02:55:10 pm
looking at tiwag's screenshot : he is suffering in the file menu from the same icon disappearing and the same 2 remaining. And he had it with his build and my nightly build.
What might be so different between the other icons and those 2 ??

Lieven
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 02:59:59 pm
@thomas
can you please download and run the nightly build in order to verify if this bug is related to the build of CB or related to Windows settings ?
thx alot
Title: Re: Menu Icons are gone
Post by: takeshimiya on January 03, 2006, 03:09:27 pm
I'm having problems with dissapeared icons and some context-menu entries also.
Title: Re: Menu Icons are gone
Post by: thomas on January 03, 2006, 03:30:04 pm
@thomas - did you notice in my posts, that i tested ALSO with the nightly build version in order to invalidate all errors which could be happened in my build-flow ??!!
No reason get get anygry. Certainly saw that. But still, a forgotten wxWidgets dll lying around in your path can as well screw up a nightly build, hence this suggestion.

I don't believe it is build related, because all I did is update to HEAD, double-click the project file, and hit the blue gear.
There is nothing magical in what I am doing, nor is there anything special with my system - it is a plain normal Windows XP installation, pretty much like it comes out of the box, with no evil mess-up software (tweakers, optimizers, P2P software, games, etc.) installed, and most settings (except for the sys folders being on D:) are factory settings.

Maybe it is due to some Windows update which you did and I did not. Who knows.
Title: Re: Menu Icons are gone
Post by: killerbot on January 03, 2006, 03:30:38 pm
I might be on to something.
I just looked at the file : main_menu.xrc, some things I noticed :

1) many empty (looking ) lines
2) for the file menu : the 2 icons that do show up have :
    - NO accal and help tags
    - have less empty lines because of that

I tried to play around with that idea hoping to prove something, or finding some pattern : but no luck.

Or is something strange in the xrc file ??
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 03:34:14 pm
@thomas - did you notice in my posts, that i tested ALSO with the nightly build version in order to invalidate all errors which could be happened in my build-flow ??!!
No reason get get anygry. Certainly saw that. But still, a forgotten wxWidgets dll lying around in your path can as well screw up a nightly build, hence this suggestion.

I don't believe it is build related, because all I did is update to HEAD, double-click the project file, and hit the blue gear.
There is nothing magical in what I am doing, nor is there anything special with my system - it is a plain normal Windows XP installation, pretty much like it comes out of the box, with no evil mess-up software (tweakers, optimizers, P2P software, games, etc.) installed, and most settings (except for the sys folders being on D:) are factory settings.

Maybe it is due to some Windows update which you did and I did not. Who knows.

dont be angry - only wanted to point out this fact.

i insist : could you please run the nightly build with copying the wxdll from the download in the nightly build codeblocks directory and see what you get ?
this test would safe us many speculations...
Title: Re: Menu Icons are gone
Post by: thomas on January 03, 2006, 03:44:57 pm
The same procedure as every year, James.

(http://img265.imageshack.us/img265/5313/28jk.png)
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 03:49:58 pm
@thomas
thx - now we know definitely that is has to do with local windows settings !
Title: Re: Menu Icons are gone
Post by: killerbot on January 03, 2006, 03:50:04 pm
thomas, could you provide a zip file with your 'unicode' windows build together with your build of wx dll.
The we could give that one a try.

Lieven
Title: Re: Menu Icons are gone
Post by: killerbot on January 03, 2006, 03:51:05 pm
classic view <---> XP view ??

I use classic.

EDIT : Though I still don't understand that some icons do it , others don't.
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 03:56:51 pm
classic view <---> XP view ??

I use classic.

EDIT : Though I still don't understand that some icons do it , others don't.

i tested already with both , classic and windows XP style - nothing icons are gone ...

its a good idea to test thomas' files on our machines, but i fear i know already the answer...  :x
Title: Re: Menu Icons are gone
Post by: mandrav on January 03, 2006, 04:06:09 pm
Hmm, that's strange...
I 've seen this too although I couldn't say what it was. I deleted the devel dir and clicked the blue gear. This just re-created all the programs/libraries in devel/.
Then I run update.bat and everything is working correctly again...

@tiwag: try this but keep a copy of the devel/ dir first. If this fixes it for you too, compare the new devel/ with the copy you kept. We might pinpoint the reason then...
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 04:09:54 pm
Hmm, that's strange...
I 've seen this too although I couldn't say what it was. I deleted the devel dir and clicked the blue gear. This just re-created all the programs/libraries in devel/.
Then I run update.bat and everything is working correctly again...

@tiwag: try this but keep a copy of the devel/ dir first. If this fixes it for you too, compare the new devel/ with the copy you kept. We might pinpoint the reason then...

i did it already - svn checkout in a fresh directory and built from there : result --> icons are gone  :(

just now i copied all the files to a fresh VMware XP installation and tested there - icons are gone ?
by this procedure, i found, that the mingwm10.dll was missing in the first place,
@thomas - can you please post your mingw10.dll here

that's the only file which is (maybe) different when running the nightly build version, which runs at thomas' computer fine, and on mine not

Title: Re: Menu Icons are gone
Post by: thomas on January 03, 2006, 04:16:05 pm
thomas, could you provide a zip file with your 'unicode' windows build together with your build of wx dll.
The we could give that one a try.
Useless - as you can see, your build works fine for me, so my build is none better than yours.

I traced what files are accessed while the nightly build ran, and I found (among many others) these two which might deal with menus and icons somehow:
msimg32.dll   5.1.2600.2180  MD5 3b8a9c87027bf8d6d156be5fa6e8ebc6
uxtheme.dll   6.00.2900.2180  MD5 c18e221634400c608209a123f2a10283

If you have a different version, it could be that this one does not properly open the icons. Maybe. No idea. Could be?
Title: Re: Menu Icons are gone
Post by: killerbot on January 03, 2006, 04:23:59 pm
same version number, well 1 minor diff : 6.0.2900.2180  (1 0 after the 6.)
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 04:24:19 pm
@tiwag: try this but keep a copy of the devel/ dir first. If this fixes it for you too, compare the new devel/ with the copy you kept. We might pinpoint the reason then...

although i thought i would have done something equivalent with completely rebuilding,
i followed your advice and --  YOU ARE RIGHT !!!
with a newly generated devel directory the icons are back again !

now i'll study the differences...
some ideas where to look first ?
Title: Re: Menu Icons are gone
Post by: thomas on January 03, 2006, 04:24:36 pm
@thomas - can you please post your mingw10.dll here
Hmm... don't believe that can be a reason, but ok.

I assume I don't have to post the source to comply with the GPL, too... ;)

[attachment deleted by admin]
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 04:27:47 pm
@thomas - can you please post your mingw10.dll here
Hmm... don't believe that can be a reason, but ok.

thomas the nonbeliever is right - my mingwm10.dll is exactly the same as yours ;-)
Title: Re: Menu Icons are gone
Post by: Pecan on January 03, 2006, 04:37:43 pm
Ok folks,

This looks like a keybinder problem. Keybinder replaces
the menuitem name and label even if it doesnt have a
darn binding for the thing.

Any suggestions as to how I should preserve the icon??

thanks
pecan
Title: Re: Menu Icons are gone
Post by: thomas on January 03, 2006, 04:38:41 pm
Now that explains a lot... I have the keybinder plugin disabled... :lol:
Title: Re: Menu Icons are gone
Post by: killerbot on January 03, 2006, 04:39:32 pm
and on linux, I did not build the contribs ..
Title: Re: Menu Icons are gone
Post by: killerbot on January 03, 2006, 04:40:53 pm
turned keybinder off and --> icons back .  yesssssssssssssssss
Title: Re: Menu Icons are gone
Post by: tiwag on January 03, 2006, 04:42:48 pm
just now found independently out that cbKeybinder is guilty - ok - bug is pinpointed !
thx @all !
Title: Re: Menu Icons are gone
Post by: Pecan on January 03, 2006, 04:45:39 pm
I could get busy and look it up, but.....

How is that icon attached to the menuitem label?
Could someone point my nose in an "info" direction?

thanks
pecan
Title: Re: Menu Icons are gone
Post by: thomas on January 03, 2006, 04:52:58 pm
Umm... XRC...  if you want a reference to the bitmap, you will have to call wxMenuItem::GetBitmap, no other way.
Title: Re: Menu Icons are gone
Post by: Pecan on January 03, 2006, 05:00:58 pm
Thanks thomas

That give me a direction in which to start.

thanks
pecan
Title: Re: Menu Icons are gone
Post by: Pecan on January 08, 2006, 05:05:23 am
Commited Keybinder ver 0.4.4 1/7/2006 10:56 PM

Re: keybinder clobbers menuitems with bitmaps.

It's been a real education tracing through WX262 menu
code this past week. It appears to me that the menu bitmap code
is a paste and forget job. Very disappointing.

The XRC code "owner draws" the bitmap onto the menu, then
the menu code willy nilly turns off the "m_bOwnerDrawn" flag.
Bitmapped menuitems are not supported in WX menu code, only OwnerDrawn.

Reason: Looks like a Win98 thingie. But...

The next time the menuitem is updated, ownerdrawn attributes, bitmaps
etc are clobbered because, of course, the owner drawn code is never called.

If the modifying coder turns owner drawn back on, the width of the
menuitem is ignored, the accelerator is drawn "right aligned", thus
clobbering (drawing over) the menuitem text. Ugly!

Hack:
SetText without OwnerDrawn to guarantee the menuitem width,
then do it again with OwnerDrawn=true to redraw/reinstate the bitmap. Jeeezzh!!!

Code
	// set "un-ownerdrawn" text to preserve menu width
        m_pItem->SetText(newtext);
        //now redraw the menuitem if bitmapped
if (m_pItem->GetBitmap().GetWidth())
        {   m_pItem->SetOwnerDrawn();
            m_pItem->SetText(newtext);
        }
        //-m_pItem->GetMenu()->UpdateAccel(m_pItem); //<--does nothing       previous SetTExt() didnt

The results are not pretty. The margin between the bitmap and the text is changed,
and the accelerator is vertically misaligned with its siblings  because it's
drawn "right aligned" into the menuitem. Yuk!

So: I'm commiting the "fixed" keybinder, and will now find a way to draw
it as pretty as XRC does it. I think this is important, because we're all
gonna have to mangle a menu someday.

thanks
pecan
Title: Re: Menu Icons are gone
Post by: Der Meister on January 08, 2006, 11:39:32 am
Well, there is a little problem with the modification you showed here:
wxMenuItem::SetOwnerDrawn() does not exist - at least not in wxGTK 2.6.1 and not in the official documentation of wxWidgets 2.6.2. Maybe it is a wxMSW-specific function (although I could not find something like this in the documentation) but then it should be wrapped with preprocessor macros to be only included on windows. Therefore it should be changed like this:
Code
$ svn diff src/plugins/contrib/keybinder/menuutils.cpp 
Index: src/plugins/contrib/keybinder/menuutils.cpp
===================================================================
--- src/plugins/contrib/keybinder/menuutils.cpp (revision 1676)
+++ src/plugins/contrib/keybinder/menuutils.cpp (working copy)
@@ -109,7 +109,10 @@
         m_pItem->SetText(newtext);
         //now redraw the menuitem if bitmapped
                if (m_pItem->GetBitmap().GetWidth())
-        {   m_pItem->SetOwnerDrawn();
+        {
+#if defined( __WXMSW__ )
+               m_pItem->SetOwnerDrawn();
+#endif
             m_pItem->SetText(newtext);
         }
         //-m_pItem->GetMenu()->UpdateAccel(m_pItem); //<--does nothing previous SetTExt() didnt
I don't know if this still workes - but at least it can be compiled again.
Title: Re: Menu Icons are gone
Post by: Pecan on January 08, 2006, 03:06:16 pm
Is there anyone out there that could test the
Der Meister fix and tell me yea or ney on this.

I dont have a GTK system.

thanks
pecan

Edit:
Looking at the DerMeister fix again....
That looks good, if GTK was working Ok before,
it should work fine with the DerMeister fix.

I'll change it and re-commit

Thanks
pecan
Title: Re: Menu Icons are gone
Post by: Pecan on January 08, 2006, 04:25:44 pm
I've commited keybinder (svn1682) with hopefully
the original GTK menuitem update code.

If someone with GTK would test this and report back,
I'd really appreciate it.

thanks
pecan
Title: Re: Menu Icons are gone
Post by: Pecan on January 10, 2006, 02:57:32 pm
1/10/2006 8:55 AM

I've commited KeyBinder plugin 0.4.6 which corrects the
mis-alignment of bitmaps and accelerators. (svn 1698).

If you guys decide to attach AVI's and MP3's to the
menuitems, I dont know if I can handle it. :)}

thanks
pecan
Title: Re: Menu Icons are gone
Post by: thomas on January 10, 2006, 03:13:14 pm
If you guys decide to attach AVI's and MP3's to the menuitems, I dont know if I can handle it. :)}
Actually we're almost done with a menu implementation that is formatted using standard HTML4.0, including powerful tags like <embed> and <frameset>. You can insert your AVI movies with the <embed> tag then, and you can customise your menus by pointing a frame to your homepage where you store the menu order. :)
Title: Re: Menu Icons are gone
Post by: artoj on January 10, 2006, 03:27:16 pm
Actually we're almost done with a menu implementation that is formatted using standard HTML4.0, including powerful tags like <embed> and <frameset>. You can insert your AVI movies with the <embed> tag then, and you can customise your menus by pointing a frame to your homepage where you store the menu order. :)

What about <marquee>?  :(

Should I post a feature request for it? :)

File Edit View Search Project Build Debug Tools Plugins Settings Help
Title: Re: Menu Icons are gone
Post by: thomas on January 10, 2006, 03:32:24 pm
What about <marquee>?  :(
<marquee> is proprietary. But if you absolutely need a marquee effect, you could embed a Java applet. :)
Title: Re: Menu Icons are gone
Post by: kkez on January 10, 2006, 03:35:18 pm
Actually we're almost done with a menu implementation that is formatted using standard HTML4.0, including powerful tags like <embed> and <frameset>. You can insert your AVI movies with the <embed> tag then, and you can customise your menus by pointing a frame to your homepage where you store the menu order. :)

What about <marquee>?  :(

Should I post a feature request for it? :)

File Edit View Search Project Build Debug Tools Plugins Settings Help
Lol, why the menu should move in that way?
Title: Re: Menu Icons are gone
Post by: artoj on January 10, 2006, 03:42:28 pm
Quote
Lol, why the menu should move in that way?

in·no·va·tion

1. The act of introducing something new.
2. Something newly introduced.

As thomas requested I've started implenting java virtual machine to the menu entries. That'll make Visual Studio hide in fear. We'll have 3D-animation, glowing text and



clippy...


There, I said it.
Title: Re: Menu Icons are gone
Post by: killerbot on January 10, 2006, 04:44:06 pm

clippy...


We need an extra smiley, I've seen it at other places, a smiley that shoots itself in the head, that's one I want to post here now.


 :P :lol:
Title: Re: Menu Icons are gone
Post by: thomas on January 10, 2006, 05:03:34 pm
clippy...
Afraid we can't use Clippy either, the MS Office arts have not gone under the creative commons license yet :)
But there is Blocky. :D
Title: Re: Menu Icons are gone
Post by: artoj on January 10, 2006, 05:08:03 pm
Afraid we can't use Clippy either, the MS Office arts have not gone under the creative commons license yet :)
But there is Blocky. :D

Damn, I just finished my clippy plugin.

(http://ajonsson.kapsi.fi/pub/images/cbclippy.jpg)
Title: Re: Menu Icons are gone
Post by: Pecan on January 10, 2006, 05:10:07 pm
That is hilarious, I'm crying/laughing.

pecan
Title: Re: Menu Icons are gone
Post by: Michael on January 10, 2006, 05:19:22 pm
Damn, I just finished my clippy plugin.

Sorry, but I never supported clippy :x. Goes for the dog or the cat.... :).

Michael
Title: Re: Menu Icons are gone
Post by: killerbot on January 10, 2006, 05:25:51 pm
@artoj ,

super !!!!!!

learning c++ language with CB and clippy ...
Title: Re: Menu Icons are gone
Post by: artoj on January 10, 2006, 05:47:35 pm
Quote
Sorry, but I never supported clippy :x. Goes for the dog or the cat.... :).

Yeah, but requires something truly evil to even implement such a hideous creature as clippy.

I mean, think about it, when Microsoft developed clippy (read: summoned it from hell) CIA, NSA, FBI guys must have been happy. No need to use physical torture to get important information. Just PC with clippy installed and Microsoft Sam reading its loveable instructions with monotonic voice. Few hours of that and you'll be telling your mother's middle name just to make it stop.

(My last off-topic post to this topic :) )
Title: Re: Menu Icons are gone
Post by: rickg22 on January 10, 2006, 06:03:11 pm
But there is Blocky. :D

I thought we agreed on naming him Cody, a little construction worker (with helmet and all) who puts the blocks together.