*** empty log message ***

svn path=/trunk/boinc/; revision=3206
This commit is contained in:
Rom Walton 2004-04-02 00:23:16 +00:00
parent 0f1e2f5984
commit 889b7cd8dc
5 changed files with 40 additions and 4 deletions

View File

@ -11246,3 +11246,10 @@ Davaid April 1 2004
gui_rpc_client.C,h
gui_test.C
makefile.gui_test (new)
Rom April 1 2004
- Checkin UI for disabling/enabling network activity from the GUI
client/win/
boinc_gui.rc, .h
wingui_mainwindow.cpp, .h

View File

@ -95,6 +95,7 @@
#define ID_MESSAGE_COPY_TO_CLIP 40043
#define ID_FILE_RUN_BENCHMARKS 40044
#define ID_TRANSFERS_RETRYNOW 40045
#define ID_FILE_TOGGLE_NETWORK_ACCESS 40051
#define ID_FILE_RUN_REQUEST_ALWAYS 40100
#define ID_FILE_RUN_REQUEST_AUTO 40101
#define ID_FILE_RUN_REQUEST_NEVER 40102
@ -104,7 +105,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 140
#define _APS_NEXT_COMMAND_VALUE 40051
#define _APS_NEXT_COMMAND_VALUE 40052
#define _APS_NEXT_CONTROL_VALUE 1035
#define _APS_NEXT_SYMED_VALUE 101
#endif

View File

@ -29,7 +29,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
1 TEXTINCLUDE
BEGIN
"resource.h\0"
"boinc_gui.h\0"
END
2 TEXTINCLUDE
@ -198,6 +198,10 @@ BEGIN
MENUITEM "Run based on &preferences", ID_FILE_RUN_REQUEST_AUTO
MENUITEM "&Suspend", ID_FILE_RUN_REQUEST_NEVER
MENUITEM SEPARATOR
MENUITEM "&Disable BOINC Network Access",
ID_FILE_TOGGLE_NETWORK_ACCESS
, CHECKED
MENUITEM SEPARATOR
MENUITEM "Run &Benchmarks", ID_FILE_RUN_BENCHMARKS
MENUITEM SEPARATOR
MENUITEM "&Hide", ID_FILE_HIDE
@ -302,12 +306,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Space Sciences Laboratory"
VALUE "FileDescription", "boinc_gui"
VALUE "FileVersion", "2, 28, 0, 0\0"
VALUE "FileVersion", "2, 28, 0, 0"
VALUE "InternalName", "boinc_gui"
VALUE "LegalCopyright", "Copyright © 2004 University of California"
VALUE "OriginalFilename", "boinc_gui.exe"
VALUE "ProductName", "BOINC Core Client"
VALUE "ProductVersion", "2, 28, 0, 0\0"
VALUE "ProductVersion", "2, 28, 0, 0"
END
END
BLOCK "VarFileInfo"

View File

@ -21,6 +21,7 @@
#include "wingui_mainwindow.h"
#include "diagnostics.h"
#include ".\wingui_mainwindow.h"
CMyApp g_myApp;
CMainWindow* g_myWnd = NULL;
@ -171,6 +172,7 @@ BEGIN_MESSAGE_MAP(CMainWindow, CWnd)
ON_COMMAND(ID_FILE_RUN_REQUEST_ALWAYS, OnCommandRunRequestAlways)
ON_COMMAND(ID_FILE_RUN_REQUEST_AUTO, OnCommandRunRequestAuto)
ON_COMMAND(ID_FILE_RUN_REQUEST_NEVER, OnCommandRunRequestNever)
ON_COMMAND(ID_FILE_TOGGLE_NETWORK_ACCESS, OnFileDisableNetworkAccess)
ON_COMMAND(ID_FILE_RUN_BENCHMARKS, OnCommandRunBenchmarks)
ON_COMMAND(ID_FILE_HIDE, OnCommandHide)
ON_COMMAND(ID_FILE_EXIT, OnCommandExit)
@ -1514,6 +1516,26 @@ void CMainWindow::OnCommandRunRequestNever()
UpdateRunRequestFileMenu();
}
void CMainWindow::OnFileDisableNetworkAccess()
{
CMenu* pMenu;
UINT uiState;
// Get the File menu
pMenu = GetMenu()->GetSubMenu( 0 );
uiState = pMenu->GetMenuState( ID_FILE_TOGGLE_NETWORK_ACCESS, MF_BYCOMMAND );
ASSERT(uiState != 0xFFFFFFFF);
if ( MF_CHECKED & uiState ) {
pMenu->CheckMenuItem( ID_FILE_TOGGLE_NETWORK_ACCESS, MF_UNCHECKED | MF_BYCOMMAND );
gstate.user_network_request = USER_RUN_REQUEST_ALWAYS;
} else {
pMenu->CheckMenuItem( ID_FILE_TOGGLE_NETWORK_ACCESS, MF_CHECKED | MF_BYCOMMAND );
gstate.user_network_request = USER_RUN_REQUEST_NEVER;
}
}
void CMainWindow::OnCommandRunBenchmarks()
{
gstate.start_cpu_benchmarks();
@ -2269,3 +2291,4 @@ void guiOnBenchmarksEnd()
{
g_myWnd->OnBenchmarksEnd();
}

View File

@ -164,6 +164,7 @@ protected:
afx_msg void OnCommandTransfersRetryNow();
afx_msg void OnCommandFileClearInactive();
afx_msg void OnCommandFileClearMessages();
afx_msg void OnFileDisableNetworkAccess();
afx_msg void OnCommandRunBenchmarks();
afx_msg void OnCommandConnectionHangupIfDialed();
afx_msg void OnCommandConnectionConfirmBeforeConnecting();