X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4161a2a08e622ba55f66610e26892f5fda37e6f..35bb3cb155917b4287fb2a3841bea22919a3d499:/src/gtk/menu.cpp?ds=inline diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 98a7ea30de..aa3174cc8a 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -26,10 +26,6 @@ #include "wx/stockitem.h" #include "wx/gtk/private.h" -#ifdef __WXGTK20__ -#include -#endif - // FIXME: is this right? somehow I don't think so (VZ) #define gtk_accel_group_attach(g, o) gtk_window_add_accel_group((o), (g)) @@ -390,21 +386,8 @@ bool wxMenuBar::GtkAppend(wxMenu *menu, const wxString& title, int pos) // m_invokingWindow is set after wxFrame::SetMenuBar(). This call enables // addings menu later on. if (m_invokingWindow) - { wxMenubarSetInvokingWindow( menu, m_invokingWindow ); - // OPTIMISE ME: we should probably cache this, or pass it - // directly, but for now this is a minimal - // change to validate the new dynamic sizing. - // see (and refactor :) similar code in Remove - // below. - - wxFrame *frame = wxDynamicCast( m_invokingWindow, wxFrame ); - - if( frame ) - frame->UpdateMenuBarSize(); - } - return true; } @@ -447,16 +430,7 @@ wxMenu *wxMenuBar::Remove(size_t pos) menu->m_owner = NULL; if (m_invokingWindow) - { - // OPTIMISE ME: see comment in GtkAppend - wxFrame *frame = wxDynamicCast( m_invokingWindow, wxFrame ); - - if( frame ) - frame->UpdateMenuBarSize(); - wxMenubarUnsetInvokingWindow( menu, m_invokingWindow ); - } - return menu; } @@ -637,7 +611,6 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu ) commandEvent.SetEventObject(frame); if (item->IsCheckable()) commandEvent.SetInt(item->IsChecked()); - commandEvent.SetEventObject(menu); frame->GetEventHandler()->ProcessEvent(commandEvent); } @@ -1722,8 +1695,6 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y ) #endif // wxUSE_MENUS_NATIVE -#ifdef __WXGTK20__ - #include const char *wxGetStockGtkID(wxWindowID id) @@ -1842,6 +1813,4 @@ bool wxGetStockGtkAccelerator(const char *id, GdkModifierType *mod, guint *key) return false; } -#endif // __WXGTK20__ - #endif // wxUSE_MENUS