X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fac4253c6f9c86d1aee264311b82404cd425ca10..6b3eb77aece0708b6c9dd0c58bd2b4408e4fac9d:/src/gtk/menu.cpp diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index aa5e5d9c43..6907fe1d68 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -500,8 +500,11 @@ void wxMenuItem::SetName( const wxString& str ) /* only GTK 1.2 know about hot keys */ m_hotKey = _T(""); #if (GTK_MINOR_VERSION > 0) - pc++; - m_hotKey = pc; + if(*pc == _T('\t')) + { + pc++; + m_hotKey = pc; + } #endif if (m_menuItem) @@ -597,9 +600,23 @@ void wxMenu::AppendSeparator() wxMenuItem *mitem = new wxMenuItem(); mitem->SetId(ID_SEPARATOR); +#if (GTK_MINOR_VERSION > 0) + GtkItemFactoryEntry entry; + entry.path = "/sep"; + entry.callback = (GtkItemFactoryCallback) NULL; + entry.callback_action = 0; + entry.item_type = ""; + entry.accelerator = (gchar*) NULL; + + gtk_item_factory_create_item( m_factory, &entry, (gpointer) this, 2 ); /* what is 2 ? */ + + /* this will be wrong for more than one separator. do we care? */ + GtkWidget *menuItem = gtk_item_factory_get_widget( m_factory, "
/sep" ); +#else GtkWidget *menuItem = gtk_menu_item_new(); gtk_menu_append( GTK_MENU(m_menu), menuItem ); gtk_widget_show( menuItem ); +#endif mitem->SetMenuItem(menuItem); m_items.Append( mitem );