]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/taskbar.cpp
Ensure that names of saved XPMs are valid C identifiers.
[wxWidgets.git] / src / osx / carbon / taskbar.cpp
index 01a99d65668e32abd4fa583b037e0abeb5143e21..0d432c8510cb8d48cb2f28aae71eefc1408d22d4 100644 (file)
@@ -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();
@@ -473,8 +469,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon, wxEvtHandler)
 wxTaskBarIcon::wxTaskBarIcon(wxTaskBarIconType WXUNUSED_UNLESS_DEBUG(nType))
 {
     wxASSERT_MSG(
-        nType == DOCK,
-        wxT("Only the DOCK implementation of wxTaskBarIcon on Mac-Carbon is currently supported!") );
+        nType == wxTBI_DOCK,
+        wxT("Only the wxTBI_DOCK implementation of wxTaskBarIcon on Mac-Carbon is currently supported!") );
 
     m_impl = new wxDockTaskBarIcon(this);
 }