From 41271da4af366747f6195db5d5151ae063891918 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Dec 2010 13:57:08 +0000 Subject: [PATCH] Use stock ids for menu items in the config sample. This not only removes some unnecessary code from the sample but also fixes a problem due to the use of a 0 id under wxOSX (which is unsupported there). Closes #12788. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/config/conftest.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/samples/config/conftest.cpp b/samples/config/conftest.cpp index 6152557676..c30baf4271 100644 --- a/samples/config/conftest.cpp +++ b/samples/config/conftest.cpp @@ -63,21 +63,14 @@ private: DECLARE_EVENT_TABLE() }; -enum -{ - ConfTest_Quit, - ConfTest_About, - ConfTest_Delete -}; - // ---------------------------------------------------------------------------- // event tables // ---------------------------------------------------------------------------- BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(ConfTest_Quit, MyFrame::OnQuit) - EVT_MENU(ConfTest_About, MyFrame::OnAbout) - EVT_MENU(ConfTest_Delete, MyFrame::OnDelete) + EVT_MENU(wxID_EXIT, MyFrame::OnQuit) + EVT_MENU(wxID_ABOUT, MyFrame::OnAbout) + EVT_MENU(wxID_DELETE, MyFrame::OnDelete) END_EVENT_TABLE() // ============================================================================ @@ -163,11 +156,11 @@ MyFrame::MyFrame() // menu wxMenu *file_menu = new wxMenu; - file_menu->Append(ConfTest_Delete, wxT("&Delete"), wxT("Delete config file")); + file_menu->Append(wxID_DELETE, wxT("&Delete"), wxT("Delete config file")); file_menu->AppendSeparator(); - file_menu->Append(ConfTest_About, wxT("&About\tF1"), wxT("About this sample")); + file_menu->Append(wxID_ABOUT, wxT("&About\tF1"), wxT("About this sample")); file_menu->AppendSeparator(); - file_menu->Append(ConfTest_Quit, wxT("E&xit\tAlt-X"), wxT("Exit the program")); + file_menu->Append(wxID_EXIT, wxT("E&xit\tAlt-X"), wxT("Exit the program")); wxMenuBar *menu_bar = new wxMenuBar; menu_bar->Append(file_menu, wxT("&File")); SetMenuBar(menu_bar); -- 2.47.2