mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=11564
This commit is contained in:
parent
178a16c6c9
commit
2bc6dd124b
|
@ -12887,3 +12887,18 @@ Rom 22 Nov 2006
|
|||
sg_ProjectsComponent.cpp, .h
|
||||
sg_StatImageLoader.cpp
|
||||
SkinManager.cpp
|
||||
|
||||
Charlie 22 Nov 2006
|
||||
- MGR: Fix bugs in adjusting taskbar menu items when modal dialog open:
|
||||
- Disable wxID_ABOUT item to prevent opening multiple copies of
|
||||
About dialog (a problem on the Mac, not on Windows.)
|
||||
- Re-enable items when modal dialog is closed.
|
||||
- MGR: Fix broken messages, Pause, Resume buttons on Simple GUI.
|
||||
- Mac: Fix compiler errors and warnings.
|
||||
- Mac: Use new modal dialog detection logic to block Quit from Dock.
|
||||
|
||||
clientgui/
|
||||
BOINCGUIApp.cpp
|
||||
BOINCTaskBar.cpp
|
||||
Events.h
|
||||
sg_ProjectsComponent.cpp
|
||||
|
|
|
@ -805,11 +805,17 @@ OSErr CBOINCGUIApp::QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEven
|
|||
Boolean isSame;
|
||||
ProcessInfoRec pInfo;
|
||||
FSSpec fileSpec;
|
||||
WindowRef win;
|
||||
WindowModality modality;
|
||||
OSStatus anErr;
|
||||
|
||||
anErr = AEGetAttributePtr(appleEvt, keyAddressAttr, typeProcessSerialNumber,
|
||||
// Refuse to quit if a modal dialog is open. Search for the dialog
|
||||
// by ID since all of BOINC Manager's dialog IDs are 10000.
|
||||
// Unfortunately, I know of no way to disable the Quit item in our Dock menu
|
||||
if (wxDynamicCast(wxWindow::FindWindowById(ID_ANYDIALOG), wxDialog)) {
|
||||
SysBeep(4);
|
||||
return userCanceledErr;
|
||||
}
|
||||
|
||||
anErr = AEGetAttributePtr(appleEvt, keyAddressAttr, typeProcessSerialNumber,
|
||||
&senderType, &SenderPSN, sizeof(SenderPSN), &actualSize);
|
||||
|
||||
if (anErr == noErr) {
|
||||
|
@ -827,16 +833,6 @@ OSErr CBOINCGUIApp::QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEven
|
|||
|
||||
anErr = GetProcessInformation(&SenderPSN, &pInfo);
|
||||
|
||||
// Refuse to quit if a modal dialog is open
|
||||
win = FrontWindow();
|
||||
if (win) {
|
||||
GetWindowModality(win, &modality, NULL);
|
||||
if (modality == kWindowModalityAppModal) {
|
||||
SysBeep(4);
|
||||
return userCanceledErr;
|
||||
}
|
||||
}
|
||||
|
||||
// Consider a Quit command from our Dock menu as coming from this application
|
||||
if (pInfo.processSignature != 'dock') {
|
||||
s_bSkipExitConfirmation = true; // Not from our app, our dock icon or our taskbar icon
|
||||
|
|
|
@ -281,6 +281,7 @@ void CTaskBarIcon::OnExit(wxCommandEvent& event) {
|
|||
}
|
||||
|
||||
|
||||
#ifdef __WXMSW__
|
||||
void CTaskBarIcon::OnShutdown(wxTaskBarIconExEvent& event) {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CTaskBarIcon::OnShutdown - Function Begin"));
|
||||
|
||||
|
@ -435,6 +436,7 @@ void CTaskBarIcon::OnRButtonUp(wxTaskBarIconEvent& WXUNUSED(event)) {
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void CTaskBarIcon::OnReloadSkin(CTaskbarEvent& /*event*/) {
|
||||
|
@ -571,7 +573,6 @@ wxMenu *CTaskBarIcon::BuildContextMenu() {
|
|||
wxString menuName = wxEmptyString;
|
||||
ACCT_MGR_INFO ami;
|
||||
bool is_acct_mgr_detected = false;
|
||||
bool is_dialog_detected = false;
|
||||
|
||||
wxASSERT(pMenu);
|
||||
wxASSERT(pDoc);
|
||||
|
@ -629,6 +630,7 @@ void CTaskBarIcon::AdjustMenuItems(wxMenu* pMenu) {
|
|||
wxMenuItem* pMenuItem = NULL;
|
||||
wxFont font = wxNullFont;
|
||||
size_t loc = 0;
|
||||
bool is_dialog_detected = false;
|
||||
|
||||
wxASSERT(pDoc);
|
||||
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
|
||||
|
@ -645,12 +647,18 @@ void CTaskBarIcon::AdjustMenuItems(wxMenu* pMenu) {
|
|||
// If a dialog is detected, we cannot allow the "Exit" menu item to be
|
||||
// enabled. So lets search for the dialog by ID since all of BOINC
|
||||
// Manager's dialog IDs are 10000.
|
||||
if (wxDynamicCast(wxWindow::FindWindowById(ID_ANYDIALOG), wxDialog)) {
|
||||
for (loc = 0; loc < pMenu->GetMenuItemCount(); loc++) {
|
||||
pMenuItem = pMenu->FindItemByPosition(loc);
|
||||
if (pMenuItem->GetId() == ID_TB_EXIT) {
|
||||
pMenuItem->Enable(false);
|
||||
}
|
||||
if (wxDynamicCast(wxWindow::FindWindowById(ID_ANYDIALOG), wxDialog))
|
||||
is_dialog_detected = true;
|
||||
|
||||
for (loc = 0; loc < pMenu->GetMenuItemCount(); loc++) {
|
||||
pMenuItem = pMenu->FindItemByPosition(loc);
|
||||
if (pMenuItem->GetId() == ID_TB_EXIT) {
|
||||
pMenuItem->Enable(!is_dialog_detected);
|
||||
}
|
||||
// Prevent opening multiple instances of About Dialog
|
||||
// (This is a problem on the Mac but not on Windows)
|
||||
if (pMenuItem->GetId() == wxID_ABOUT) {
|
||||
pMenuItem->Enable(!is_dialog_detected);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,11 @@
|
|||
|
||||
#define ID_TB_TIMER 6800
|
||||
#define ID_TB_SUSPEND 6801
|
||||
#ifdef __WXMAC__
|
||||
#define ID_TB_EXIT wxID_EXIT
|
||||
#else
|
||||
#define ID_TB_EXIT 6802
|
||||
#endif
|
||||
#define ID_LIST_BASE 7000
|
||||
#define ID_LIST_PROJECTSVIEW 7000
|
||||
#define ID_LIST_WORKVIEW 7001
|
||||
|
|
|
@ -147,7 +147,7 @@ void CProjectsComponent::CreateComponent()
|
|||
wxToolTip *ttMessages = new wxToolTip(_("Open a window to view messages"));
|
||||
btnMessages = new CLinkButton(
|
||||
this,
|
||||
-1,
|
||||
ID_SIMPLE_MESSAGES,
|
||||
*pSkinSimple->GetMessagesLink()->GetBitmap(),
|
||||
wxPoint(11,86),
|
||||
wxSize(70,20),
|
||||
|
@ -158,7 +158,7 @@ void CProjectsComponent::CreateComponent()
|
|||
wxToolTip *ttAlertMessages = new wxToolTip(_("Open a window to view messages"));
|
||||
btnAlertMessages = new CLinkButton(
|
||||
this,
|
||||
-1,
|
||||
ID_SIMPLE_MESSAGES_ALERT,
|
||||
*(pSkinSimple->GetMessagesAlertLink()->GetBitmap()),
|
||||
wxPoint(11,86),
|
||||
wxSize(70,20),
|
||||
|
@ -176,7 +176,7 @@ void CProjectsComponent::CreateComponent()
|
|||
wxToolTip *ttPause = new wxToolTip(_("Stop all activity"));
|
||||
btnPause = new CLinkButton(
|
||||
this,
|
||||
-1,
|
||||
ID_SIMPLE_SUSPEND,
|
||||
*pSkinSimple->GetSuspendLink()->GetBitmap(),
|
||||
wxPoint(85,86),
|
||||
wxSize(59,20),
|
||||
|
@ -188,7 +188,7 @@ void CProjectsComponent::CreateComponent()
|
|||
wxToolTip *ttResume = new wxToolTip(_("Resume activity"));
|
||||
btnResume = new CLinkButton(
|
||||
this,
|
||||
-1,
|
||||
ID_SIMPLE_RESUME,
|
||||
*(pSkinSimple->GetResumeLink()->GetBitmap()),
|
||||
wxPoint(85,86),
|
||||
wxSize(59,20),
|
||||
|
|
|
@ -904,7 +904,7 @@
|
|||
AA8B6B24046C366200A80164 /* ss_logic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ss_logic.h; path = ../client/ss_logic.h; sourceTree = SOURCE_ROOT; };
|
||||
AAA31C97042157A800A80164 /* shmem.C */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = shmem.C; path = ../lib/shmem.C; sourceTree = SOURCE_ROOT; };
|
||||
AAA31C98042157A800A80164 /* shmem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = shmem.h; path = ../lib/shmem.h; sourceTree = SOURCE_ROOT; };
|
||||
DD095EF107D87AE900362260 /* BOINCManager.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = BOINCManager.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DD095EF107D87AE900362260 /* BOINCManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BOINCManager.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DD0C59580816573E00CEC5D7 /* mac_saver_module.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = mac_saver_module.cpp; path = ../clientgui/mac/mac_saver_module.cpp; sourceTree = SOURCE_ROOT; };
|
||||
DD0C59590816573E00CEC5D7 /* Mac_Saver_ModuleView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Mac_Saver_ModuleView.h; path = ../clientgui/mac/Mac_Saver_ModuleView.h; sourceTree = SOURCE_ROOT; };
|
||||
DD0C595A0816573E00CEC5D7 /* Mac_Saver_ModuleView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = Mac_Saver_ModuleView.m; path = ../clientgui/mac/Mac_Saver_ModuleView.m; sourceTree = SOURCE_ROOT; };
|
||||
|
|
Loading…
Reference in New Issue