X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0c133e13b36a923c65f94499554e432bc3a0daa..3beb50e570f1b4f7a97c767677451ffc558fa22f:/src/osx/carbon/taskbar.cpp diff --git a/src/osx/carbon/taskbar.cpp b/src/osx/carbon/taskbar.cpp index 58dc33c1a6..ca38276fd2 100644 --- a/src/osx/carbon/taskbar.cpp +++ b/src/osx/carbon/taskbar.cpp @@ -141,7 +141,7 @@ wxDockEventHandler(EventHandlerCallRef WXUNUSED(inHandlerCallRef), wxDockTaskBarIcon* pTB = (wxDockTaskBarIcon*) pData; const UInt32 eventClass = GetEventClass(inEvent); const UInt32 eventKind = GetEventKind(inEvent); - + OSStatus err = eventNotHandledErr; // Handle wxTaskBar menu events (note that this is a global event handler @@ -381,7 +381,7 @@ bool wxDockTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& WXUNUSED(too // convert the wxIcon into a wxBitmap so we can perform some // wxBitmap operations with it wxBitmap bmp( icon ); - wxASSERT( bmp.Ok() ); + wxASSERT( bmp.IsOk() ); // get the CGImageRef for the wxBitmap: // OSX builds only, but then the dock only exists in OSX @@ -409,11 +409,7 @@ bool wxDockTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& WXUNUSED(too //----------------------------------------------------------------------------- bool wxDockTaskBarIcon::RemoveIcon() { - if (m_pMenu) - { - delete m_pMenu; - m_pMenu = NULL; - } + wxDELETE(m_pMenu); // restore old icon to the dock OSStatus err = RestoreApplicationDockTileImage(); @@ -470,7 +466,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon, wxEvtHandler) // actually seperate programs that also require a special undocumented id // hack and other such fun stuff). //----------------------------------------------------------------------------- -wxTaskBarIcon::wxTaskBarIcon(wxTaskBarIconType nType) +wxTaskBarIcon::wxTaskBarIcon(wxTaskBarIconType WXUNUSED_UNLESS_DEBUG(nType)) { wxASSERT_MSG( nType == DOCK,