]> git.saurik.com Git - wxWidgets.git/commitdiff
context menu support for mac enabled
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 6 Mar 2003 16:56:06 +0000 (16:56 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 6 Mar 2003 16:56:06 +0000 (16:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/menu/menu.cpp

index b5acd519f7f787a78a6053bb97b1b7537cd0b466..9464e3e0f4491bfcc0dc951eeaf74f9fcabe135e 100644 (file)
@@ -94,7 +94,7 @@ protected:
     void OnTestCheck(wxCommandEvent& event);
     void OnTestRadio(wxCommandEvent& event);
 
-#ifdef __WXMSW__
+#if defined( __WXMSW__ ) || defined( __WXMAC__ )
     void OnContextMenu(wxContextMenuEvent& event)
         { ShowContextMenu(ScreenToClient(event.GetPosition())); }
 #else
@@ -244,7 +244,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
 
     EVT_UPDATE_UI(Menu_Menu_Check, MyFrame::OnUpdateCheckMenuItemUI)
 
-#ifdef __WXMSW__
+#if defined( __WXMSW__ ) || defined( __WXMAC__ )
     EVT_CONTEXT_MENU(MyFrame::OnContextMenu)
 #else
     EVT_RIGHT_UP(MyFrame::OnRightUp)
@@ -622,7 +622,7 @@ void MyFrame::OnAppendSubMenu(wxCommandEvent& WXUNUSED(event))
 {
     wxMenuBar *menubar = GetMenuBar();
 
-    wxMenu *menu = menubar->GetMenu(menubar->GetMenuCount() - 1);
+    wxMenu *menu = menubar->GetMenu(menubar->GetMenuCount() - 2);
 
     menu->Append(Menu_Dummy_Last, _T("&Dummy sub menu"),
                  CreateDummyMenu(NULL), _T("Dummy sub menu help"));