]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed gtk 1.0.6 corruped menu entry names.
authorKarsten Ballüder <ballueder@usa.net>
Wed, 28 Apr 1999 14:06:09 +0000 (14:06 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Wed, 28 Apr 1999 14:06:09 +0000 (14:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/menu.cpp
src/gtk1/menu.cpp

index 5e6b4c8b03f8c6a193878ef3b32ee1e3583984d4..feb4c5e2f38ab46c5796067245056ef881a4e085 100644 (file)
@@ -107,12 +107,12 @@ void wxMenuBar::Append( wxMenu *menu, const wxString &title )
     {
         if (*pc == _T('&'))
        {
-           pc++; /* skip it */
 #if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
             str << _T('_');
 #endif
         }
-        str << *pc;
+        else
+           str << *pc;
     }
 
     /* this doesn't have much effect right now */
@@ -479,12 +479,12 @@ void wxMenuItem::SetName( const wxString& str )
     {
         if (*pc == _T('&'))
        {
-           pc++; /* skip it */
 #if (GTK_MINOR_VERSION > 0)
             m_text << _T('_');
 #endif
         }
-        m_text << *pc;
+        else
+           m_text << *pc;
     }
 
     if (m_menuItem)
@@ -629,8 +629,8 @@ void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool
     
 #else
 
-    GtkWidget *menuItem = checkable ? gtk_check_menu_item_new_with_label( item.mb_str() )
-                                    : gtk_menu_item_new_with_label( item.mb_str() );
+    GtkWidget *menuItem = checkable ? gtk_check_menu_item_new_with_label( mitem->GetText().mb_str() )
+                                    : gtk_menu_item_new_with_label( mitem->GetText().mb_str() );
                                    
     gtk_signal_connect( GTK_OBJECT(menuItem), "activate",
                         GTK_SIGNAL_FUNC(gtk_menu_clicked_callback),
index 5e6b4c8b03f8c6a193878ef3b32ee1e3583984d4..feb4c5e2f38ab46c5796067245056ef881a4e085 100644 (file)
@@ -107,12 +107,12 @@ void wxMenuBar::Append( wxMenu *menu, const wxString &title )
     {
         if (*pc == _T('&'))
        {
-           pc++; /* skip it */
 #if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
             str << _T('_');
 #endif
         }
-        str << *pc;
+        else
+           str << *pc;
     }
 
     /* this doesn't have much effect right now */
@@ -479,12 +479,12 @@ void wxMenuItem::SetName( const wxString& str )
     {
         if (*pc == _T('&'))
        {
-           pc++; /* skip it */
 #if (GTK_MINOR_VERSION > 0)
             m_text << _T('_');
 #endif
         }
-        m_text << *pc;
+        else
+           m_text << *pc;
     }
 
     if (m_menuItem)
@@ -629,8 +629,8 @@ void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool
     
 #else
 
-    GtkWidget *menuItem = checkable ? gtk_check_menu_item_new_with_label( item.mb_str() )
-                                    : gtk_menu_item_new_with_label( item.mb_str() );
+    GtkWidget *menuItem = checkable ? gtk_check_menu_item_new_with_label( mitem->GetText().mb_str() )
+                                    : gtk_menu_item_new_with_label( mitem->GetText().mb_str() );
                                    
     gtk_signal_connect( GTK_OBJECT(menuItem), "activate",
                         GTK_SIGNAL_FUNC(gtk_menu_clicked_callback),