From 733fa5907d0b63c10ad4836c43a25f9cc4510e0c Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 28 Feb 2011 10:07:00 +0000 Subject: [PATCH] make sure the quit item is only shown where appropriate on osx git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/taskbar/tbtest.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/samples/taskbar/tbtest.cpp b/samples/taskbar/tbtest.cpp index f63a184..cf7ba7a 100644 --- a/samples/taskbar/tbtest.cpp +++ b/samples/taskbar/tbtest.cpp @@ -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; } -- 2.7.4