applied Paul Cornett's suggested changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Surovell
2005-12-05 01:07:22 +00:00
parent d5437b854c
commit f9f9c8fcf9

View File

@@ -51,6 +51,8 @@ public:
wxTaskBarIcon* m_parent;
class wxTaskBarIconWindow* m_menuEventWindow;
DECLARE_NO_COPY_CLASS(wxTaskBarIconImpl)
};
//-----------------------------------------------------------------------------
@@ -431,7 +433,7 @@ bool wxDockTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
// convert the wxIcon into a wxBitmap so we can perform some
// wxBitmap operations with it
wxBitmap bmp( icon ) ;
wxASSERT( bmp.IsOK() );
wxASSERT( bmp.Ok() );
// get the CGImageRef for the wxBitmap:
// OSX builds only, but then the dock only exists in OSX
@@ -446,7 +448,10 @@ bool wxDockTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
if (pImage != NULL)
CGImageRelease( pImage );
return m_iconAdded = (err == noErr);
bool success = (err == noErr);
m_iconAdded = success;
return success;
}
//-----------------------------------------------------------------------------
@@ -469,7 +474,10 @@ bool wxDockTaskBarIcon::RemoveIcon()
// restore the old menu to the dock
SetApplicationDockTileMenu(m_theLastMenu);
return !(m_iconAdded = !(err == noErr));
bool success = (err == noErr);
m_iconAdded = !success;
return success;
}
//-----------------------------------------------------------------------------