Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14375/src/gui
Modified Files:
wxMenuDefs.cpp
Log Message:
corrected bug with creating the separators (only visible with recent wxWindows)
Index: wxMenuDefs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMenuDefs.cpp,v
retrieving revision 1.214
retrieving revision 1.215
diff -b -u -2 -r1.214 -r1.215
--- wxMenuDefs.cpp 18 Dec 2003 20:39:05 -0000 1.214
+++ wxMenuDefs.cpp 16 Mar 2004 21:38:30 -0000 1.215
@@ -592,12 +592,15 @@
void AppendToMenu(wxMenu *menu, int& n)
{
- if ( n == WXMENU_SEPARATOR ) {
- menu->AppendSeparator();
- }
- else {
int id = GetMenuItem(n).idMenu;
- if ( id == WXMENU_SUBMENU ) {
- // append all entries until the next one with id == WXMENU_SUBMENU to
- // a submenu
+ switch ( id )
+ {
+ case WXMENU_SEPARATOR:
+ menu->AppendSeparator();
+ break;
+
+ case WXMENU_SUBMENU:
+ {
+ // append all entries until the next one with id == WXMENU_SUBMENU
+ // to a submenu
wxMenu *submenu = new wxMenu();
@@ -619,5 +622,7 @@
wxGetTranslation(mii.helpstring));
}
- else {
+ break;
+
+ default:
const MenuItemInfo& mii = GetMenuItem(n);
@@ -627,5 +632,4 @@
mii.kind);
}
- }
}
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates