mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=1945
This commit is contained in:
parent
c6ce5e4734
commit
4bb38b42d5
|
@ -552,10 +552,16 @@ enum SUSPEND_REASON_t {
|
||||||
void CLIENT_STATE::check_suspend_activities(int& reason) {
|
void CLIENT_STATE::check_suspend_activities(int& reason) {
|
||||||
reason = 0;
|
reason = 0;
|
||||||
|
|
||||||
|
// Don't work while we're running CPU benchmarks
|
||||||
|
//
|
||||||
|
if (check_cpu_benchmarks() == CPU_BENCHMARKS_RUNNING) {
|
||||||
|
reason |= SUSPEND_REASON_BENCHMARKS;
|
||||||
|
}
|
||||||
|
|
||||||
if (user_run_request == USER_RUN_REQUEST_ALWAYS) return;
|
if (user_run_request == USER_RUN_REQUEST_ALWAYS) return;
|
||||||
|
|
||||||
if (user_run_request == USER_RUN_REQUEST_NEVER) {
|
if (user_run_request == USER_RUN_REQUEST_NEVER) {
|
||||||
reason = SUSPEND_REASON_USER_REQ;
|
reason |= SUSPEND_REASON_USER_REQ;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,12 +579,6 @@ void CLIENT_STATE::check_suspend_activities(int& reason) {
|
||||||
reason |= SUSPEND_REASON_TIME_OF_DAY;
|
reason |= SUSPEND_REASON_TIME_OF_DAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't work while we're running CPU benchmarks
|
|
||||||
//
|
|
||||||
if (check_cpu_benchmarks() == CPU_BENCHMARKS_RUNNING) {
|
|
||||||
reason |= SUSPEND_REASON_BENCHMARKS;
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "Force &run", ID_FILE_RUN_REQUEST_ALWAYS
|
MENUITEM "Force &run", ID_FILE_RUN_REQUEST_ALWAYS
|
||||||
MENUITEM "Run based on &preferences", ID_FILE_RUN_REQUEST_AUTO
|
MENUITEM "Run based on &preferences", ID_FILE_RUN_REQUEST_AUTO
|
||||||
MENUITEM "&Pause", ID_FILE_RUN_REQUEST_NEVER
|
MENUITEM "&Suspend", ID_FILE_RUN_REQUEST_NEVER
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Run &Benchmarks", ID_FILE_RUN_BENCHMARKS
|
MENUITEM "Run &Benchmarks", ID_FILE_RUN_BENCHMARKS
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
@ -224,14 +224,14 @@ BEGIN
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Force &run", ID_FILE_RUN_REQUEST_ALWAYS
|
MENUITEM "Force &run", ID_FILE_RUN_REQUEST_ALWAYS
|
||||||
MENUITEM "Run based on &preferences", ID_FILE_RUN_REQUEST_AUTO
|
MENUITEM "Run based on &preferences", ID_FILE_RUN_REQUEST_AUTO
|
||||||
MENUITEM "&Pause", ID_FILE_RUN_REQUEST_NEVER
|
MENUITEM "&Suspend", ID_FILE_RUN_REQUEST_NEVER
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "E&xit", ID_STATUSICON_EXIT
|
MENUITEM "E&xit", ID_STATUSICON_EXIT
|
||||||
END
|
END
|
||||||
POPUP "Project"
|
POPUP "Project"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Web site", ID_PROJECT_WEB_SITE
|
MENUITEM "&Web site", ID_PROJECT_WEB_SITE
|
||||||
MENUITEM "GET PREFERENCES", ID_PROJECT_GET_PREFS
|
MENUITEM "XXX GET PREFERENCES XXX", ID_PROJECT_GET_PREFS
|
||||||
MENUITEM "&Detach...", ID_PROJECT_DETACH
|
MENUITEM "&Detach...", ID_PROJECT_DETACH
|
||||||
MENUITEM "&Reset project...", ID_PROJECT_RESET
|
MENUITEM "&Reset project...", ID_PROJECT_RESET
|
||||||
END
|
END
|
||||||
|
@ -243,7 +243,7 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Retry now", ID_TRANSFERS_RETRYNOW
|
MENUITEM "&Retry now", ID_TRANSFERS_RETRYNOW
|
||||||
END
|
END
|
||||||
POPUP "Message"
|
POPUP "Messages"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Copy to clipboard", ID_MESSAGE_COPY_TO_CLIP
|
MENUITEM "&Copy to clipboard", ID_MESSAGE_COPY_TO_CLIP
|
||||||
END
|
END
|
||||||
|
|
|
@ -62,7 +62,7 @@ BOOL CLoginDialog::OnInitDialog()
|
||||||
{
|
{
|
||||||
CDialog::OnInitDialog();
|
CDialog::OnInitDialog();
|
||||||
m_strUrlTT.Format("The URL for the website of the project.");
|
m_strUrlTT.Format("The URL for the website of the project.");
|
||||||
m_strAuthTT.Format("The authorization code recieved in your confirmation email.");
|
m_strAuthTT.Format("The authorization code received in your confirmation email.");
|
||||||
LoadLanguage();
|
LoadLanguage();
|
||||||
CWnd* pWndUrl = GetDlgItem(IDC_LOGIN_URL);
|
CWnd* pWndUrl = GetDlgItem(IDC_LOGIN_URL);
|
||||||
if(pWndUrl) {
|
if(pWndUrl) {
|
||||||
|
|
|
@ -185,6 +185,8 @@ CMainWindow::CMainWindow()
|
||||||
|
|
||||||
m_MenuLabelRetryNow = "&Retry now";
|
m_MenuLabelRetryNow = "&Retry now";
|
||||||
m_MenuLabelGetPreferences = "Get p&references";
|
m_MenuLabelGetPreferences = "Get p&references";
|
||||||
|
m_DialogResetQuery = "Are you sure you want to reset the project %1?";
|
||||||
|
m_DialogDetachQuery = "Are you sure you want to detach from the project %1?";
|
||||||
|
|
||||||
// create and position window
|
// create and position window
|
||||||
CreateEx(0, wndcls.lpszClassName, WND_TITLE,
|
CreateEx(0, wndcls.lpszClassName, WND_TITLE,
|
||||||
|
@ -986,6 +988,9 @@ void CMainWindow::LoadLanguage()
|
||||||
|
|
||||||
UpdateLanguageString("MENU-Project", m_MenuLabelGetPreferences, strPath);
|
UpdateLanguageString("MENU-Project", m_MenuLabelGetPreferences, strPath);
|
||||||
UpdateLanguageString("MENU-Project", m_MenuLabelRetryNow, strPath);
|
UpdateLanguageString("MENU-Project", m_MenuLabelRetryNow, strPath);
|
||||||
|
|
||||||
|
UpdateLanguageString("DIALOG-RESET", m_DialogResetQuery, strPath);
|
||||||
|
UpdateLanguageString("DIALOG-DETACH", m_DialogDetachQuery, strPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////
|
//////////
|
||||||
|
@ -1267,11 +1272,10 @@ void CMainWindow::OnCommandProjectGetPrefs()
|
||||||
void CMainWindow::OnCommandProjectDetach()
|
void CMainWindow::OnCommandProjectDetach()
|
||||||
{
|
{
|
||||||
PROJECT *proj;
|
PROJECT *proj;
|
||||||
CString strBuf;
|
|
||||||
proj = GetProjectFromContextMenu();
|
proj = GetProjectFromContextMenu();
|
||||||
if (!proj) return;
|
if (!proj) return;
|
||||||
strBuf.Format("Are you sure you want to detach from the project %s?",
|
CString strBuf = m_DialogDetachQuery;
|
||||||
proj->get_project_name());
|
strBuf.Replace("%1", proj->get_project_name());
|
||||||
if(AfxMessageBox(strBuf, MB_YESNO, 0) == IDYES) DetachProject(proj);
|
if(AfxMessageBox(strBuf, MB_YESNO, 0) == IDYES) DetachProject(proj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1293,11 +1297,10 @@ void CMainWindow::DetachProject(PROJECT *proj) {
|
||||||
void CMainWindow::OnCommandProjectReset()
|
void CMainWindow::OnCommandProjectReset()
|
||||||
{
|
{
|
||||||
PROJECT *proj;
|
PROJECT *proj;
|
||||||
CString strBuf;
|
|
||||||
proj = GetProjectFromContextMenu();
|
proj = GetProjectFromContextMenu();
|
||||||
if (!proj) return;
|
if (!proj) return;
|
||||||
strBuf.Format("Are you sure you want to reset the project %s?",
|
CString strBuf = m_DialogResetQuery;
|
||||||
proj->get_project_name());
|
strBuf.Replace("%1", proj->get_project_name());
|
||||||
if(AfxMessageBox(strBuf, MB_YESNO, 0) == IDYES) {
|
if(AfxMessageBox(strBuf, MB_YESNO, 0) == IDYES) {
|
||||||
gstate.reset_project(proj);
|
gstate.reset_project(proj);
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,6 +170,7 @@ protected:
|
||||||
afx_msg void OnTimer(UINT);
|
afx_msg void OnTimer(UINT);
|
||||||
|
|
||||||
CString m_MenuLabelRetryNow, m_MenuLabelGetPreferences;
|
CString m_MenuLabelRetryNow, m_MenuLabelGetPreferences;
|
||||||
|
CString m_DialogResetQuery, m_DialogDetachQuery;
|
||||||
|
|
||||||
DECLARE_MESSAGE_MAP()
|
DECLARE_MESSAGE_MAP()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue