X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04fa0af10e55d470682ab137f109cc5fb76605bc..6f026b5b63fe7ccb025e84509886f74772b9df13:/src/cocoa/taskbar.mm diff --git a/src/cocoa/taskbar.mm b/src/cocoa/taskbar.mm index 17147b1fd2..e5491905c8 100644 --- a/src/cocoa/taskbar.mm +++ b/src/cocoa/taskbar.mm @@ -4,15 +4,10 @@ // Author: David Elliott // Modified by: // Created: 2004/01/24 -// RCS-ID: $Id$ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "taskbar.h" -#endif - #include "wx/wxprec.h" #ifdef wxHAS_TASK_BAR_ICON @@ -315,8 +310,9 @@ bool wxTaskBarIconCustomStatusItemImpl::RemoveIcon() bool wxTaskBarIconCustomStatusItemImpl::PopupMenu(wxMenu *menu) { - wxASSERT(menu); - menu->SetInvokingWindow(m_iconWindow); + wxCHECK_MSG(menu, false, "can't popup a NULL menu"); + + wxMenuInvokingWindowSetter setInvokingWin(*menu, m_iconWindow); menu->UpdateUI(); if([m_cocoaNSStatusItem respondsToSelector:@selector(popUpStatusItemMenu:)]) @@ -332,7 +328,6 @@ bool wxTaskBarIconCustomStatusItemImpl::PopupMenu(wxMenu *menu) eventNumber:0 clickCount:1 pressure:0.0]; [NSMenu popUpContextMenu:menu->GetNSMenu() withEvent:nsevent forView:m_iconWindow->GetNSView()]; } - menu->SetInvokingWindow(NULL); return true; } @@ -394,7 +389,7 @@ void wxTaskBarIconWindowCustom::OnPaint(wxPaintEvent &event) // This neatly solves the problem of DLL separation. If the wxAdvanced // library (which this file is part of) is loaded then this category is -// defined and we get dock menu behavior without app.mm ever having to +// defined and we get dock menu behaviour without app.mm ever having to // know we exist. C++ did sucketh so. :-) @interface wxNSApplicationDelegate(wxTaskBarIconNSApplicationDelegateCategory)