X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f1d9e1ec6b596ec336e8e68fdec78244088d5c25..137c8bde085d6d5b7c459902d2ea1a198ab48765:/src/cocoa/taskbar.mm?ds=sidebyside diff --git a/src/cocoa/taskbar.mm b/src/cocoa/taskbar.mm index 5975e31c3d..78bc7c5747 100644 --- a/src/cocoa/taskbar.mm +++ b/src/cocoa/taskbar.mm @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "taskbar.h" -#endif - #include "wx/wxprec.h" #ifdef wxHAS_TASK_BAR_ICON @@ -42,6 +38,11 @@ #include "wx/cocoa/NSApplication.h" #include "wx/cocoa/autorelease.h" +// A category for methods that are only present in Panther's SDK +@interface NSStatusItem(wxNSStatusItemPrePantherCompatibility) +- (void)popUpStatusItemMenu:(NSMenu *)menu; +@end + class wxTaskBarIconWindow; // ============================================================================ @@ -61,6 +62,10 @@ public: virtual ~wxTaskBarIconCocoaImpl(); inline wxTaskBarIcon* GetTaskBarIcon() { return m_taskBarIcon; } protected: + inline wxMenu* CreatePopupMenu() + { wxASSERT(m_taskBarIcon); + return m_taskBarIcon->CreatePopupMenu(); + } wxTaskBarIcon *m_taskBarIcon; wxTaskBarIconWindow *m_iconWindow; private: @@ -211,7 +216,7 @@ wxTaskBarIconDockImpl::wxTaskBarIconDockImpl(wxTaskBarIcon *taskBarIcon) : wxTaskBarIconCocoaImpl(taskBarIcon) { m_originalDockIcon = nil; - wxASSERT_MSG(!sm_dockIcon,"You should never have more than one dock icon!"); + wxASSERT_MSG(!sm_dockIcon, wxT("You should never have more than one dock icon!")); sm_dockIcon = this; } @@ -231,7 +236,7 @@ WX_NSMenu wxTaskBarIconDockImpl::CocoaGetDockNSMenu() WX_NSMenu wxTaskBarIconDockImpl::CocoaDoGetDockNSMenu() { - wxMenu *dockMenu = m_taskBarIcon->CreatePopupMenu(); + wxMenu *dockMenu = CreatePopupMenu(); if(!dockMenu) return nil; if(!m_iconWindow)