MGR: Fix build breaks and potential crashes from recent task bar changes

svn path=/trunk/boinc/; revision=20471
This commit is contained in:
Charlie Fenton 2010-02-09 02:47:38 +00:00
parent 2913c4b318
commit 4c6accac37
4 changed files with 14 additions and 3 deletions

View File

@ -1007,3 +1007,10 @@ Rom 8 Feb 2010
client/
hostinfo_win.cpp
Charlie 8 Feb 2010
- MGR: Fix build breaks and potential crashes from recent task bar changes.
clientgui/
BOINCBaseFrame.cpp
BOINCTaskBar.cpp, .h

View File

@ -364,10 +364,10 @@ void CBOINCBaseFrame::OnExit(wxCommandEvent& WXUNUSED(event)) {
#endif
// Under wxWidgets 2.8.0, the task bar icons must be deleted for app to exit its main loop
wxGetApp().DeleteTaskBarIcon();
#ifdef __WXMAC__
wxGetApp().DeleteMacSystemMenu();
#endif
wxGetApp().DeleteTaskBarIcon();
CDlgEventLog* eventLog = wxGetApp().GetEventLog();
if (eventLog) {

View File

@ -51,9 +51,11 @@ BEGIN_EVENT_TABLE(CTaskBarIcon, wxTaskBarIconEx)
EVT_TASKBAR_REFRESH(CTaskBarIcon::OnRefresh)
EVT_TASKBAR_RELOADSKIN(CTaskBarIcon::OnReloadSkin)
EVT_TASKBAR_LEFT_DCLICK(CTaskBarIcon::OnLButtonDClick)
#ifndef __WXMAC__
EVT_TASKBAR_RIGHT_DOWN(CTaskBarIcon::OnRButtonDown)
EVT_TASKBAR_RIGHT_UP(CTaskBarIcon::OnRButtonUp)
EVT_TASKBAR_MOVE(CTaskBarIcon::OnMouseMove)
#endif
EVT_MENU(ID_OPENBOINCMANAGER, CTaskBarIcon::OnOpen)
EVT_MENU(ID_OPENWEBSITE, CTaskBarIcon::OnOpenWebsite)
EVT_MENU(ID_TB_SUSPEND, CTaskBarIcon::OnSuspendResume)
@ -301,6 +303,7 @@ void CTaskBarIcon::OnExit(wxCommandEvent& event) {
}
#ifndef __WXMAC__
// Note: tooltip must not have a trailing linebreak.
void CTaskBarIcon::OnMouseMove(wxTaskBarIconEvent& WXUNUSED(event)) {
@ -432,6 +435,7 @@ void CTaskBarIcon::OnRButtonUp(wxTaskBarIconEvent& WXUNUSED(event)) {
}
}
}
#endif // #ifndef __WXMAC__
#ifdef __WXMSW__
@ -497,7 +501,7 @@ wxMenu *CTaskBarIcon::CreatePopupMenu() {
// 16x16 icon for the menubar, while the Dock needs a 128x128 icon.
// Rather than using an entire separate icon, overlay the Dock icon with a badge
// so we don't need additional Snooze and Disconnected icons for branding.
bool CTaskBarIcon::SetIcon(const wxIcon& icon) {
bool CTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& ) {
wxIcon macIcon;
bool result;
OSStatus err = noErr ;

View File

@ -67,7 +67,7 @@ public:
#ifdef __APPLE__
wxMenu *CreatePopupMenu();
bool SetIcon(const wxIcon& icon);
bool SetIcon(const wxIcon& icon, const wxString& message = wxEmptyString);
#endif
#ifndef __WXMSW__