diff --git a/include/wx/gtk/menu.h b/include/wx/gtk/menu.h index 78a429d065..c4398fa168 100644 --- a/include/wx/gtk/menu.h +++ b/include/wx/gtk/menu.h @@ -120,10 +120,9 @@ public: #endif wxMenu( const wxString& title = wxEmptyString, long style = 0 ) { - Init(title, style, NULL); + Init(title, style); } - wxMenu( long style ); ~wxMenu(); // operations @@ -203,7 +202,7 @@ private: void Init( const wxString& title, long style #ifdef WXWIN_COMPATIBILITY - , const wxFunction func + , const wxFunction func = (wxFunction) NULL #endif ); diff --git a/include/wx/gtk1/menu.h b/include/wx/gtk1/menu.h index 78a429d065..c4398fa168 100644 --- a/include/wx/gtk1/menu.h +++ b/include/wx/gtk1/menu.h @@ -120,10 +120,9 @@ public: #endif wxMenu( const wxString& title = wxEmptyString, long style = 0 ) { - Init(title, style, NULL); + Init(title, style); } - wxMenu( long style ); ~wxMenu(); // operations @@ -203,7 +202,7 @@ private: void Init( const wxString& title, long style #ifdef WXWIN_COMPATIBILITY - , const wxFunction func + , const wxFunction func = (wxFunction) NULL #endif ); diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index b65cb80df0..87122a4e3a 100644 --- a/samples/minimal/minimal.cpp +++ b/samples/minimal/minimal.cpp @@ -155,8 +155,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) SetIcon(wxICON(mondrian)); // create a menu bar -// wxMenu *menuFile = new wxMenu; - wxMenu *menuFile = new wxMenu(wxMENU_TEAROFF); + wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF); menuFile->Append(Minimal_About, "&About...\tCtrl-A", "Show about dialog"); menuFile->Append(Minimal_Test, "&Test...\tCtrl-T", "Test"); diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 34d188bfb1..10656f39f4 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -626,19 +626,9 @@ bool wxMenuItem::IsChecked() const IMPLEMENT_DYNAMIC_CLASS(wxMenu,wxEvtHandler) -wxMenu::wxMenu( const wxString& title, const wxFunction func, long style ) -{ - Init(title, func, style); -} - -wxMenu::wxMenu(long style) -{ - Init(wxEmptyString, (wxFunction) NULL, style); -} - void wxMenu::Init( const wxString& title, - long style, + long style #ifdef WXWIN_COMPATIBILITY , const wxFunction func #endif diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index 34d188bfb1..10656f39f4 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -626,19 +626,9 @@ bool wxMenuItem::IsChecked() const IMPLEMENT_DYNAMIC_CLASS(wxMenu,wxEvtHandler) -wxMenu::wxMenu( const wxString& title, const wxFunction func, long style ) -{ - Init(title, func, style); -} - -wxMenu::wxMenu(long style) -{ - Init(wxEmptyString, (wxFunction) NULL, style); -} - void wxMenu::Init( const wxString& title, - long style, + long style #ifdef WXWIN_COMPATIBILITY , const wxFunction func #endif