Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Refixed wxWidget Patch: menu items with icon not correctly aligned (since wx263)
stahta01:
I added code to the method RebuildMenuItem and it helps under 2.8.0, I am compiling it for 2.6.3.4 now and see if it works. Tim S
It works for me under 2.6.3 with my menu items alignment patch applied to it.
[ Patch #1777 ] keybinder RebuildMenuitem patch
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1777&group_id=5358
Tim S
Pecan:
--- Quote from: stahta01 on December 30, 2006, 08:05:14 am ---Here's a snippet of the keybinder logging under debug and kbLOGGING, does it give any information or is it unrelated to anything. Tim S
--- Code: ---01:59:08: wxMenuCmd::Update - Removing shortcuts [Continue Ctrl-F7] for [Continue]
01:59:08: wxMenuCmd::Update - Setting shortcuts for [Continue Ctrl-F7]
01:59:08: wxMenuCmd::Update - Removing shortcuts [Toggle breakpoint F5] for [Toggle breakpoint]
01:59:08: wxMenuCmd::Update - Setting shortcuts for [Toggle breakpoint F5]
01:59:08: CreateNew()UnMatched id:1413 name:Edit startup script
01:59:08: Debug: keybinder.cpp(602): assert "ret" failed.
01:59:18: wxMenuCmd::Update - Removing shortcuts [Goto file... Alt-G] for [Goto file...]
01:59:18: wxMenuCmd::Update - Setting shortcuts for [Goto file... Alt-G]
01:59:18: wxMenuCmd::Update - Removing shortcuts [Activate next project Alt-F6] for [Activate next project]
01:59:18: wxMenuCmd::Update - Setting shortcuts for [Activate next project Alt-F6]
01:59:18: wxMenuCmd::Update - Removing shortcuts [Activate prior project Alt-F5] for [Activate prior project]
--- End code ---
--- End quote ---
These messages are correct. keybinder can have multiple profiles, so if the user switches to a secondary profile, the shortcuts must be removed and replaced with those of the secondary profile; else the old shortcuts will "leak" into the new chosen profile.
So the idea here is that when any profile is applied, remove the current shortcuts and replace them with those from the selected profile (previously recorded on disk in cbKeyBinder10.ini) . This applies to empty menuItems also. So if the user deleted a shortcut and saved it to disk, it gets replace with a "blank" shortcut when the profile is applied.
This of course, clobbers the icon in 2.6.2, but not 2.6.3 .
Re: The original problem with missing icons. Noone could change the text/label/shortcut of a menuitem without clobbering the icon. So the whole damn menuitem had to be rebuilt.
This also mean that anyone storing a pointer to the rebuilt menuitem is in deep doo. Because their pointer is now invalid.
You probably saw that in the code. I don't mean to insult your intelligence.
Pecan:
--- Quote from: stahta01 on December 30, 2006, 11:40:01 am ---I added code to the method RebuildMenuItem and it helps under 2.8.0, I am compiling it for 2.6.3.4 now and see if it works. Tim S
It works for me under 2.6.3 with my menu items alignment patch applied to it.
[ Patch #1777 ] keybinder RebuildMenuitem patch
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1777&group_id=5358
Tim S
--- End quote ---
Sorry, I don't get it. That patch is to menu.cpp . I thought you said it was a keybinder RebuildMenuItem patch.
stahta01:
Look at the Raw Patch View
https://developer.berlios.de/patch/download.php?id=1777
Tim S
killerbot:
damn berlios, can't get to the raw patch :-(
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version