diff --git a/clientgui/BOINCGUI.vcproj b/clientgui/BOINCGUI.vcproj index bae5a0d02c..aa16f6a598 100644 --- a/clientgui/BOINCGUI.vcproj +++ b/clientgui/BOINCGUI.vcproj @@ -27,7 +27,7 @@ EnableFunctionLevelLinking="TRUE" UsePrecompiledHeader="3" PrecompiledHeaderThrough="stdwx.h" - WarningLevel="3" + WarningLevel="4" Detect64BitPortabilityProblems="FALSE" DebugInformationFormat="4"/> + RelativePath=".\res\BOINCGUIApp.ico"> + RelativePath=".\BOINCGUIApp.rc"> + + + + + + + + + + + + + + diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index d10485d632..94b5ab74e6 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/clientgui/BOINCGUIApp.cpp @@ -19,9 +19,9 @@ #include "stdwx.h" -#include "boincguiapp.h" -#include "mainframe.h" -#include "maindocument.h" +#include "BOINCGUIApp.h" +#include "MainFrame.h" +#include "MainDocument.h" IMPLEMENT_APP(CBOINCGUIApp) diff --git a/clientgui/BOINCGUIApp.h b/clientgui/BOINCGUIApp.h index 0612a75f70..ea45503a49 100644 --- a/clientgui/BOINCGUIApp.h +++ b/clientgui/BOINCGUIApp.h @@ -19,8 +19,8 @@ #pragma once -#include "mainframe.h" -#include "maindocument.h" +#include "MainFrame.h" +#include "MainDocument.h" class CBOINCGUIApp : public wxApp diff --git a/clientgui/BaseListCtrlView.cpp b/clientgui/BaseListCtrlView.cpp index 889c46cdd2..e757d2731f 100644 --- a/clientgui/BaseListCtrlView.cpp +++ b/clientgui/BaseListCtrlView.cpp @@ -23,7 +23,7 @@ // #include "stdwx.h" -#include ".\baselistctrlview.h" +#include "BaseListCtrlView.h" IMPLEMENT_DYNAMIC_CLASS(CBaseListCtrlView, wxListCtrl) diff --git a/clientgui/BaseWindowView.cpp b/clientgui/BaseWindowView.cpp index a00b36a450..83025b09fa 100644 --- a/clientgui/BaseWindowView.cpp +++ b/clientgui/BaseWindowView.cpp @@ -23,7 +23,7 @@ // #include "stdwx.h" -#include ".\basewindowview.h" +#include "BaseWindowView.h" IMPLEMENT_DYNAMIC_CLASS(CBaseWindowView, wxPanel) diff --git a/clientgui/Events.h b/clientgui/Events.h index d914d5b839..732d0182a1 100644 --- a/clientgui/Events.h +++ b/clientgui/Events.h @@ -21,6 +21,6 @@ enum { ID_STATUSBAR = wxID_HIGHEST + 1, - + ID_TOOLSOPTIONS } enumEvents; diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index f11a94e025..5223199dff 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -18,7 +18,7 @@ // #include "stdwx.h" -#include ".\maindocument.h" +#include "MainDocument.h" IMPLEMENT_DYNAMIC_CLASS(CMainDocument, wxObject) diff --git a/clientgui/MainFrame.cpp b/clientgui/MainFrame.cpp index d0b82594e1..ed4abe4c04 100644 --- a/clientgui/MainFrame.cpp +++ b/clientgui/MainFrame.cpp @@ -29,7 +29,9 @@ #include "WorkView.h" #include "Events.h" #include "DlgAbout.h" +#include "DlgOptions.h" +#include "res/BOINCGUIApp.xpm" IMPLEMENT_DYNAMIC_CLASS(CMainFrame, wxFrame) @@ -38,6 +40,7 @@ BEGIN_EVENT_TABLE (CMainFrame, wxFrame) EVT_CLOSE ( CMainFrame::OnClose) EVT_IDLE ( CMainFrame::OnIdle) EVT_MENU (wxID_EXIT, CMainFrame::OnExit) + EVT_MENU (ID_TOOLSOPTIONS, CMainFrame::OnToolsOptions) EVT_MENU (wxID_ABOUT, CMainFrame::OnAbout) EVT_MENU (ID_STATUSBAR, CMainFrame::OnStatusbar) EVT_UPDATE_UI (ID_STATUSBAR, CMainFrame::OnStatusbarUI) @@ -90,7 +93,7 @@ bool CMainFrame::CreateMenu() { // Tools menu wxMenu *menuTools = new wxMenu; - menuTools->Append(wxID_EXIT, _("&Options")); + menuTools->Append(ID_TOOLSOPTIONS, _("&Options")); // Help menu wxMenu *menuHelp = new wxMenu; @@ -220,6 +223,16 @@ void CMainFrame::OnClose(wxCloseEvent &event) { } +void CMainFrame::OnToolsOptions(wxCommandEvent &WXUNUSED(event)) { + CDlgOptions* pDlg = new CDlgOptions(this); + + pDlg->ShowModal(); + + if (pDlg) + delete pDlg; +} + + void CMainFrame::OnExit(wxCommandEvent &WXUNUSED(event)) { Close(true); } diff --git a/clientgui/MainFrame.h b/clientgui/MainFrame.h index 9b1bd3b818..c44def918c 100644 --- a/clientgui/MainFrame.h +++ b/clientgui/MainFrame.h @@ -29,15 +29,16 @@ public: ~CMainFrame(void); - void OnClose (wxCloseEvent &event); - void OnIdle (wxIdleEvent &event); + void OnClose(wxCloseEvent &event); + void OnIdle(wxIdleEvent &event); - void OnAbout (wxCommandEvent &event); - void OnExit (wxCommandEvent &event); - void OnStatusbar (wxCommandEvent &event); + void OnExit(wxCommandEvent &event); + void OnToolsOptions(wxCommandEvent &event); + void OnAbout(wxCommandEvent &event); + void OnStatusbar(wxCommandEvent &event); - void OnToolbarsUI (wxUpdateUIEvent &event); - void OnStatusbarUI (wxUpdateUIEvent &event); + void OnToolbarsUI(wxUpdateUIEvent &event); + void OnStatusbarUI(wxUpdateUIEvent &event); private: diff --git a/clientgui/MessagesView.cpp b/clientgui/MessagesView.cpp index a7db17321d..fa8551c6ad 100644 --- a/clientgui/MessagesView.cpp +++ b/clientgui/MessagesView.cpp @@ -18,7 +18,7 @@ // #include "stdwx.h" -#include ".\messagesview.h" +#include "MessagesView.h" IMPLEMENT_DYNAMIC_CLASS(CMessagesView, CBaseListCtrlView) diff --git a/clientgui/MessagesView.h b/clientgui/MessagesView.h index 1ce5d3cf06..78fc89d7a6 100644 --- a/clientgui/MessagesView.h +++ b/clientgui/MessagesView.h @@ -18,7 +18,7 @@ // #pragma once -#include "baselistctrlview.h" +#include "BaseListCtrlView.h" class CMessagesView : public CBaseListCtrlView { diff --git a/clientgui/ProjectsView.cpp b/clientgui/ProjectsView.cpp index 70439285fc..36c51ac99d 100644 --- a/clientgui/ProjectsView.cpp +++ b/clientgui/ProjectsView.cpp @@ -18,7 +18,7 @@ // #include "stdwx.h" -#include ".\projectsview.h" +#include "ProjectsView.h" IMPLEMENT_DYNAMIC_CLASS(CProjectsView, CBaseListCtrlView) diff --git a/clientgui/ProjectsView.h b/clientgui/ProjectsView.h index 3b20ec7cd0..fcd2cf2ea4 100644 --- a/clientgui/ProjectsView.h +++ b/clientgui/ProjectsView.h @@ -18,7 +18,7 @@ // #pragma once -#include "baselistctrlview.h" +#include "BaseListCtrlView.h" class CProjectsView : public CBaseListCtrlView { diff --git a/clientgui/ResourceUtilizationView.cpp b/clientgui/ResourceUtilizationView.cpp index c1b200ebc1..9ccc93dce7 100644 --- a/clientgui/ResourceUtilizationView.cpp +++ b/clientgui/ResourceUtilizationView.cpp @@ -18,7 +18,7 @@ // #include "stdwx.h" -#include ".\resourceutilizationview.h" +#include "ResourceUtilizationView.h" IMPLEMENT_DYNAMIC_CLASS(CResourceUtilizationView, CBaseWindowView) diff --git a/clientgui/ResourceUtilizationView.h b/clientgui/ResourceUtilizationView.h index e4577b8d02..f5fa7f39f6 100644 --- a/clientgui/ResourceUtilizationView.h +++ b/clientgui/ResourceUtilizationView.h @@ -18,7 +18,7 @@ // #pragma once -#include "basewindowview.h" +#include "BaseWindowView.h" class CResourceUtilizationView : public CBaseWindowView { diff --git a/clientgui/TransfersView.cpp b/clientgui/TransfersView.cpp index a0efdf43b7..f0cc5e7d8b 100644 --- a/clientgui/TransfersView.cpp +++ b/clientgui/TransfersView.cpp @@ -18,7 +18,7 @@ // #include "stdwx.h" -#include ".\transfersview.h" +#include "TransfersView.h" IMPLEMENT_DYNAMIC_CLASS(CTransfersView, CBaseListCtrlView) diff --git a/clientgui/TransfersView.h b/clientgui/TransfersView.h index bb10e07161..31e8aadc89 100644 --- a/clientgui/TransfersView.h +++ b/clientgui/TransfersView.h @@ -18,8 +18,7 @@ // #pragma once -#include "mainframe.h" -#include "baselistctrlview.h" +#include "BaseListCtrlView.h" class CTransfersView : public CBaseListCtrlView { diff --git a/clientgui/WorkView.cpp b/clientgui/WorkView.cpp index 0cb6ea7aa0..61722e75e3 100644 --- a/clientgui/WorkView.cpp +++ b/clientgui/WorkView.cpp @@ -18,7 +18,7 @@ // #include "stdwx.h" -#include ".\workview.h" +#include "WorkView.h" IMPLEMENT_DYNAMIC_CLASS(CWorkView, CBaseListCtrlView) diff --git a/clientgui/WorkView.h b/clientgui/WorkView.h index 603b6b7249..b8b693cae7 100644 --- a/clientgui/WorkView.h +++ b/clientgui/WorkView.h @@ -18,8 +18,7 @@ // #pragma once -#include "mainframe.h" -#include "baselistctrlview.h" +#include "BaseListCtrlView.h" class CWorkView : public CBaseListCtrlView { diff --git a/clientgui/res/BOINCGUIApp.xpm b/clientgui/res/BOINCGUIApp.xpm new file mode 100644 index 0000000000..5a3b6846c2 --- /dev/null +++ b/clientgui/res/BOINCGUIApp.xpm @@ -0,0 +1,51 @@ +/* XPM */ +static char *APP_ICON_xpm[] = { +"16 16 32 1", +" c None", +". c #000066", +"X c #000033", +"o c #333333", +"O c #555555", +"+ c #000080", +"@ c #4D4D4D", +"# c #996666", +"$ c #393939", +"% c #000099", +"& c #424242", +"* c #FFCC99", +"= c #FFCC66", +"- c #999933", +"; c #808080", +": c #CC9966", +"> c #CC9933", +", c #CCCC33", +"< c #333366", +"1 c #292929", +"2 c #FFCC33", +"3 c #5F5F5F", +"4 c #666633", +"5 c #333399", +"6 c #666666", +"7 c #996633", +"8 c #CCCC66", +"9 c #666699", +"0 c #777777", +"q c #666600", +"w c #868686", +"e c #969696", +" .XoO ", +" +.XXXXXXO ", +" +.XX@###$XO ", +" %+X&***===-X; ", +" %++X:*=>.,,-<$ ", +" ++.X1=23.2-4O< ", +"5++.X6=2O>27O<<@", +"++.XX82>-,27&<11", +"...X1=>69@2>705X>>qO<<", +" XXX-2--&w9< ", +" 0XXX>>>>73ew3 ", +" 3XX4446ww93 ", +" 0o<6ww96O ", +" 0660 "}; diff --git a/clientgui/res/boincsm.xpm b/clientgui/res/boincsm.xpm index 3c3c6faf31..a71b189d6f 100644 --- a/clientgui/res/boincsm.xpm +++ b/clientgui/res/boincsm.xpm @@ -1,7 +1,7 @@ /* XPM */ static char *boincsm_xpm[] = { "50 50 84 1", -" c #848484", +" c None", ". c #94B5D6", "X c #9CCEFF", "o c #8C9CB5", diff --git a/clientgui/stdwx.cpp b/clientgui/stdwx.cpp index 2bc44426bf..553b1d63c6 100644 --- a/clientgui/stdwx.cpp +++ b/clientgui/stdwx.cpp @@ -23,9 +23,13 @@ #include "stdwx.h" +#ifdef __WXMSW__ + #ifndef __WIN95__ #error An error in wxWindows version 2.4.0 and 2.4.1 require that you set WINVER=0x400 in the project settings! #endif +#endif + // TODO: reference any additional headers you need in STDAFX.H // and not in this file diff --git a/clientgui/stdwx.h b/clientgui/stdwx.h index e13ebfeee4..c70a846f1f 100644 --- a/clientgui/stdwx.h +++ b/clientgui/stdwx.h @@ -42,6 +42,7 @@ #include // configuration support #include // internationalization #include // list control support +#include // messagebox dialog #include // notebook support #include // toolbars support #include // system settings