Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
CB menu system confusion
Pecan:
--- Quote from: killerbot on January 19, 2007, 11:05:05 pm ---it was a 1 liner, it all starts here :
http://forums.codeblocks.org/index.php?topic=4809.msg37667#msg37667
wx guys did it this [http://forums.codeblocks.org/index.php?topic=4809.msg38778#msg38778] way, should try that one. Will see if I can build it tomorrow on windows the patched wx.
--- End quote ---
--- Quote from: stahta01 on December 29, 2006, 09:45:39 pm ---
--- Quote from: killerbot on December 29, 2006, 09:26:20 pm ---you are talking about the line in "wxMenu::DoInsertOrAppend", correct ?
this was how it was in wx262
--- Code: --- // is the item owner-drawn just because of the bitmap?
if ( pItem->GetBitmap().Ok() &&
!pItem->GetTextColour().Ok() &&
!pItem->GetBackgroundColour().Ok() &&
!pItem->GetFont().Ok() )
{
// try to use InsertMenuItem() as it's guaranteed to look correctly
// while our owner-drawning code is not
--- End code ---
and in wx 263 they changed it into :
--- Code: --- // is the item owner-drawn just because of the bitmap?
if ( pItem->GetBitmap().Ok() &&
!pItem->GetTextColour().Ok() &&
!pItem->GetBackgroundColour().Ok() &&
!pItem->GetFont().Ok() &&
!pItem->GetBitmap(true).Ok() )
{
// try to use InsertMenuItem() as it's guaranteed to look correctly
// while our owner-drawning code is not
--- End code ---
did you bring this to the attention of the wx guys.
I am gonna rebuild our wx_cb_dll, this is a nice fix (hopefully with no side effects).
--- End quote ---
Correct that were I fixed it, and it worked with CVS 2.6_BRANCH with that change. I just commented out to test it like below.
if ( pItem->GetBitmap().Ok() &&
!pItem->GetTextColour().Ok() &&
!pItem->GetBackgroundColour().Ok() &&
!pItem->GetFont().Ok() /* &&
!pItem->GetBitmap(true).Ok() */ )
--- End quote ---
I made this patch on my msw system.
It did *not* resolve the "skipping mnemonic" problem.
It didn't even resolve the mis-aligned menu items.
It also did not change the size of ...\wxWidgets263\lib\gcc_dll\wxmsw26u_gcc_custom.dll
Maybe I'm doing it wrong. I made it to the msw/menu.cpp.
--- Code: --- // check if we have something more than a simple text item
#if wxUSE_OWNER_DRAWN
if ( pItem->IsOwnerDrawn() )
{
// is the item owner-drawn just because of the bitmap?
if ( pItem->GetBitmap().Ok() &&
!pItem->GetTextColour().Ok() &&
!pItem->GetBackgroundColour().Ok() &&
!pItem->GetFont().Ok() /* &&
!pItem->GetBitmap(true).Ok() */ )
{
// try to use InsertMenuItem() as it's guaranteed to look correctly
// while our owner-drawning code is not
--- End code ---
The file on the left is the new lib. The ones on the right are the zipped up files prior to the fix. There's no change in the lib size(second from bottom). So I'd guess the patch is in code that is not seen by the compiler. Note the #if wxUSE_OWNER_DRAWN.
c:\Usr\Proj\wxWidgets263\lib\gcc_dll\mswu\wx\setup.h
looks like wxUSE_OWNER_DRAWN should be on. So why didn't the patch work?
--- Code: ---// Set this to 1 to enable support for the owner-drawn menu and listboxes. This
// is required by wxUSE_CHECKLISTBOX.
//
// Default is 1.
//
// Recommended setting: 1, set to 0 for a small library size reduction
#define wxUSE_OWNER_DRAWN 1
--- End code ---
killerbot:
see here : http://forums.codeblocks.org/index.php?topic=4809.msg38937#msg38937 on application of patches to wx [as it seems now, the dll I obtained from it might replace our hacked version of the wx dll, aka HackUpdated ;-)]
Pecan:
--- Quote from: killerbot on January 20, 2007, 03:14:07 pm ---see here : http://forums.codeblocks.org/index.php?topic=4809.msg38937#msg38937 on application of patches to wx [as it seems now, the dll I obtained from it might replace our hacked version of the wx dll, aka HackUpdated ;-)]
--- End quote ---
But still, this is providing a patched lib that I can't reproduce.
How are you doing it. Can you please provide a patch file for the rest of us to test our code.
Right now, I'm in a position where I cannot fix/debug/verify code. I cannot seem to reproduce the lib you're distributing in the nightlies.
I applied the patch you say you put into the nightly. It neither corrected the alignment problem, nor fixed the "skipping mnemonic" on my local wx2.6.3 XP system.
killerbot:
I changed the 2 files mentioned of wx, build the wx dll, and voila, fixed ;-)
uploading the dll to berlios now
it will be called : wxmsw26u_gcc_cb_wx2.6.3p2AndCbPatch(version2).7z
wxmsw26u_gcc_cb_wx2.6.3p2AndCbPatch_version2.7z
(could take a while, stupid berlios, and the fuck is, it so often fails leaving a partial file, and by ftp you can't delete it, so you publish it, then delete and reupload, but all is so slow, so unstable and unreliable, .... grrrrrrr)
[EDIT] I didn't test mnemonics !!
Can you give me a testcase ?
Pecan:
--- Quote from: killerbot on January 20, 2007, 03:52:20 pm ---
[EDIT] I didn't test mnemonics !!
Can you give me a testcase ?
--- End quote ---
It doesnt matter. But...
1) Does Alt-F-O open the file selector or does it just do nothing.
2) Does Alt-F-C close an open file or does it just skip among the menuitmes beginning with the letter C
It's your patch that matters. If you would please provide a diff or patch file against wxWidgets for the patches you're applying.
The point is, the patches you're applying for the nightly build do not seem to work for my wxWidgets 2.6.3. I'd like to find out why.
Without the patches, I cannot fix any nightly complaints, cannot trace into a "nightly" wxWidgets.
I applied the forum link patches you pointed out, but they did not even fix the alignment problem as advertised. There has to be a reason. But without the diff or patch file to exactly reproduce your fixes, there no way to know why they dont work for everyone.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version