X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f53c4d3b8826d95f6297ad32aacb7a078213fb2d..f9b4d680d72930c31fe14dd63421a85d97ccd739:/src/osx/cocoa/taskbar.mm diff --git a/src/osx/cocoa/taskbar.mm b/src/osx/cocoa/taskbar.mm index a5143fe0c9..2f5762665c 100644 --- a/src/osx/cocoa/taskbar.mm +++ b/src/osx/cocoa/taskbar.mm @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// File: src/cocoa/taskbar.mm +// File: src/osx/cocoa/taskbar.mm // Purpose: Implements wxTaskBarIcon class // Author: David Elliott // Modified by: @@ -10,7 +10,7 @@ ///////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" -#ifdef wxUSE_TASKBARICON +#if wxUSE_TASKBARICON #ifndef WX_PRECOMP #include "wx/menu.h" @@ -21,21 +21,7 @@ #include "wx/taskbar.h" -#import -#import -#import -#import -#import -#import -#import -#import -#import - -#import -#import -#import - -#include "wx/cocoa/autorelease.h" +#include "wx/osx/private.h" // A category for methods that are only present in Panther's SDK @interface NSStatusItem(wxNSStatusItemPrePantherCompatibility) @@ -62,9 +48,9 @@ public: inline wxTaskBarIcon* GetTaskBarIcon() { return m_taskBarIcon; } wxMenu * CreatePopupMenu() { return m_taskBarIcon->CreatePopupMenu(); } - - DECLARE_NO_COPY_CLASS(wxTaskBarIconImpl) - + + wxDECLARE_NO_COPY_CLASS(wxTaskBarIconImpl); + protected: wxTaskBarIcon *m_taskBarIcon; wxTaskBarIconWindow *m_iconWindow; @@ -176,7 +162,7 @@ wxTaskBarIcon::~wxTaskBarIcon() // Operations bool wxTaskBarIcon::IsIconInstalled() const -{ +{ return false; } @@ -245,9 +231,9 @@ WX_NSMenu wxTaskBarIconDockImpl::CocoaDoGetDockNSMenu() return (WX_NSMenu)dockMenu->GetHMenu(); } -bool wxTaskBarIconDockImpl::SetIcon(const wxIcon& icon, const wxString& tooltip) +bool wxTaskBarIconDockImpl::SetIcon(const wxIcon& WXUNUSED(icon), const wxString& WXUNUSED(tooltip)) { - wxAutoNSAutoreleasePool pool; + wxMacAutoreleasePool pool; m_originalDockIcon = [[[NSApplication sharedApplication] applicationIconImage] retain]; //[[NSApplication sharedApplication] setApplicationIconImage:icon.GetNSImage()]; return true; @@ -260,7 +246,7 @@ bool wxTaskBarIconDockImpl::RemoveIcon() return true; } -bool wxTaskBarIconDockImpl::PopupMenu(wxMenu *menu) +bool wxTaskBarIconDockImpl::PopupMenu(wxMenu *WXUNUSED(menu)) { wxFAIL_MSG(wxT("You cannot force the Dock icon menu to popup")); return false; @@ -280,9 +266,9 @@ wxTaskBarIconCustomStatusItemImpl::~wxTaskBarIconCustomStatusItemImpl() { } -bool wxTaskBarIconCustomStatusItemImpl::SetIcon(const wxIcon& icon, const wxString& tooltip) +bool wxTaskBarIconCustomStatusItemImpl::SetIcon(const wxIcon& icon, const wxString& WXUNUSED(tooltip)) { - wxAutoNSAutoreleasePool pool; + wxMacAutoreleasePool pool; if(!m_cocoaNSStatusItem) { m_cocoaNSStatusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength]; @@ -373,7 +359,7 @@ void wxTaskBarIconWindowCustom::OnMouseEvent(wxMouseEvent &event) m_taskBarIconImpl->GetTaskBarIcon()->ProcessEvent(tbiEvent); } -void wxTaskBarIconWindowCustom::OnPaint(wxPaintEvent &event) +void wxTaskBarIconWindowCustom::OnPaint(wxPaintEvent &WXUNUSED(event)) { wxPaintDC dc(this); // FIXME: This is a temporary hack until we can see real icons