virtual bool SetIcon(const wxIcon& icon, const wxString& tooltip) = 0;
virtual bool RemoveIcon() = 0;
virtual bool PopupMenu(wxMenu *menu) = 0;
-
+
wxMenu* CreatePopupMenu()
{ return m_parent->CreatePopupMenu(); }
-
+
wxTaskBarIcon* m_parent;
class wxTaskBarIconWindow* m_menuEventWindow;
+
+ DECLARE_NO_COPY_CLASS(wxTaskBarIconImpl)
};
//-----------------------------------------------------------------------------
// 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
if (pImage != NULL)
CGImageRelease( pImage );
- return m_iconAdded = (err == noErr);
+ bool success = (err == noErr);
+ m_iconAdded = success;
+
+ return success;
}
//-----------------------------------------------------------------------------
// restore the old menu to the dock
SetApplicationDockTileMenu(m_theLastMenu);
- return !(m_iconAdded = !(err == noErr));
+ bool success = (err == noErr);
+ m_iconAdded = !success;
+
+ return success;
}
-
+
//-----------------------------------------------------------------------------
// wxDockTaskBarIcon::PopupMenu
//
if (m_pMenu)
delete m_pMenu;
-
+
//start copy of menu
m_pMenu = wxDeepCopyMenu(menu);
-
+
//finish up
m_pMenu->SetInvokingWindow(m_menuEventWindow);
bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
{ return m_impl->SetIcon(icon, tooltip); }
bool wxTaskBarIcon::RemoveIcon()
-{ return m_impl->RemoveIcon(); }
+{ return m_impl->RemoveIcon(); }
bool wxTaskBarIcon::PopupMenu(wxMenu *menu)
{ return m_impl->PopupMenu(menu); }