mirror of https://github.com/BOINC/boinc.git
MGR: Fix a Mac-only bug which sometimes failed to show the snooze icon
svn path=/trunk/boinc/; revision=25443
This commit is contained in:
parent
22f6512135
commit
49fda2e686
|
@ -1084,7 +1084,7 @@ Charlie 27 Jan 2012
|
|||
clientgui/
|
||||
BOINCTaskBar.cpp,.h
|
||||
mac/
|
||||
macSysMenu.cpp
|
||||
MacSysMenu.cpp
|
||||
|
||||
David 27 Jan 2012
|
||||
- manager: in Disk View, try to make colors more distinct.
|
||||
|
@ -2749,3 +2749,14 @@ David 17 Mar 2012
|
|||
a 0.5-CPU GPU job and 1 4-CPU job
|
||||
client/
|
||||
cpu_sched.cpp
|
||||
|
||||
Charlie 18 Mar 2012
|
||||
- MGR: Fix a Mac-only bug which sometimes failed to show the snooze icon
|
||||
after closing and opening the Manager windows. This was caused by
|
||||
having a second instance of CTaskBarIcon.
|
||||
|
||||
clientgui/
|
||||
BOINCBaseFrame.cpp
|
||||
BOINCGUIApp.cpp,.h
|
||||
mac/
|
||||
MacSysMenu.cpp
|
||||
|
|
|
@ -361,9 +361,6 @@ void CBOINCBaseFrame::OnExit(wxCommandEvent& WXUNUSED(event)) {
|
|||
SaveState();
|
||||
|
||||
// Under wxWidgets 2.8.0, the task bar icons must be deleted for app to exit its main loop
|
||||
#ifdef __WXMAC__
|
||||
wxGetApp().DeleteMacSystemMenu();
|
||||
#endif
|
||||
wxGetApp().DeleteTaskBarIcon();
|
||||
|
||||
CDlgEventLog* eventLog = wxGetApp().GetEventLog();
|
||||
|
|
|
@ -419,13 +419,6 @@ bool CBOINCGUIApp::OnInit() {
|
|||
|
||||
|
||||
// Initialize the task bar icon
|
||||
m_pTaskBarIcon = new CTaskBarIcon(
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationName(),
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationIcon(),
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationDisconnectedIcon(),
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationSnoozeIcon()
|
||||
);
|
||||
wxASSERT(m_pTaskBarIcon);
|
||||
#ifdef __WXMAC__
|
||||
m_pMacSystemMenu = new CMacSystemMenu(
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationName(),
|
||||
|
@ -434,7 +427,17 @@ bool CBOINCGUIApp::OnInit() {
|
|||
m_pSkinManager->GetAdvanced()->GetApplicationSnoozeIcon()
|
||||
);
|
||||
wxASSERT(m_pMacSystemMenu);
|
||||
m_pTaskBarIcon = (CTaskBarIcon*)m_pMacSystemMenu;
|
||||
#else
|
||||
m_pTaskBarIcon = new CTaskBarIcon(
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationName(),
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationIcon(),
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationDisconnectedIcon(),
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationSnoozeIcon()
|
||||
);
|
||||
|
||||
#endif
|
||||
wxASSERT(m_pTaskBarIcon);
|
||||
|
||||
|
||||
// Startup the System Idle Detection code
|
||||
|
@ -1253,21 +1256,18 @@ bool CBOINCGUIApp::IsModalDialogDisplayed() {
|
|||
}
|
||||
|
||||
void CBOINCGUIApp::DeleteTaskBarIcon() {
|
||||
if (m_pTaskBarIcon) {
|
||||
delete m_pTaskBarIcon;
|
||||
}
|
||||
m_pTaskBarIcon = NULL;
|
||||
}
|
||||
|
||||
#ifdef __WXMAC__
|
||||
void CBOINCGUIApp::DeleteMacSystemMenu() {
|
||||
if (m_pMacSystemMenu) {
|
||||
if (m_pMacSystemMenu) {
|
||||
delete m_pMacSystemMenu;
|
||||
}
|
||||
m_pMacSystemMenu = NULL;
|
||||
}
|
||||
#else
|
||||
if (m_pTaskBarIcon) {
|
||||
delete m_pTaskBarIcon;
|
||||
}
|
||||
#endif
|
||||
|
||||
m_pTaskBarIcon = NULL;
|
||||
}
|
||||
|
||||
// Prevent recursive entry of CMainDocument::RequestRPC()
|
||||
int CBOINCGUIApp::FilterEvent(wxEvent &event) {
|
||||
|
|
|
@ -138,7 +138,6 @@ public:
|
|||
|
||||
#ifdef __WXMAC__
|
||||
CMacSystemMenu* GetMacSystemMenu() { return m_pMacSystemMenu; }
|
||||
void DeleteMacSystemMenu();
|
||||
int ShouldShutdownCoreClient() { return true; }
|
||||
#else
|
||||
int ShouldShutdownCoreClient() { return m_iShutdownCoreClient; }
|
||||
|
|
|
@ -363,7 +363,6 @@ pascal OSStatus SysMenuEventHandler( EventHandlerCallRef inHandlerCallRef,
|
|||
// Note that if the main window is open, CBOINCBaseFrame::OnExit() will be
|
||||
// called and SysMenuEventHandler() (i.e., this code) will not be called.
|
||||
if (commandID == wxID_EXIT) {
|
||||
wxGetApp().DeleteMacSystemMenu();
|
||||
wxGetApp().DeleteTaskBarIcon();
|
||||
}
|
||||
return noErr ;
|
||||
|
|
Loading…
Reference in New Issue