MGR: Fix #388: Snooze menu item is disabled and not checked if user selects RUN_MODE_NEVER

svn path=/trunk/boinc/; revision=13541
This commit is contained in:
Charlie Fenton 2007-09-05 02:55:29 +00:00
parent 340b55ece8
commit f2ea5d5fd9
2 changed files with 16 additions and 1 deletions

View File

@ -8322,3 +8322,11 @@ Charlie 4 Sep 2007
mac_build/
boinc.xcodeproj/
project.pbxproj
Charlie 4 Sep 2007
- MGR: Fix #388: Snooze menu item is disabled and not checked if user
selects RUN_MODE_NEVER; it is enabled and checked if user selects
Snooze; otherwise it is enabled and not checked.
clientgui/
BOINCTaskBar.cpp

View File

@ -703,9 +703,16 @@ void CTaskBarIcon::AdjustMenuItems(wxMenu* pMenu) {
pDoc->GetCoreClientStatus(status);
if (RUN_MODE_NEVER == status.task_mode) {
pMenu->Check(ID_TB_SUSPEND, true);
if (status.task_mode_perm == status.task_mode) {
pMenu->Check(ID_TB_SUSPEND, false);
pMenu->Enable(ID_TB_SUSPEND, false);
} else {
pMenu->Check(ID_TB_SUSPEND, true);
pMenu->Enable(ID_TB_SUSPEND, true);
}
} else {
pMenu->Check(ID_TB_SUSPEND, false);
pMenu->Enable(ID_TB_SUSPEND, true);
}
}