X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9fa72bd2a637cee761c56e2ce61cec3e43c62765..b7c542d5c6104aa3a52b0cafda59dff03510e888:/src/gtk/menu.cpp diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 711a4f7cb9..0178cad93d 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -511,17 +511,7 @@ void wxMenuBar::SetLabelTop( size_t pos, const wxString& label ) menu->SetTitle( str ); if (menu->m_owner) - { - GtkLabel *glabel = GTK_LABEL( GTK_BIN(menu->m_owner)->child ); - - /* set new text */ - gtk_label_set( glabel, wxGTK_CONV( str ) ); - - /* reparse key accel */ - (void)gtk_label_parse_uline (GTK_LABEL(glabel), wxGTK_CONV( str ) ); - gtk_accel_label_refetch( GTK_ACCEL_LABEL(glabel) ); - } - + gtk_label_set_text_with_mnemonic( GTK_LABEL( GTK_BIN(menu->m_owner)->child), wxGTK_CONV(str) ); } //----------------------------------------------------------------------------- @@ -875,7 +865,7 @@ void wxMenuItem::Check( bool check ) { case wxITEM_CHECK: case wxITEM_RADIO: - gtk_check_menu_item_set_state( (GtkCheckMenuItem*)m_menuItem, (gint)check ); + gtk_check_menu_item_set_active( (GtkCheckMenuItem*)m_menuItem, (gint)check ); break; default: @@ -924,7 +914,7 @@ void wxMenu::Init() { GtkWidget *tearoff = gtk_tearoff_menu_item_new(); - gtk_menu_append(GTK_MENU(m_menu), tearoff); + gtk_menu_shell_append(GTK_MENU_SHELL(m_menu), tearoff); } m_prevRadio = NULL;