]> git.saurik.com Git - wxWidgets.git/commitdiff
make sure the quit item is only shown where appropriate on osx
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 28 Feb 2011 10:07:00 +0000 (10:07 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 28 Feb 2011 10:07:00 +0000 (10:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/taskbar/tbtest.cpp

index f63a1843fba9a59acdf76548d366c3284a7587f7..cf7ba7a0c1c67da0b19f5fc49eeaf5cf2d413e88 100644 (file)
@@ -263,10 +263,14 @@ wxMenu *MyTaskBarIcon::CreatePopupMenu()
     submenu->AppendSeparator();
     submenu->Append(PU_SUB2, wxT("Another submenu"));
     menu->Append(PU_SUBMAIN, wxT("Submenu"), submenu);
-#ifndef __WXOSX__ /*Mac has built-in quit menu*/
-    menu->AppendSeparator();
-    menu->Append(PU_EXIT,    wxT("E&xit"));
+    /* OSX has built-in quit menu for the dock menu, but not for the status item */
+#ifdef __WXOSX__ 
+    if ( OSXIsStatusItem() )
 #endif
+    {
+        menu->AppendSeparator();
+        menu->Append(PU_EXIT,    wxT("E&xit"));
+    }
     return menu;
 }