More line endings (Part 2, From Rom)

This commit is contained in:
David Anderson 2012-12-21 10:05:01 -08:00 committed by Oliver Bock
parent 58e0757e1d
commit 3e288f7766
22 changed files with 7190 additions and 7190 deletions

View File

@ -1,16 +1,16 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by boinc_cmd.rc
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 109
#define _APS_NEXT_COMMAND_VALUE 40000
#define _APS_NEXT_CONTROL_VALUE 1007
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by boinc_cmd.rc
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 109
#define _APS_NEXT_COMMAND_VALUE 40000
#define _APS_NEXT_CONTROL_VALUE 1007
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif

View File

@ -1,250 +1,250 @@
// Microsoft Visual C++ generated resource script.
//
#include "boinc_cmd.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winresrc.h"
#include "version.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
#if defined(_GRIDREPUBLIC)
#elif defined(_PROGRESSTHRUPROCESSORS)
#elif defined(_WCG)
IDI_MAIN_ICON ICON "res\\wcg.ico"
#else
IDI_MAIN_ICON ICON "res\\icon.ico"
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"boinc_log.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Visual Studio 2005 Compatibility
//
#ifndef IDC_STATIC
#define IDC_STATIC (-1) // all static controls
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
#if defined(_GRIDREPUBLIC)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "GridRepublic"
VALUE "FileDescription", "BOINC Log Conversion Client"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinclog"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinclog.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_PROGRESSTHRUPROCESSORS)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Progress Thru Processors"
VALUE "FileDescription", "BOINC Log Conversion Client"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinclog"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinclog.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_WCG)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "World Community Grid"
VALUE "FileDescription", "BOINC Log Conversion Client"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinclog"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinclog.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#else
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Space Sciences Laboratory"
VALUE "FileDescription", "BOINC Log Conversion Client"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinclog"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinclog.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
// Microsoft Visual C++ generated resource script.
//
#include "boinc_cmd.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winresrc.h"
#include "version.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
#if defined(_GRIDREPUBLIC)
#elif defined(_PROGRESSTHRUPROCESSORS)
#elif defined(_WCG)
IDI_MAIN_ICON ICON "res\\wcg.ico"
#else
IDI_MAIN_ICON ICON "res\\icon.ico"
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"boinc_log.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Visual Studio 2005 Compatibility
//
#ifndef IDC_STATIC
#define IDC_STATIC (-1) // all static controls
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
#if defined(_GRIDREPUBLIC)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "GridRepublic"
VALUE "FileDescription", "BOINC Log Conversion Client"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinclog"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinclog.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_PROGRESSTHRUPROCESSORS)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Progress Thru Processors"
VALUE "FileDescription", "BOINC Log Conversion Client"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinclog"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinclog.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_WCG)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "World Community Grid"
VALUE "FileDescription", "BOINC Log Conversion Client"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinclog"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinclog.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#else
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Space Sciences Laboratory"
VALUE "FileDescription", "BOINC Log Conversion Client"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinclog"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinclog.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -1,67 +1,67 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
#include "boinc_win.h"
#endif
#include "version.h"
#include "daemonmgt.h"
void version(){
printf("boincsvcctrl, built from %s \n", PACKAGE_STRING );
exit(0);
}
void usage() {
fprintf(stderr, "\n\
usage: boincsvcctrl command\n\n\
Commands:\n\
--start start the BOINC service\n\
--stop stop the BOINC service\n\
--version, -V show core client version\n\
"
);
exit(1);
}
int main(int argc, char** argv) {
int i = 1;
int retval = 0;
if (argc < 1) {
usage();
}
if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) {
usage();
}
if (!strcmp(argv[i], "--version") || !strcmp(argv[i], "-V")) {
version();
}
if (!strcmp(argv[i], "--start")) {
retval = !start_daemon();
}
if (!strcmp(argv[i], "--stop")) {
retval = !stop_daemon();
}
exit(retval);
}
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
#include "boinc_win.h"
#endif
#include "version.h"
#include "daemonmgt.h"
void version(){
printf("boincsvcctrl, built from %s \n", PACKAGE_STRING );
exit(0);
}
void usage() {
fprintf(stderr, "\n\
usage: boincsvcctrl command\n\n\
Commands:\n\
--start start the BOINC service\n\
--stop stop the BOINC service\n\
--version, -V show core client version\n\
"
);
exit(1);
}
int main(int argc, char** argv) {
int i = 1;
int retval = 0;
if (argc < 1) {
usage();
}
if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) {
usage();
}
if (!strcmp(argv[i], "--version") || !strcmp(argv[i], "-V")) {
version();
}
if (!strcmp(argv[i], "--start")) {
retval = !start_daemon();
}
if (!strcmp(argv[i], "--stop")) {
retval = !stop_daemon();
}
exit(retval);
}

View File

@ -1,16 +1,16 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by boincsvcctrl.rc
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 109
#define _APS_NEXT_COMMAND_VALUE 40000
#define _APS_NEXT_CONTROL_VALUE 1007
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by boincsvcctrl.rc
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 109
#define _APS_NEXT_COMMAND_VALUE 40000
#define _APS_NEXT_CONTROL_VALUE 1007
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif

View File

@ -1,269 +1,269 @@
// Microsoft Visual C++ generated resource script.
//
#include "boincsvcctrl.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winresrc.h"
#include "version.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"boincsvcctrl.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Visual Studio 2005 Compatibility
//
#ifndef IDC_STATIC
#define IDC_STATIC (-1) // all static controls
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
#if defined (_GRIDREPUBLIC)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "GridRepublic"
VALUE "FileDescription", "BOINC service controller"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boincsvcctrl"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boincsvcctrl.exe"
VALUE "ProductName", "BOINC core client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_PROGRESSTHRUPROCESSORS)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Progress Thru Processors"
VALUE "FileDescription", "BOINC service controller"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boincsvcctrl"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boincsvcctrl.exe"
VALUE "ProductName", "BOINC core client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_CHARITYENGINE)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Charity Engine"
VALUE "FileDescription", "BOINC service controller"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boincsvcctrl"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boincsvcctrl.exe"
VALUE "ProductName", "BOINC core client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_WCG)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "World Community Grid"
VALUE "FileDescription", "BOINC service controller"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boincsvcctrl"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boincsvcctrl.exe"
VALUE "ProductName", "BOINC core client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#else
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Space Sciences Laboratory"
VALUE "FileDescription", "BOINC service controller"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boincsvcctrl"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boincsvcctrl.exe"
VALUE "ProductName", "BOINC core client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
// Microsoft Visual C++ generated resource script.
//
#include "boincsvcctrl.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winresrc.h"
#include "version.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"boincsvcctrl.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Visual Studio 2005 Compatibility
//
#ifndef IDC_STATIC
#define IDC_STATIC (-1) // all static controls
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
#if defined (_GRIDREPUBLIC)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "GridRepublic"
VALUE "FileDescription", "BOINC service controller"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boincsvcctrl"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boincsvcctrl.exe"
VALUE "ProductName", "BOINC core client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_PROGRESSTHRUPROCESSORS)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Progress Thru Processors"
VALUE "FileDescription", "BOINC service controller"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boincsvcctrl"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boincsvcctrl.exe"
VALUE "ProductName", "BOINC core client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_CHARITYENGINE)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Charity Engine"
VALUE "FileDescription", "BOINC service controller"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boincsvcctrl"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boincsvcctrl.exe"
VALUE "ProductName", "BOINC core client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_WCG)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "World Community Grid"
VALUE "FileDescription", "BOINC service controller"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boincsvcctrl"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boincsvcctrl.exe"
VALUE "ProductName", "BOINC core client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#else
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Space Sciences Laboratory"
VALUE "FileDescription", "BOINC service controller"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boincsvcctrl"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boincsvcctrl.exe"
VALUE "ProductName", "BOINC core client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

File diff suppressed because it is too large Load Diff

View File

@ -1,191 +1,191 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#ifndef _DLGEVENTLOG_H_
#define _DLGEVENTLOG_H_
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "DlgEventLog.cpp"
#endif
#define EVENT_LOG_STRIPES 1
#define EVENT_LOG_RULES 1
#if EVENT_LOG_RULES
#define EVENT_LOG_DEFAULT_LIST_MULTI_SEL_FLAGS wxLC_REPORT | wxLC_VIRTUAL | wxLC_HRULES
#else
#define EVENT_LOG_DEFAULT_LIST_MULTI_SEL_FLAGS wxLC_REPORT | wxLC_VIRTUAL
#endif
/*!
* Includes
*/
////@begin includes
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
class CDlgEventLogListCtrl;
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DLGEVENTLOG 30000
#define SYMBOL_CDLGEVENTLOG_STYLE wxDEFAULT_DIALOG_STYLE|wxDIALOG_NO_PARENT|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER
#define SYMBOL_CDLGEVENTLOG_TITLE wxT("")
#define SYMBOL_CDLGEVENTLOG_IDNAME ID_DLGEVENTLOG
#define SYMBOL_CDLGEVENTLOG_SIZE wxDefaultSize
#define SYMBOL_CDLGEVENTLOG_POSITION wxDefaultPosition
#define ID_COPYSELECTED 10001
#define ID_COPYAll 10002
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
#ifndef wxFIXED_MINSIZE
#define wxFIXED_MINSIZE 0
#endif
class CDlgEventLog : public wxDialog
{
DECLARE_DYNAMIC_CLASS( CDlgEventLog )
DECLARE_EVENT_TABLE()
public:
/// Constructors
CDlgEventLog( wxWindow* parent = NULL, wxWindowID id = SYMBOL_CDLGEVENTLOG_IDNAME, const wxString& caption = SYMBOL_CDLGEVENTLOG_TITLE, const wxPoint& pos = SYMBOL_CDLGEVENTLOG_POSITION, const wxSize& size = SYMBOL_CDLGEVENTLOG_SIZE, long style = SYMBOL_CDLGEVENTLOG_STYLE );
~CDlgEventLog();
/// Creation
bool Create( wxWindow* parent = NULL, wxWindowID id = SYMBOL_CDLGEVENTLOG_IDNAME, const wxString& caption = SYMBOL_CDLGEVENTLOG_TITLE, const wxPoint& pos = SYMBOL_CDLGEVENTLOG_POSITION, const wxSize& size = SYMBOL_CDLGEVENTLOG_SIZE, long style = SYMBOL_CDLGEVENTLOG_STYLE );
/// Creates the controls and sizers
void CreateControls();
/// Sets text for m_pFilterButton
void SetFilterButtonText();
/// Text color selection
void SetTextColor();
////@begin CDlgEventLog event handler declarations
/// wxEVT_HELP event handler for ID_DLGEVENTLOG
void OnHelp( wxHelpEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
void OnOK( wxCommandEvent& event );
/// wxEVT_CLOSE event handler for CDlgEventLog (window close control clicked)
void OnClose(wxCloseEvent& event);
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_COPYAll
void OnMessagesCopyAll( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_COPYSELECTED
void OnMessagesCopySelected( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_TASK_MESSAGES_FILTERBYPROJECT
void OnMessagesFilter( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SIMPLE_HELP
void OnButtonHelp( wxCommandEvent& event );
/// called from CMainDocument::HandleCompletedRPC() after wxEVT_RPC_FINISHED event
void OnRefresh();
////@end CDlgEventLog event handler declarations
////@begin CDlgEventLog member function declarations
////@end CDlgEventLog member function declarations
virtual wxInt32 GetFilteredMessageIndex( wxInt32 iRow) const;
virtual wxInt32 GetDocCount();
virtual wxString OnListGetItemText( long item, long column ) const;
virtual wxListItemAttr* OnListGetItemAttr( long item ) const;
bool OnSaveState(wxConfigBase* pConfig);
bool OnRestoreState(wxConfigBase* pConfig);
void UpdateButtons();
private:
////@begin CDlgEventLog member variables
////@end CDlgEventLog member variables
wxTimer* m_pRefreshTimer;
wxInt32 m_iPreviousDocCount;
CDlgEventLogListCtrl* m_pList;
wxArrayInt m_iFilteredIndexes;
wxInt32 m_iTotalDocCount;
wxInt32 m_iFilteredDocCount;
wxInt32 m_iPreviousTotalDocCount;
wxInt32 m_iPreviousRowCount;
wxButton* m_pFilterButton;
wxButton* m_pCopySelectedButton;
wxListItemAttr* m_pMessageInfoAttr;
wxListItemAttr* m_pMessageErrorAttr;
wxListItemAttr* m_pMessageInfoGrayAttr;
wxListItemAttr* m_pMessageErrorGrayAttr;
bool m_bProcessingRefreshEvent;
bool m_bEventLogIsOpen;
bool SaveState();
bool RestoreState();
void GetWindowDimensions( wxPoint& position, wxSize& size );
void SetWindowDimensions();
void OnSize(wxSizeEvent& event);
void OnMove(wxMoveEvent& event);
void OnMouseUp(wxMouseEvent& event);
void ResetMessageFiltering();
bool EnsureLastItemVisible();
wxInt32 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
wxInt32 FormatTime( wxInt32 item, wxString& strBuffer ) const;
wxInt32 FormatMessage( wxInt32 item, wxString& strBuffer ) const;
#ifdef wxUSE_CLIPBOARD
bool m_bClipboardOpen;
wxString m_strClipboardData;
bool OpenClipboard( wxInt32 size );
wxInt32 CopyToClipboard( wxInt32 item );
bool CloseClipboard();
#endif
};
#endif // end CDlgMessages
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#ifndef _DLGEVENTLOG_H_
#define _DLGEVENTLOG_H_
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "DlgEventLog.cpp"
#endif
#define EVENT_LOG_STRIPES 1
#define EVENT_LOG_RULES 1
#if EVENT_LOG_RULES
#define EVENT_LOG_DEFAULT_LIST_MULTI_SEL_FLAGS wxLC_REPORT | wxLC_VIRTUAL | wxLC_HRULES
#else
#define EVENT_LOG_DEFAULT_LIST_MULTI_SEL_FLAGS wxLC_REPORT | wxLC_VIRTUAL
#endif
/*!
* Includes
*/
////@begin includes
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
class CDlgEventLogListCtrl;
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DLGEVENTLOG 30000
#define SYMBOL_CDLGEVENTLOG_STYLE wxDEFAULT_DIALOG_STYLE|wxDIALOG_NO_PARENT|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER
#define SYMBOL_CDLGEVENTLOG_TITLE wxT("")
#define SYMBOL_CDLGEVENTLOG_IDNAME ID_DLGEVENTLOG
#define SYMBOL_CDLGEVENTLOG_SIZE wxDefaultSize
#define SYMBOL_CDLGEVENTLOG_POSITION wxDefaultPosition
#define ID_COPYSELECTED 10001
#define ID_COPYAll 10002
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
#ifndef wxFIXED_MINSIZE
#define wxFIXED_MINSIZE 0
#endif
class CDlgEventLog : public wxDialog
{
DECLARE_DYNAMIC_CLASS( CDlgEventLog )
DECLARE_EVENT_TABLE()
public:
/// Constructors
CDlgEventLog( wxWindow* parent = NULL, wxWindowID id = SYMBOL_CDLGEVENTLOG_IDNAME, const wxString& caption = SYMBOL_CDLGEVENTLOG_TITLE, const wxPoint& pos = SYMBOL_CDLGEVENTLOG_POSITION, const wxSize& size = SYMBOL_CDLGEVENTLOG_SIZE, long style = SYMBOL_CDLGEVENTLOG_STYLE );
~CDlgEventLog();
/// Creation
bool Create( wxWindow* parent = NULL, wxWindowID id = SYMBOL_CDLGEVENTLOG_IDNAME, const wxString& caption = SYMBOL_CDLGEVENTLOG_TITLE, const wxPoint& pos = SYMBOL_CDLGEVENTLOG_POSITION, const wxSize& size = SYMBOL_CDLGEVENTLOG_SIZE, long style = SYMBOL_CDLGEVENTLOG_STYLE );
/// Creates the controls and sizers
void CreateControls();
/// Sets text for m_pFilterButton
void SetFilterButtonText();
/// Text color selection
void SetTextColor();
////@begin CDlgEventLog event handler declarations
/// wxEVT_HELP event handler for ID_DLGEVENTLOG
void OnHelp( wxHelpEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
void OnOK( wxCommandEvent& event );
/// wxEVT_CLOSE event handler for CDlgEventLog (window close control clicked)
void OnClose(wxCloseEvent& event);
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_COPYAll
void OnMessagesCopyAll( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_COPYSELECTED
void OnMessagesCopySelected( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_TASK_MESSAGES_FILTERBYPROJECT
void OnMessagesFilter( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SIMPLE_HELP
void OnButtonHelp( wxCommandEvent& event );
/// called from CMainDocument::HandleCompletedRPC() after wxEVT_RPC_FINISHED event
void OnRefresh();
////@end CDlgEventLog event handler declarations
////@begin CDlgEventLog member function declarations
////@end CDlgEventLog member function declarations
virtual wxInt32 GetFilteredMessageIndex( wxInt32 iRow) const;
virtual wxInt32 GetDocCount();
virtual wxString OnListGetItemText( long item, long column ) const;
virtual wxListItemAttr* OnListGetItemAttr( long item ) const;
bool OnSaveState(wxConfigBase* pConfig);
bool OnRestoreState(wxConfigBase* pConfig);
void UpdateButtons();
private:
////@begin CDlgEventLog member variables
////@end CDlgEventLog member variables
wxTimer* m_pRefreshTimer;
wxInt32 m_iPreviousDocCount;
CDlgEventLogListCtrl* m_pList;
wxArrayInt m_iFilteredIndexes;
wxInt32 m_iTotalDocCount;
wxInt32 m_iFilteredDocCount;
wxInt32 m_iPreviousTotalDocCount;
wxInt32 m_iPreviousRowCount;
wxButton* m_pFilterButton;
wxButton* m_pCopySelectedButton;
wxListItemAttr* m_pMessageInfoAttr;
wxListItemAttr* m_pMessageErrorAttr;
wxListItemAttr* m_pMessageInfoGrayAttr;
wxListItemAttr* m_pMessageErrorGrayAttr;
bool m_bProcessingRefreshEvent;
bool m_bEventLogIsOpen;
bool SaveState();
bool RestoreState();
void GetWindowDimensions( wxPoint& position, wxSize& size );
void SetWindowDimensions();
void OnSize(wxSizeEvent& event);
void OnMove(wxMoveEvent& event);
void OnMouseUp(wxMouseEvent& event);
void ResetMessageFiltering();
bool EnsureLastItemVisible();
wxInt32 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
wxInt32 FormatTime( wxInt32 item, wxString& strBuffer ) const;
wxInt32 FormatMessage( wxInt32 item, wxString& strBuffer ) const;
#ifdef wxUSE_CLIPBOARD
bool m_bClipboardOpen;
wxString m_strClipboardData;
bool OpenClipboard( wxInt32 size );
wxInt32 CopyToClipboard( wxInt32 item );
bool CloseClipboard();
#endif
};
#endif // end CDlgMessages

View File

@ -1,95 +1,95 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation "DlgEventLogListCtrl.h"
#endif
#include "stdwx.h"
#include "diagnostics.h"
#include "util.h"
#include "mfile.h"
#include "miofile.h"
#include "parse.h"
#include "error_numbers.h"
#include "BOINCGUIApp.h"
#include "SkinManager.h"
#include "MainDocument.h"
#include "DlgEventLogListCtrl.h"
#include "DlgEventLog.h"
IMPLEMENT_DYNAMIC_CLASS(CDlgEventLogListCtrl, DLG_LISTCTRL_BASE)
BEGIN_EVENT_TABLE(CDlgEventLogListCtrl, DLG_LISTCTRL_BASE)
EVT_LEFT_UP(CDlgEventLogListCtrl::OnMouseUp)
END_EVENT_TABLE()
CDlgEventLogListCtrl::CDlgEventLogListCtrl() {}
CDlgEventLogListCtrl::CDlgEventLogListCtrl(CDlgEventLog* pView, wxWindowID iListWindowID, wxInt32 iListWindowFlags)
: DLG_LISTCTRL_BASE(pView, iListWindowID, wxDefaultPosition, wxDefaultSize, iListWindowFlags)
{
m_pParentView = pView;
m_bIsSingleSelection = (iListWindowFlags & wxLC_SINGLE_SEL) ? true : false ;
#ifdef __WXMAC__
SetupMacAccessibilitySupport();
#endif
}
#ifdef __WXMAC__
CDlgEventLogListCtrl::~CDlgEventLogListCtrl()
{
RemoveMacAccessibilitySupport();
}
#endif
wxString CDlgEventLogListCtrl::OnGetItemText(long item, long column) const {
wxASSERT(m_pParentView);
wxASSERT(wxDynamicCast(m_pParentView, CDlgEventLog));
return m_pParentView->OnListGetItemText(item, column);
}
int CDlgEventLogListCtrl::OnGetItemImage(long /* item */) const {
return 1;
}
wxListItemAttr* CDlgEventLogListCtrl::OnGetItemAttr(long item) const {
wxASSERT(m_pParentView);
wxASSERT(wxDynamicCast(m_pParentView, CDlgEventLog));
return m_pParentView->OnListGetItemAttr(item);
}
wxColour CDlgEventLogListCtrl::GetBackgroundColour() {
return *wxWHITE;
}
void CDlgEventLogListCtrl::OnMouseUp(wxMouseEvent& event) {
m_pParentView->UpdateButtons();
event.Skip();
}
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation "DlgEventLogListCtrl.h"
#endif
#include "stdwx.h"
#include "diagnostics.h"
#include "util.h"
#include "mfile.h"
#include "miofile.h"
#include "parse.h"
#include "error_numbers.h"
#include "BOINCGUIApp.h"
#include "SkinManager.h"
#include "MainDocument.h"
#include "DlgEventLogListCtrl.h"
#include "DlgEventLog.h"
IMPLEMENT_DYNAMIC_CLASS(CDlgEventLogListCtrl, DLG_LISTCTRL_BASE)
BEGIN_EVENT_TABLE(CDlgEventLogListCtrl, DLG_LISTCTRL_BASE)
EVT_LEFT_UP(CDlgEventLogListCtrl::OnMouseUp)
END_EVENT_TABLE()
CDlgEventLogListCtrl::CDlgEventLogListCtrl() {}
CDlgEventLogListCtrl::CDlgEventLogListCtrl(CDlgEventLog* pView, wxWindowID iListWindowID, wxInt32 iListWindowFlags)
: DLG_LISTCTRL_BASE(pView, iListWindowID, wxDefaultPosition, wxDefaultSize, iListWindowFlags)
{
m_pParentView = pView;
m_bIsSingleSelection = (iListWindowFlags & wxLC_SINGLE_SEL) ? true : false ;
#ifdef __WXMAC__
SetupMacAccessibilitySupport();
#endif
}
#ifdef __WXMAC__
CDlgEventLogListCtrl::~CDlgEventLogListCtrl()
{
RemoveMacAccessibilitySupport();
}
#endif
wxString CDlgEventLogListCtrl::OnGetItemText(long item, long column) const {
wxASSERT(m_pParentView);
wxASSERT(wxDynamicCast(m_pParentView, CDlgEventLog));
return m_pParentView->OnListGetItemText(item, column);
}
int CDlgEventLogListCtrl::OnGetItemImage(long /* item */) const {
return 1;
}
wxListItemAttr* CDlgEventLogListCtrl::OnGetItemAttr(long item) const {
wxASSERT(m_pParentView);
wxASSERT(wxDynamicCast(m_pParentView, CDlgEventLog));
return m_pParentView->OnListGetItemAttr(item);
}
wxColour CDlgEventLogListCtrl::GetBackgroundColour() {
return *wxWHITE;
}
void CDlgEventLogListCtrl::OnMouseUp(wxMouseEvent& event) {
m_pParentView->UpdateButtons();
event.Skip();
}

View File

@ -1,71 +1,71 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#ifndef _DLGEVENTLOGLISTCTRL_H_
#define _DLGEVENTLOGLISTCTRL_H_
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "DlgEventLogListCtrl.cpp"
#endif
#ifdef __WXMAC__
#include "macAccessiblity.h"
#define DLG_LISTCTRL_BASE wxGenericListCtrl
#else
#define DLG_LISTCTRL_BASE wxListView
#endif
class CDlgEventLog;
class CDlgEventLogListCtrl : public DLG_LISTCTRL_BASE
{
DECLARE_DYNAMIC_CLASS(CDlgEventLogListCtrl)
DECLARE_EVENT_TABLE()
public:
CDlgEventLogListCtrl();
CDlgEventLogListCtrl(CDlgEventLog* pView, wxWindowID iListWindowID, int iListWindowFlags);
#ifdef __WXMAC__
~CDlgEventLogListCtrl();
#endif
private:
virtual wxString OnGetItemText(long item, long column) const;
virtual int OnGetItemImage(long item) const;
virtual wxListItemAttr* OnGetItemAttr(long item) const;
virtual wxColour GetBackgroundColour();
void OnMouseUp(wxMouseEvent& event);
bool m_bIsSingleSelection;
CDlgEventLog* m_pParentView;
#ifdef __WXMAC__
void SetupMacAccessibilitySupport();
void RemoveMacAccessibilitySupport();
ListAccessData accessibilityHandlerData;
EventHandlerRef m_pHeaderAccessibilityEventHandlerRef;
EventHandlerRef m_pBodyAccessibilityEventHandlerRef;
#endif
};
#endif
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#ifndef _DLGEVENTLOGLISTCTRL_H_
#define _DLGEVENTLOGLISTCTRL_H_
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "DlgEventLogListCtrl.cpp"
#endif
#ifdef __WXMAC__
#include "macAccessiblity.h"
#define DLG_LISTCTRL_BASE wxGenericListCtrl
#else
#define DLG_LISTCTRL_BASE wxListView
#endif
class CDlgEventLog;
class CDlgEventLogListCtrl : public DLG_LISTCTRL_BASE
{
DECLARE_DYNAMIC_CLASS(CDlgEventLogListCtrl)
DECLARE_EVENT_TABLE()
public:
CDlgEventLogListCtrl();
CDlgEventLogListCtrl(CDlgEventLog* pView, wxWindowID iListWindowID, int iListWindowFlags);
#ifdef __WXMAC__
~CDlgEventLogListCtrl();
#endif
private:
virtual wxString OnGetItemText(long item, long column) const;
virtual int OnGetItemImage(long item) const;
virtual wxListItemAttr* OnGetItemAttr(long item) const;
virtual wxColour GetBackgroundColour();
void OnMouseUp(wxMouseEvent& event);
bool m_bIsSingleSelection;
CDlgEventLog* m_pParentView;
#ifdef __WXMAC__
void SetupMacAccessibilitySupport();
void RemoveMacAccessibilitySupport();
ListAccessData accessibilityHandlerData;
EventHandlerRef m_pHeaderAccessibilityEventHandlerRef;
EventHandlerRef m_pBodyAccessibilityEventHandlerRef;
#endif
};
#endif

View File

@ -1,114 +1,114 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _DLGEXITMESSAGE_H_
#define _DLGEXITMESSAGE_H_
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "DlgExitMessage.cpp"
#endif
/*!
* Includes
*/
////@begin includes
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#ifdef __WXMAC__
#define SYMBOL_CDLGEXITMESSAGE_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX
#else
#define SYMBOL_CDLGEXITMESSAGE_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#endif
#define SYMBOL_CDLGEXITMESSAGE_TITLE _T("")
#define SYMBOL_CDLGEXITMESSAGE_IDNAME ID_DIALOG
#define SYMBOL_CDLGEXITMESSAGE_SIZE wxSize(400, 300)
#define SYMBOL_CDLGEXITMESSAGE_POSITION wxDefaultPosition
#define ID_CDLGEXITMESSAGE_SHUTDOWNCORECLIENT 10017
#define ID_CDLGEXITMESSAGE_DISPLAY 10018
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
#ifndef wxFIXED_MINSIZE
#define wxFIXED_MINSIZE 0
#endif
/*!
* CDlgExitMessage class declaration
*/
class CDlgExitMessage: public wxDialog
{
DECLARE_DYNAMIC_CLASS( CDlgExitMessage )
DECLARE_EVENT_TABLE()
public:
/// Constructors
CDlgExitMessage( );
CDlgExitMessage( wxWindow* parent, wxWindowID id = SYMBOL_CDLGEXITMESSAGE_IDNAME, const wxString& caption = SYMBOL_CDLGEXITMESSAGE_TITLE, const wxPoint& pos = SYMBOL_CDLGEXITMESSAGE_POSITION, const wxSize& size = SYMBOL_CDLGEXITMESSAGE_SIZE, long style = SYMBOL_CDLGEXITMESSAGE_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CDLGEXITMESSAGE_IDNAME, const wxString& caption = SYMBOL_CDLGEXITMESSAGE_TITLE, const wxPoint& pos = SYMBOL_CDLGEXITMESSAGE_POSITION, const wxSize& size = SYMBOL_CDLGEXITMESSAGE_SIZE, long style = SYMBOL_CDLGEXITMESSAGE_STYLE );
/// Creates the controls and sizers
void CreateControls();
////@begin CDlgExitMessage event handler declarations
////@end CDlgExitMessage event handler declarations
////@begin CDlgExitMessage member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end CDlgExitMessage member function declarations
/// Should we show tooltips?
static bool ShowToolTips();
////@begin CDlgExitMessage member variables
wxStaticText* m_DialogExitMessage;
wxCheckBox* m_DialogShutdownCoreClient;
wxCheckBox* m_DialogDisplay;
////@end CDlgExitMessage member variables
};
#endif
// _DLGEXITMESSAGE_H_
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _DLGEXITMESSAGE_H_
#define _DLGEXITMESSAGE_H_
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "DlgExitMessage.cpp"
#endif
/*!
* Includes
*/
////@begin includes
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#ifdef __WXMAC__
#define SYMBOL_CDLGEXITMESSAGE_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX
#else
#define SYMBOL_CDLGEXITMESSAGE_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#endif
#define SYMBOL_CDLGEXITMESSAGE_TITLE _T("")
#define SYMBOL_CDLGEXITMESSAGE_IDNAME ID_DIALOG
#define SYMBOL_CDLGEXITMESSAGE_SIZE wxSize(400, 300)
#define SYMBOL_CDLGEXITMESSAGE_POSITION wxDefaultPosition
#define ID_CDLGEXITMESSAGE_SHUTDOWNCORECLIENT 10017
#define ID_CDLGEXITMESSAGE_DISPLAY 10018
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
#ifndef wxFIXED_MINSIZE
#define wxFIXED_MINSIZE 0
#endif
/*!
* CDlgExitMessage class declaration
*/
class CDlgExitMessage: public wxDialog
{
DECLARE_DYNAMIC_CLASS( CDlgExitMessage )
DECLARE_EVENT_TABLE()
public:
/// Constructors
CDlgExitMessage( );
CDlgExitMessage( wxWindow* parent, wxWindowID id = SYMBOL_CDLGEXITMESSAGE_IDNAME, const wxString& caption = SYMBOL_CDLGEXITMESSAGE_TITLE, const wxPoint& pos = SYMBOL_CDLGEXITMESSAGE_POSITION, const wxSize& size = SYMBOL_CDLGEXITMESSAGE_SIZE, long style = SYMBOL_CDLGEXITMESSAGE_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CDLGEXITMESSAGE_IDNAME, const wxString& caption = SYMBOL_CDLGEXITMESSAGE_TITLE, const wxPoint& pos = SYMBOL_CDLGEXITMESSAGE_POSITION, const wxSize& size = SYMBOL_CDLGEXITMESSAGE_SIZE, long style = SYMBOL_CDLGEXITMESSAGE_STYLE );
/// Creates the controls and sizers
void CreateControls();
////@begin CDlgExitMessage event handler declarations
////@end CDlgExitMessage event handler declarations
////@begin CDlgExitMessage member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end CDlgExitMessage member function declarations
/// Should we show tooltips?
static bool ShowToolTips();
////@begin CDlgExitMessage member variables
wxStaticText* m_DialogExitMessage;
wxCheckBox* m_DialogShutdownCoreClient;
wxCheckBox* m_DialogDisplay;
////@end CDlgExitMessage member variables
};
#endif
// _DLGEXITMESSAGE_H_

View File

@ -1,70 +1,70 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _DLGITEMPROPERTIES_H_
#define _DLGITEMPROPERTIES_H_
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "DlgItemProperties.cpp"
#endif
#include <wx/intl.h>
#include <wx/gdicmn.h>
#include <wx/gbsizer.h>
#include <wx/sizer.h>
#include <wx/scrolwin.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/string.h>
#include <wx/button.h>
#include <wx/dialog.h>
#include "MainDocument.h"
class CDlgItemProperties : public wxDialog {
DECLARE_DYNAMIC_CLASS( CDlgItemProperties )
DECLARE_EVENT_TABLE()
public:
CDlgItemProperties(wxWindow* parent=NULL);//to act as standard constructor set a default value
virtual ~CDlgItemProperties();
//
void renderInfos(PROJECT* project);
void renderInfos(RESULT* result);
void show_rsc(wxString rsc_name, RSC_DESC rsc_desc);
private:
int m_current_row;
//formatting methods
wxString FormatDiskSpace(double bytes);
wxString FormatApplicationName(RESULT* result );
wxString FormatTime(float fBuffer);
//generic layout methods
bool SaveState();
bool RestoreState();
void addSection(const wxString& title);
void addProperty(const wxString& name, const wxString& value);
protected:
wxBoxSizer* m_bSizer1;
wxScrolledWindow* m_scrolledWindow;
wxGridBagSizer* m_gbSizer;
wxButton* m_btnClose;
wxString m_strBaseConfigLocation;
};
#endif // _DLGITEMPROPERTIES_H_
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _DLGITEMPROPERTIES_H_
#define _DLGITEMPROPERTIES_H_
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "DlgItemProperties.cpp"
#endif
#include <wx/intl.h>
#include <wx/gdicmn.h>
#include <wx/gbsizer.h>
#include <wx/sizer.h>
#include <wx/scrolwin.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/string.h>
#include <wx/button.h>
#include <wx/dialog.h>
#include "MainDocument.h"
class CDlgItemProperties : public wxDialog {
DECLARE_DYNAMIC_CLASS( CDlgItemProperties )
DECLARE_EVENT_TABLE()
public:
CDlgItemProperties(wxWindow* parent=NULL);//to act as standard constructor set a default value
virtual ~CDlgItemProperties();
//
void renderInfos(PROJECT* project);
void renderInfos(RESULT* result);
void show_rsc(wxString rsc_name, RSC_DESC rsc_desc);
private:
int m_current_row;
//formatting methods
wxString FormatDiskSpace(double bytes);
wxString FormatApplicationName(RESULT* result );
wxString FormatTime(float fBuffer);
//generic layout methods
bool SaveState();
bool RestoreState();
void addSection(const wxString& title);
void addProperty(const wxString& name, const wxString& value);
protected:
wxBoxSizer* m_bSizer1;
wxScrolledWindow* m_scrolledWindow;
wxGridBagSizer* m_gbSizer;
wxButton* m_btnClose;
wxString m_strBaseConfigLocation;
};
#endif // _DLGITEMPROPERTIES_H_

View File

@ -1,306 +1,306 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation "TermsOfUsePage.h"
#endif
#include "stdwx.h"
#include "diagnostics.h"
#include "util.h"
#include "mfile.h"
#include "miofile.h"
#include "parse.h"
#include "error_numbers.h"
#include "wizardex.h"
#include "error_numbers.h"
#include "BOINCGUIApp.h"
#include "SkinManager.h"
#include "MainDocument.h"
#include "BOINCBaseWizard.h"
#include "WizardAttach.h"
#include "TermsOfUsePage.h"
/*!
* CTermsOfUsePage type definition
*/
IMPLEMENT_DYNAMIC_CLASS( CTermsOfUsePage, wxWizardPageEx )
/*!
* CTermsOfUsePage event table definition
*/
BEGIN_EVENT_TABLE( CTermsOfUsePage, wxWizardPageEx )
////@begin CTermsOfUsePage event table entries
EVT_WIZARDEX_PAGE_CHANGED( -1, CTermsOfUsePage::OnPageChanged )
EVT_WIZARDEX_PAGE_CHANGING( -1, CTermsOfUsePage::OnPageChanging )
EVT_WIZARDEX_CANCEL( -1, CTermsOfUsePage::OnCancel )
EVT_RADIOBUTTON( ID_TERMSOFUSEAGREECTRL, CTermsOfUsePage::OnTermsOfUseStatusChange )
EVT_RADIOBUTTON( ID_TERMSOFUSEDISAGREECTRL, CTermsOfUsePage::OnTermsOfUseStatusChange )
////@end CTermsOfUsePage event table entries
END_EVENT_TABLE()
/*!
* CTermsOfUsePage constructors
*/
CTermsOfUsePage::CTermsOfUsePage( )
{
}
CTermsOfUsePage::CTermsOfUsePage( CBOINCBaseWizard* parent )
{
Create( parent );
}
/*!
* CTermsOfUsePage creator
*/
bool CTermsOfUsePage::Create( CBOINCBaseWizard* parent )
{
////@begin CTermsOfUsePage member initialisation
m_pTitleStaticCtrl = NULL;
m_pDirectionsStaticCtrl = NULL;
m_pTermsOfUseCtrl = NULL;
m_pAgreeCtrl = NULL;
m_pDisagreeCtrl = NULL;
////@end CTermsOfUsePage member initialisation
m_bUserAgrees = false;
m_bCredentialsAlreadyAvailable = false;
////@begin CTermsOfUsePage creation
wxWizardPageEx::Create( parent, ID_TERMSOFUSEPAGE );
CreateControls();
GetSizer()->Fit(this);
////@end CTermsOfUsePage creation
return TRUE;
}
/*!
* Control creation for CTermsOfUsePage
*/
void CTermsOfUsePage::CreateControls()
{
////@begin CTermsOfUsePage content construction
CTermsOfUsePage* itemWizardPage96 = this;
wxBoxSizer* itemBoxSizer97 = new wxBoxSizer(wxVERTICAL);
itemWizardPage96->SetSizer(itemBoxSizer97);
m_pTitleStaticCtrl = new wxStaticText;
m_pTitleStaticCtrl->Create( itemWizardPage96, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_pTitleStaticCtrl->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana")));
itemBoxSizer97->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
itemBoxSizer97->Add(5, 5, 0, wxALIGN_LEFT|wxALL, 5);
m_pDirectionsStaticCtrl = new wxStaticText;
m_pDirectionsStaticCtrl->Create( itemWizardPage96, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer97->Add(m_pDirectionsStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
m_pTermsOfUseCtrl = new wxTextCtrl;
m_pTermsOfUseCtrl->Create( itemWizardPage96, ID_TERMSOFUSECTRL, wxEmptyString, wxDefaultPosition, wxSize(300, 125), wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH );
itemBoxSizer97->Add(m_pTermsOfUseCtrl, 0, wxGROW|wxALL, 5);
m_pAgreeCtrl = new wxRadioButton;
m_pAgreeCtrl->Create( itemWizardPage96, ID_TERMSOFUSEAGREECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_pAgreeCtrl->SetValue(false);
itemBoxSizer97->Add(m_pAgreeCtrl, 0, wxALIGN_LEFT|wxALL, 5);
m_pDisagreeCtrl = new wxRadioButton;
m_pDisagreeCtrl->Create( itemWizardPage96, ID_TERMSOFUSEDISAGREECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_pDisagreeCtrl->SetValue(true);
itemBoxSizer97->Add(m_pDisagreeCtrl, 0, wxALIGN_LEFT|wxALL, 5);
////@end CTermsOfUsePage content construction
}
/*!
* Gets the previous page.
*/
wxWizardPageEx* CTermsOfUsePage::GetPrev() const
{
return PAGE_TRANSITION_BACK;
}
/*!
* Gets the next page.
*/
wxWizardPageEx* CTermsOfUsePage::GetNext() const
{
if (CHECK_CLOSINGINPROGRESS()) {
// Cancel Event Detected
return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE);
} else if (IS_ATTACHTOPROJECTWIZARD() && GetUserAgrees() && GetCredentialsAlreadyAvailable()) {
return PAGE_TRANSITION_NEXT(ID_PROJECTPROCESSINGPAGE);
} else if (IS_ACCOUNTMANAGERWIZARD() && GetUserAgrees() && GetCredentialsAlreadyAvailable()) {
return PAGE_TRANSITION_NEXT(ID_ACCOUNTMANAGERPROCESSINGPAGE);
} else if (GetUserAgrees()) {
return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE);
} else {
return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE);
}
return NULL;
}
/*!
* Should we show tooltips?
*/
bool CTermsOfUsePage::ShowToolTips()
{
return TRUE;
}
/*!
* Get bitmap resources
*/
wxBitmap CTermsOfUsePage::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
////@begin CTermsOfUsePage bitmap retrieval
return wxNullBitmap;
////@end CTermsOfUsePage bitmap retrieval
}
/*!
* Get icon resources
*/
wxIcon CTermsOfUsePage::GetIconResource( const wxString& WXUNUSED(name) )
{
// Icon retrieval
////@begin CTermsOfUsePage icon retrieval
return wxNullIcon;
////@end CTermsOfUsePage icon retrieval
}
/*!
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_TERMSOFUSEPAGE
*/
void CTermsOfUsePage::OnPageChanged( wxWizardExEvent& event ) {
if (event.GetDirection() == false) return;
PROJECT_CONFIG& pc = ((CWizardAttach*)GetParent())->project_config;
wxASSERT(m_pTitleStaticCtrl);
wxASSERT(m_pDirectionsStaticCtrl);
m_pTitleStaticCtrl->SetLabel(
_("Terms of Use")
);
m_pDirectionsStaticCtrl->SetLabel(
_("Please read the following terms of use:")
);
m_pTermsOfUseCtrl->SetValue(
wxString(pc.terms_of_use.c_str(), wxConvUTF8)
);
m_pTermsOfUseCtrl->SetSelection(0,0);
m_pAgreeCtrl->SetLabel(
_("I agree to the terms of use.")
);
m_pAgreeCtrl->SetValue(false);
m_pDisagreeCtrl->SetLabel(
_("I do not agree with the terms of use.")
);
m_pDisagreeCtrl->SetValue(true);
SetUserAgrees(false);
((CWizardAttach*)GetParent())->DisableNextButton();
Fit();
}
/*!
* wxEVT_WIZARD_PAGE_CHANGING event handler for ID_TERMSOFUSEPAGE
*/
void CTermsOfUsePage::OnPageChanging( wxWizardExEvent& event ) {
CWizardAttach* pWA = ((CWizardAttach*)GetParent());
wxASSERT(pWA);
wxASSERT(wxDynamicCast(pWA, CWizardAttach));
// If the user has left the terms of use disagree radio button
// selected, then the next button is disabled and needs to be
// re-enabled if the back button is pressed.
pWA->EnableNextButton();
if (event.GetDirection() == false) return;
if (!CHECK_CLOSINGINPROGRESS()) {
// We are leaving this page.
// Determine if the account settings are already pre-populated.
// If so, advance to the Account Manager Processing page or the
// Project Processing page.
if ( pWA->m_bCredentialsCached || pWA->m_bCredentialsDetected) {
SetCredentialsAlreadyAvailable(true);
} else {
SetCredentialsAlreadyAvailable(false);
}
}
}
/*!
* wxEVT_WIZARD_CANCEL event handler for ID_TERMSOFUSEPAGE
*/
void CTermsOfUsePage::OnCancel( wxWizardExEvent& event ) {
PROCESS_CANCELEVENT(event);
}
/*!
* wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TERMSOFUSEAGREECTRL
* or ID_TERMSOFUSEDISAGREECTRL
*/
void CTermsOfUsePage::OnTermsOfUseStatusChange( wxCommandEvent& event ) {
wxLogTrace(wxT("Function Start/End"), wxT("CTermsOfUsePage::OnTermsOfUseStatusChange - Function Begin"));
if ((ID_TERMSOFUSEAGREECTRL == event.GetId()) && event.IsChecked()){
wxLogTrace(wxT("Function Status"), wxT("CTermsOfUsePage::OnTermsOfUseStatusChange - SetUserAgrees(true)"));
SetUserAgrees(true);
((CWizardAttach*)GetParent())->EnableNextButton();
} else {
wxLogTrace(wxT("Function Status"), wxT("CTermsOfUsePage::OnTermsOfUseStatusChange - SetUserAgrees(false)"));
SetUserAgrees(false);
((CWizardAttach*)GetParent())->DisableNextButton();
}
wxLogTrace(wxT("Function Start/End"), wxT("CTermsOfUsePage::OnTermsOfUseStatusChange - Function End"));
}
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation "TermsOfUsePage.h"
#endif
#include "stdwx.h"
#include "diagnostics.h"
#include "util.h"
#include "mfile.h"
#include "miofile.h"
#include "parse.h"
#include "error_numbers.h"
#include "wizardex.h"
#include "error_numbers.h"
#include "BOINCGUIApp.h"
#include "SkinManager.h"
#include "MainDocument.h"
#include "BOINCBaseWizard.h"
#include "WizardAttach.h"
#include "TermsOfUsePage.h"
/*!
* CTermsOfUsePage type definition
*/
IMPLEMENT_DYNAMIC_CLASS( CTermsOfUsePage, wxWizardPageEx )
/*!
* CTermsOfUsePage event table definition
*/
BEGIN_EVENT_TABLE( CTermsOfUsePage, wxWizardPageEx )
////@begin CTermsOfUsePage event table entries
EVT_WIZARDEX_PAGE_CHANGED( -1, CTermsOfUsePage::OnPageChanged )
EVT_WIZARDEX_PAGE_CHANGING( -1, CTermsOfUsePage::OnPageChanging )
EVT_WIZARDEX_CANCEL( -1, CTermsOfUsePage::OnCancel )
EVT_RADIOBUTTON( ID_TERMSOFUSEAGREECTRL, CTermsOfUsePage::OnTermsOfUseStatusChange )
EVT_RADIOBUTTON( ID_TERMSOFUSEDISAGREECTRL, CTermsOfUsePage::OnTermsOfUseStatusChange )
////@end CTermsOfUsePage event table entries
END_EVENT_TABLE()
/*!
* CTermsOfUsePage constructors
*/
CTermsOfUsePage::CTermsOfUsePage( )
{
}
CTermsOfUsePage::CTermsOfUsePage( CBOINCBaseWizard* parent )
{
Create( parent );
}
/*!
* CTermsOfUsePage creator
*/
bool CTermsOfUsePage::Create( CBOINCBaseWizard* parent )
{
////@begin CTermsOfUsePage member initialisation
m_pTitleStaticCtrl = NULL;
m_pDirectionsStaticCtrl = NULL;
m_pTermsOfUseCtrl = NULL;
m_pAgreeCtrl = NULL;
m_pDisagreeCtrl = NULL;
////@end CTermsOfUsePage member initialisation
m_bUserAgrees = false;
m_bCredentialsAlreadyAvailable = false;
////@begin CTermsOfUsePage creation
wxWizardPageEx::Create( parent, ID_TERMSOFUSEPAGE );
CreateControls();
GetSizer()->Fit(this);
////@end CTermsOfUsePage creation
return TRUE;
}
/*!
* Control creation for CTermsOfUsePage
*/
void CTermsOfUsePage::CreateControls()
{
////@begin CTermsOfUsePage content construction
CTermsOfUsePage* itemWizardPage96 = this;
wxBoxSizer* itemBoxSizer97 = new wxBoxSizer(wxVERTICAL);
itemWizardPage96->SetSizer(itemBoxSizer97);
m_pTitleStaticCtrl = new wxStaticText;
m_pTitleStaticCtrl->Create( itemWizardPage96, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_pTitleStaticCtrl->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana")));
itemBoxSizer97->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
itemBoxSizer97->Add(5, 5, 0, wxALIGN_LEFT|wxALL, 5);
m_pDirectionsStaticCtrl = new wxStaticText;
m_pDirectionsStaticCtrl->Create( itemWizardPage96, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer97->Add(m_pDirectionsStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
m_pTermsOfUseCtrl = new wxTextCtrl;
m_pTermsOfUseCtrl->Create( itemWizardPage96, ID_TERMSOFUSECTRL, wxEmptyString, wxDefaultPosition, wxSize(300, 125), wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH );
itemBoxSizer97->Add(m_pTermsOfUseCtrl, 0, wxGROW|wxALL, 5);
m_pAgreeCtrl = new wxRadioButton;
m_pAgreeCtrl->Create( itemWizardPage96, ID_TERMSOFUSEAGREECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_pAgreeCtrl->SetValue(false);
itemBoxSizer97->Add(m_pAgreeCtrl, 0, wxALIGN_LEFT|wxALL, 5);
m_pDisagreeCtrl = new wxRadioButton;
m_pDisagreeCtrl->Create( itemWizardPage96, ID_TERMSOFUSEDISAGREECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_pDisagreeCtrl->SetValue(true);
itemBoxSizer97->Add(m_pDisagreeCtrl, 0, wxALIGN_LEFT|wxALL, 5);
////@end CTermsOfUsePage content construction
}
/*!
* Gets the previous page.
*/
wxWizardPageEx* CTermsOfUsePage::GetPrev() const
{
return PAGE_TRANSITION_BACK;
}
/*!
* Gets the next page.
*/
wxWizardPageEx* CTermsOfUsePage::GetNext() const
{
if (CHECK_CLOSINGINPROGRESS()) {
// Cancel Event Detected
return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE);
} else if (IS_ATTACHTOPROJECTWIZARD() && GetUserAgrees() && GetCredentialsAlreadyAvailable()) {
return PAGE_TRANSITION_NEXT(ID_PROJECTPROCESSINGPAGE);
} else if (IS_ACCOUNTMANAGERWIZARD() && GetUserAgrees() && GetCredentialsAlreadyAvailable()) {
return PAGE_TRANSITION_NEXT(ID_ACCOUNTMANAGERPROCESSINGPAGE);
} else if (GetUserAgrees()) {
return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE);
} else {
return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE);
}
return NULL;
}
/*!
* Should we show tooltips?
*/
bool CTermsOfUsePage::ShowToolTips()
{
return TRUE;
}
/*!
* Get bitmap resources
*/
wxBitmap CTermsOfUsePage::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
////@begin CTermsOfUsePage bitmap retrieval
return wxNullBitmap;
////@end CTermsOfUsePage bitmap retrieval
}
/*!
* Get icon resources
*/
wxIcon CTermsOfUsePage::GetIconResource( const wxString& WXUNUSED(name) )
{
// Icon retrieval
////@begin CTermsOfUsePage icon retrieval
return wxNullIcon;
////@end CTermsOfUsePage icon retrieval
}
/*!
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_TERMSOFUSEPAGE
*/
void CTermsOfUsePage::OnPageChanged( wxWizardExEvent& event ) {
if (event.GetDirection() == false) return;
PROJECT_CONFIG& pc = ((CWizardAttach*)GetParent())->project_config;
wxASSERT(m_pTitleStaticCtrl);
wxASSERT(m_pDirectionsStaticCtrl);
m_pTitleStaticCtrl->SetLabel(
_("Terms of Use")
);
m_pDirectionsStaticCtrl->SetLabel(
_("Please read the following terms of use:")
);
m_pTermsOfUseCtrl->SetValue(
wxString(pc.terms_of_use.c_str(), wxConvUTF8)
);
m_pTermsOfUseCtrl->SetSelection(0,0);
m_pAgreeCtrl->SetLabel(
_("I agree to the terms of use.")
);
m_pAgreeCtrl->SetValue(false);
m_pDisagreeCtrl->SetLabel(
_("I do not agree with the terms of use.")
);
m_pDisagreeCtrl->SetValue(true);
SetUserAgrees(false);
((CWizardAttach*)GetParent())->DisableNextButton();
Fit();
}
/*!
* wxEVT_WIZARD_PAGE_CHANGING event handler for ID_TERMSOFUSEPAGE
*/
void CTermsOfUsePage::OnPageChanging( wxWizardExEvent& event ) {
CWizardAttach* pWA = ((CWizardAttach*)GetParent());
wxASSERT(pWA);
wxASSERT(wxDynamicCast(pWA, CWizardAttach));
// If the user has left the terms of use disagree radio button
// selected, then the next button is disabled and needs to be
// re-enabled if the back button is pressed.
pWA->EnableNextButton();
if (event.GetDirection() == false) return;
if (!CHECK_CLOSINGINPROGRESS()) {
// We are leaving this page.
// Determine if the account settings are already pre-populated.
// If so, advance to the Account Manager Processing page or the
// Project Processing page.
if ( pWA->m_bCredentialsCached || pWA->m_bCredentialsDetected) {
SetCredentialsAlreadyAvailable(true);
} else {
SetCredentialsAlreadyAvailable(false);
}
}
}
/*!
* wxEVT_WIZARD_CANCEL event handler for ID_TERMSOFUSEPAGE
*/
void CTermsOfUsePage::OnCancel( wxWizardExEvent& event ) {
PROCESS_CANCELEVENT(event);
}
/*!
* wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TERMSOFUSEAGREECTRL
* or ID_TERMSOFUSEDISAGREECTRL
*/
void CTermsOfUsePage::OnTermsOfUseStatusChange( wxCommandEvent& event ) {
wxLogTrace(wxT("Function Start/End"), wxT("CTermsOfUsePage::OnTermsOfUseStatusChange - Function Begin"));
if ((ID_TERMSOFUSEAGREECTRL == event.GetId()) && event.IsChecked()){
wxLogTrace(wxT("Function Status"), wxT("CTermsOfUsePage::OnTermsOfUseStatusChange - SetUserAgrees(true)"));
SetUserAgrees(true);
((CWizardAttach*)GetParent())->EnableNextButton();
} else {
wxLogTrace(wxT("Function Status"), wxT("CTermsOfUsePage::OnTermsOfUseStatusChange - SetUserAgrees(false)"));
SetUserAgrees(false);
((CWizardAttach*)GetParent())->DisableNextButton();
}
wxLogTrace(wxT("Function Start/End"), wxT("CTermsOfUsePage::OnTermsOfUseStatusChange - Function End"));
}

View File

@ -1,98 +1,98 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _WIZ_TERMSOFUSEPAGE_H_
#define _WIZ_TERMSOFUSEPAGE_H_
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "TermsOfUsePage.cpp"
#endif
/*!
* CTermsOfUsePage class declaration
*/
class CTermsOfUsePage: public wxWizardPageEx
{
DECLARE_DYNAMIC_CLASS( CTermsOfUsePage )
DECLARE_EVENT_TABLE()
public:
/// Constructors
CTermsOfUsePage( );
CTermsOfUsePage( CBOINCBaseWizard* parent );
/// Creation
bool Create( CBOINCBaseWizard* parent );
/// Creates the controls and sizers
void CreateControls();
////@begin CTermsOfUsePage event handler declarations
/// wxEVT_WIZARD_PAGE_CHANGED event handler for ID_TERMSOFUSEPAGE
void OnPageChanged( wxWizardExEvent& event );
/// wxEVT_WIZARD_PAGE_CHANGING event handler for ID_TERMSOFUSEPAGE
void OnPageChanging( wxWizardExEvent& event );
/// wxEVT_WIZARD_CANCEL event handler for ID_TERMSOFUSEPAGE
void OnCancel( wxWizardExEvent& event );
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TERMSOFUSEAGREECTRL
/// or ID_TERMSOFUSEDISAGREECTRL
void OnTermsOfUseStatusChange( wxCommandEvent& event );
////@end CTermsOfUsePage event handler declarations
////@begin CTermsOfUsePage member function declarations
/// Gets the previous page.
virtual wxWizardPageEx* GetPrev() const;
/// Gets the next page.
virtual wxWizardPageEx* GetNext() const;
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end CTermsOfUsePage member function declarations
bool GetUserAgrees() const { return m_bUserAgrees ; }
void SetUserAgrees(bool value) { m_bUserAgrees = value ; }
bool GetCredentialsAlreadyAvailable() const { return m_bCredentialsAlreadyAvailable ; }
void SetCredentialsAlreadyAvailable(bool value) { m_bCredentialsAlreadyAvailable = value ; }
/// Should we show tooltips?
static bool ShowToolTips();
////@begin CTermsOfUsePage member variables
wxStaticText* m_pTitleStaticCtrl;
wxStaticText* m_pDirectionsStaticCtrl;
wxTextCtrl* m_pTermsOfUseCtrl;
wxRadioButton* m_pAgreeCtrl;
wxRadioButton* m_pDisagreeCtrl;
////@end CTermsOfUsePage member variables
bool m_bUserAgrees;
bool m_bCredentialsAlreadyAvailable;
};
#endif
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _WIZ_TERMSOFUSEPAGE_H_
#define _WIZ_TERMSOFUSEPAGE_H_
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "TermsOfUsePage.cpp"
#endif
/*!
* CTermsOfUsePage class declaration
*/
class CTermsOfUsePage: public wxWizardPageEx
{
DECLARE_DYNAMIC_CLASS( CTermsOfUsePage )
DECLARE_EVENT_TABLE()
public:
/// Constructors
CTermsOfUsePage( );
CTermsOfUsePage( CBOINCBaseWizard* parent );
/// Creation
bool Create( CBOINCBaseWizard* parent );
/// Creates the controls and sizers
void CreateControls();
////@begin CTermsOfUsePage event handler declarations
/// wxEVT_WIZARD_PAGE_CHANGED event handler for ID_TERMSOFUSEPAGE
void OnPageChanged( wxWizardExEvent& event );
/// wxEVT_WIZARD_PAGE_CHANGING event handler for ID_TERMSOFUSEPAGE
void OnPageChanging( wxWizardExEvent& event );
/// wxEVT_WIZARD_CANCEL event handler for ID_TERMSOFUSEPAGE
void OnCancel( wxWizardExEvent& event );
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TERMSOFUSEAGREECTRL
/// or ID_TERMSOFUSEDISAGREECTRL
void OnTermsOfUseStatusChange( wxCommandEvent& event );
////@end CTermsOfUsePage event handler declarations
////@begin CTermsOfUsePage member function declarations
/// Gets the previous page.
virtual wxWizardPageEx* GetPrev() const;
/// Gets the next page.
virtual wxWizardPageEx* GetNext() const;
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end CTermsOfUsePage member function declarations
bool GetUserAgrees() const { return m_bUserAgrees ; }
void SetUserAgrees(bool value) { m_bUserAgrees = value ; }
bool GetCredentialsAlreadyAvailable() const { return m_bCredentialsAlreadyAvailable ; }
void SetCredentialsAlreadyAvailable(bool value) { m_bCredentialsAlreadyAvailable = value ; }
/// Should we show tooltips?
static bool ShowToolTips();
////@begin CTermsOfUsePage member variables
wxStaticText* m_pTitleStaticCtrl;
wxStaticText* m_pDirectionsStaticCtrl;
wxTextCtrl* m_pTermsOfUseCtrl;
wxRadioButton* m_pAgreeCtrl;
wxRadioButton* m_pDisagreeCtrl;
////@end CTermsOfUsePage member variables
bool m_bUserAgrees;
bool m_bCredentialsAlreadyAvailable;
};
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,17 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by boinc_ss.rc
//
#define IDI_MAIN_ICON 1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 109
#define _APS_NEXT_COMMAND_VALUE 40000
#define _APS_NEXT_CONTROL_VALUE 1007
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by boinc_ss.rc
//
#define IDI_MAIN_ICON 1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 109
#define _APS_NEXT_COMMAND_VALUE 40000
#define _APS_NEXT_CONTROL_VALUE 1007
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif

View File

@ -1,251 +1,251 @@
// Microsoft Visual C++ generated resource script.
//
#include "boinc_ss_opengl.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winresrc.h"
#include "version.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
#if defined(_GRIDREPUBLIC)
IDI_MAIN_ICON ICON "res\\gridrepublic.ico"
#elif defined(_CHARITYENGINE)
IDI_MAIN_ICON ICON "res\\ce.ico"
#elif defined(_WCG)
IDI_MAIN_ICON ICON "res\\wcg.ico"
#else
IDI_MAIN_ICON ICON "res\\icon.ico"
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"boinc_ss_opengl.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Visual Studio 2005 Compatibility
//
#ifndef IDC_STATIC
#define IDC_STATIC (-1) // all static controls
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
#if defined(_GRIDREPUBLIC)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "GridRepublic"
VALUE "FileDescription", "BOINC Screensaver"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinc_ss"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinc.scr"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_CHARITYENGINE)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Charity Engine"
VALUE "FileDescription", "Charity Engine Screensaver"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinc_ss"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinc.scr"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_WCG)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "World Community Grid"
VALUE "FileDescription", "BOINC Screensaver"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinc_ss"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinc.scr"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#else
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Space Sciences Laboratory"
VALUE "FileDescription", "BOINC Screensaver"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinc_ss"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinc.scr"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
// Microsoft Visual C++ generated resource script.
//
#include "boinc_ss_opengl.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winresrc.h"
#include "version.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
#if defined(_GRIDREPUBLIC)
IDI_MAIN_ICON ICON "res\\gridrepublic.ico"
#elif defined(_CHARITYENGINE)
IDI_MAIN_ICON ICON "res\\ce.ico"
#elif defined(_WCG)
IDI_MAIN_ICON ICON "res\\wcg.ico"
#else
IDI_MAIN_ICON ICON "res\\icon.ico"
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"boinc_ss_opengl.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Visual Studio 2005 Compatibility
//
#ifndef IDC_STATIC
#define IDC_STATIC (-1) // all static controls
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
#if defined(_GRIDREPUBLIC)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "GridRepublic"
VALUE "FileDescription", "BOINC Screensaver"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinc_ss"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinc.scr"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_CHARITYENGINE)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Charity Engine"
VALUE "FileDescription", "Charity Engine Screensaver"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinc_ss"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinc.scr"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_WCG)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "World Community Grid"
VALUE "FileDescription", "BOINC Screensaver"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinc_ss"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinc.scr"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#else
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Space Sciences Laboratory"
VALUE "FileDescription", "BOINC Screensaver"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinc_ss"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinc.scr"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,17 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by boinc_tray.rc
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 110
#define _APS_NEXT_COMMAND_VALUE 40000
#define _APS_NEXT_CONTROL_VALUE 1020
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by boinc_tray.rc
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 110
#define _APS_NEXT_COMMAND_VALUE 40000
#define _APS_NEXT_CONTROL_VALUE 1020
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif

View File

@ -1,264 +1,264 @@
// Microsoft Visual C++ generated resource script.
//
#include "boinc_tray.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winresrc.h"
#include "version.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
#if defined(_GRIDREPUBLIC)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "GridRepublic"
VALUE "FileDescription", "GridRepublic System Tray for Windows"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinctray"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinctray.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_PROGRESSTHRUPROCESSORS)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Progress Thru Processors"
VALUE "FileDescription", "Progress Thru Processors System Tray for Windows"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinctray"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinctray.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_CHARITYENGINE)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Charity Engine"
VALUE "FileDescription", "Charity Engine System Tray for Windows"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinctray"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinctray.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_WCG)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "World Community Grid"
VALUE "FileDescription", "World Community Grid System Tray for Windows"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinctray"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinctray.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#else
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Space Sciences Laboratory"
VALUE "FileDescription", "BOINC System Tray for Windows"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinctray"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinctray.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"boinc_tray.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
// Microsoft Visual C++ generated resource script.
//
#include "boinc_tray.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winresrc.h"
#include "version.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
#if defined(_GRIDREPUBLIC)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "GridRepublic"
VALUE "FileDescription", "GridRepublic System Tray for Windows"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinctray"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinctray.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_PROGRESSTHRUPROCESSORS)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Progress Thru Processors"
VALUE "FileDescription", "Progress Thru Processors System Tray for Windows"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinctray"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinctray.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_CHARITYENGINE)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Charity Engine"
VALUE "FileDescription", "Charity Engine System Tray for Windows"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinctray"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinctray.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#elif defined(_WCG)
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "World Community Grid"
VALUE "FileDescription", "World Community Grid System Tray for Windows"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinctray"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinctray.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#else
VS_VERSION_INFO VERSIONINFO
FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,BOINC_RELEASE,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Space Sciences Laboratory"
VALUE "FileDescription", "BOINC System Tray for Windows"
VALUE "FileVersion", BOINC_VERSION_STRING "\0"
VALUE "InternalName", "boinctray"
VALUE "LegalCopyright", "© 2003-2012 University of California"
VALUE "OriginalFilename", "boinctray.exe"
VALUE "ProductName", "BOINC client"
VALUE "ProductVersion", BOINC_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"boinc_tray.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -1,202 +1,202 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#include "boinc_win.h"
#include "diagnostics.h"
#include "win_util.h"
#include "boinc_tray.h"
#include "tray_win.h"
#include "idlemon.h"
HMODULE g_hModule = NULL;
static CBOINCTray* gspBOINCTray = NULL;
INT WINAPI WinMain(
HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow
) {
CBOINCTray BOINCTray;
return BOINCTray.Run( hInstance, hPrevInstance, lpCmdLine, nCmdShow );
}
CBOINCTray::CBOINCTray() {
gspBOINCTray = this;
m_hDataManagementThread = NULL;
m_bIdleTrackerInitialized = FALSE;
}
// Starts main execution of BOINC Tray.
//
INT CBOINCTray::Run( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR /* lpCmdLine */ , int /* nCmdShow */ ) {
// Initialize the BOINC Diagnostics Framework
int flags =
#ifdef _DEBUG
BOINC_DIAG_MEMORYLEAKCHECKENABLED |
#endif
BOINC_DIAG_DUMPCALLSTACKENABLED |
BOINC_DIAG_HEAPCHECKENABLED |
BOINC_DIAG_TRACETOSTDOUT |
BOINC_DIAG_REDIRECTSTDERR |
BOINC_DIAG_REDIRECTSTDOUT;
chdir_to_data_dir();
diagnostics_init(flags, "stdouttray", "stderrtray");
// Create application window class
if (!hPrevInstance) {
// Register an appropriate window class for the primary window
WNDCLASS cls;
cls.hCursor = NULL;
cls.hIcon = NULL;
cls.lpszMenuName = NULL;
cls.lpszClassName = _T("BOINCTrayWndClass");
cls.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
cls.hInstance = hInstance;
cls.style = CS_OWNDC|CS_VREDRAW|CS_HREDRAW;
cls.lpfnWndProc = TrayProcStub;
cls.cbWndExtra = 0;
cls.cbClsExtra = 0;
RegisterClass(&cls);
}
// Create the window
MSG msg;
HWND hWnd;
hWnd = CreateWindow(
_T("BOINCTrayWndClass"),
_T("BOINC System Tray Applet"),
WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL,
0, 0, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL
);
// Process the message pump
while( GetMessage( &msg, NULL, 0, 0 ) ) {
TranslateMessage( &msg );
DispatchMessage( &msg );
}
// Cleanup and shutdown the BOINC idle tracking system.
detach_idle_monitor();
return msg.wParam;
}
// Create the thread that is used to talk to the daemon.
//
BOOL CBOINCTray::CreateDataManagementThread() {
DWORD dwThreadID = 0;
m_hDataManagementThread = CreateThread(
NULL, // default security attributes
0, // use default stack size
DataManagementProcStub, // thread function
NULL, // argument to thread function
0, // use default creation flags
&dwThreadID ); // returns the thread identifier
if (m_hDataManagementThread == NULL) {
return FALSE;
}
return TRUE;
}
// Terminate the thread that is used to talk to the daemon.
//
BOOL CBOINCTray::DestroyDataManagementThread() {
if (!TerminateThread(m_hDataManagementThread, 0)) {
return FALSE;
}
return TRUE;
}
// Update the time since last input activity every 5 seconds or so.
//
DWORD WINAPI CBOINCTray::DataManagementProc() {
while (true) {
// On Vista systems, only elevated processes can create shared memory
// area's across various user sessions. In this case we need to wait
// for BOINC to create the shared memory area and then boinctray can
// successfully attach to it. What a PITA.
if (!m_bIdleTrackerInitialized) {
m_bIdleTrackerInitialized = attach_idle_monitor();
}
get_idle_tick_count();
Sleep(5000);
}
}
// This function forwards to DataManagementProc, which has access to the
// "this" pointer.
//
DWORD WINAPI CBOINCTray::DataManagementProcStub(LPVOID) {
return gspBOINCTray->DataManagementProc();
}
// Handle window messages for main screensaver windows.
//
LRESULT CBOINCTray::TrayProc(
HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
) {
switch (uMsg) {
case WM_CREATE:
CreateDataManagementThread();
return 0;
break;
case WM_CLOSE:
DestroyDataManagementThread();
return 0;
break;
}
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
// This function forwards all window messages to SaverProc, which has
// access to the "this" pointer.
//
LRESULT CALLBACK CBOINCTray::TrayProcStub(
HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
) {
return gspBOINCTray->TrayProc(hWnd, uMsg, wParam, lParam);
}
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#include "boinc_win.h"
#include "diagnostics.h"
#include "win_util.h"
#include "boinc_tray.h"
#include "tray_win.h"
#include "idlemon.h"
HMODULE g_hModule = NULL;
static CBOINCTray* gspBOINCTray = NULL;
INT WINAPI WinMain(
HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow
) {
CBOINCTray BOINCTray;
return BOINCTray.Run( hInstance, hPrevInstance, lpCmdLine, nCmdShow );
}
CBOINCTray::CBOINCTray() {
gspBOINCTray = this;
m_hDataManagementThread = NULL;
m_bIdleTrackerInitialized = FALSE;
}
// Starts main execution of BOINC Tray.
//
INT CBOINCTray::Run( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR /* lpCmdLine */ , int /* nCmdShow */ ) {
// Initialize the BOINC Diagnostics Framework
int flags =
#ifdef _DEBUG
BOINC_DIAG_MEMORYLEAKCHECKENABLED |
#endif
BOINC_DIAG_DUMPCALLSTACKENABLED |
BOINC_DIAG_HEAPCHECKENABLED |
BOINC_DIAG_TRACETOSTDOUT |
BOINC_DIAG_REDIRECTSTDERR |
BOINC_DIAG_REDIRECTSTDOUT;
chdir_to_data_dir();
diagnostics_init(flags, "stdouttray", "stderrtray");
// Create application window class
if (!hPrevInstance) {
// Register an appropriate window class for the primary window
WNDCLASS cls;
cls.hCursor = NULL;
cls.hIcon = NULL;
cls.lpszMenuName = NULL;
cls.lpszClassName = _T("BOINCTrayWndClass");
cls.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
cls.hInstance = hInstance;
cls.style = CS_OWNDC|CS_VREDRAW|CS_HREDRAW;
cls.lpfnWndProc = TrayProcStub;
cls.cbWndExtra = 0;
cls.cbClsExtra = 0;
RegisterClass(&cls);
}
// Create the window
MSG msg;
HWND hWnd;
hWnd = CreateWindow(
_T("BOINCTrayWndClass"),
_T("BOINC System Tray Applet"),
WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL,
0, 0, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL
);
// Process the message pump
while( GetMessage( &msg, NULL, 0, 0 ) ) {
TranslateMessage( &msg );
DispatchMessage( &msg );
}
// Cleanup and shutdown the BOINC idle tracking system.
detach_idle_monitor();
return msg.wParam;
}
// Create the thread that is used to talk to the daemon.
//
BOOL CBOINCTray::CreateDataManagementThread() {
DWORD dwThreadID = 0;
m_hDataManagementThread = CreateThread(
NULL, // default security attributes
0, // use default stack size
DataManagementProcStub, // thread function
NULL, // argument to thread function
0, // use default creation flags
&dwThreadID ); // returns the thread identifier
if (m_hDataManagementThread == NULL) {
return FALSE;
}
return TRUE;
}
// Terminate the thread that is used to talk to the daemon.
//
BOOL CBOINCTray::DestroyDataManagementThread() {
if (!TerminateThread(m_hDataManagementThread, 0)) {
return FALSE;
}
return TRUE;
}
// Update the time since last input activity every 5 seconds or so.
//
DWORD WINAPI CBOINCTray::DataManagementProc() {
while (true) {
// On Vista systems, only elevated processes can create shared memory
// area's across various user sessions. In this case we need to wait
// for BOINC to create the shared memory area and then boinctray can
// successfully attach to it. What a PITA.
if (!m_bIdleTrackerInitialized) {
m_bIdleTrackerInitialized = attach_idle_monitor();
}
get_idle_tick_count();
Sleep(5000);
}
}
// This function forwards to DataManagementProc, which has access to the
// "this" pointer.
//
DWORD WINAPI CBOINCTray::DataManagementProcStub(LPVOID) {
return gspBOINCTray->DataManagementProc();
}
// Handle window messages for main screensaver windows.
//
LRESULT CBOINCTray::TrayProc(
HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
) {
switch (uMsg) {
case WM_CREATE:
CreateDataManagementThread();
return 0;
break;
case WM_CLOSE:
DestroyDataManagementThread();
return 0;
break;
}
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
// This function forwards all window messages to SaverProc, which has
// access to the "this" pointer.
//
LRESULT CALLBACK CBOINCTray::TrayProcStub(
HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
) {
return gspBOINCTray->TrayProc(hWnd, uMsg, wParam, lParam);
}

View File

@ -1,47 +1,47 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _BOINCTRAY_WIN_H
#define _BOINCTRAY_WIN_H
//-----------------------------------------------------------------------------
// Name: class CBOINCTray
// Desc: BOINC Tray class
//-----------------------------------------------------------------------------
class CBOINCTray
{
public:
CBOINCTray();
virtual INT Run( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow );
protected:
BOOL CreateDataManagementThread();
BOOL DestroyDataManagementThread();
DWORD WINAPI DataManagementProc();
static DWORD WINAPI DataManagementProcStub( LPVOID lpParam );
LRESULT TrayProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
static LRESULT CALLBACK TrayProcStub( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
HANDLE m_hDataManagementThread;
BOOL m_bIdleTrackerInitialized;
};
#endif
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _BOINCTRAY_WIN_H
#define _BOINCTRAY_WIN_H
//-----------------------------------------------------------------------------
// Name: class CBOINCTray
// Desc: BOINC Tray class
//-----------------------------------------------------------------------------
class CBOINCTray
{
public:
CBOINCTray();
virtual INT Run( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow );
protected:
BOOL CreateDataManagementThread();
BOOL DestroyDataManagementThread();
DWORD WINAPI DataManagementProc();
static DWORD WINAPI DataManagementProcStub( LPVOID lpParam );
LRESULT TrayProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
static LRESULT CALLBACK TrayProcStub( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
HANDLE m_hDataManagementThread;
BOOL m_bIdleTrackerInitialized;
};
#endif

File diff suppressed because it is too large Load Diff