diff --git a/clientgui/BOINCGUIApp.h b/clientgui/BOINCGUIApp.h index 7f560f67e2..a39f8ba944 100644 --- a/clientgui/BOINCGUIApp.h +++ b/clientgui/BOINCGUIApp.h @@ -57,4 +57,5 @@ public: DECLARE_APP(CBOINCGUIApp) -#endif \ No newline at end of file +#endif + diff --git a/clientgui/BaseListCtrlView.cpp b/clientgui/BaseListCtrlView.cpp index 0e79aaf3f5..c21d831abf 100644 --- a/clientgui/BaseListCtrlView.cpp +++ b/clientgui/BaseListCtrlView.cpp @@ -51,3 +51,4 @@ wxString CBaseListCtrlView::GetViewName(void) { return wxString(_T("Undefined")); } + diff --git a/clientgui/BaseListCtrlView.h b/clientgui/BaseListCtrlView.h index 4625885bcd..ea6daae2c1 100644 --- a/clientgui/BaseListCtrlView.h +++ b/clientgui/BaseListCtrlView.h @@ -39,4 +39,5 @@ public: }; -#endif \ No newline at end of file +#endif + diff --git a/clientgui/BaseWindowView.cpp b/clientgui/BaseWindowView.cpp index cc68d5c87c..702badf699 100644 --- a/clientgui/BaseWindowView.cpp +++ b/clientgui/BaseWindowView.cpp @@ -51,3 +51,4 @@ wxString CBaseWindowView::GetViewName(void) { return wxString(_T("Undefined")); } + diff --git a/clientgui/BaseWindowView.h b/clientgui/BaseWindowView.h index 0ebd61786a..f9c7704f6c 100644 --- a/clientgui/BaseWindowView.h +++ b/clientgui/BaseWindowView.h @@ -39,4 +39,5 @@ public: }; -#endif \ No newline at end of file +#endif + diff --git a/clientgui/DlgAbout.cpp b/clientgui/DlgAbout.cpp index 172dce190f..789caabce9 100644 --- a/clientgui/DlgAbout.cpp +++ b/clientgui/DlgAbout.cpp @@ -136,3 +136,4 @@ bool CDlgAbout::ShowToolTips() { return TRUE; } + diff --git a/clientgui/DlgAbout.h b/clientgui/DlgAbout.h index ac74c88862..d4d4a6d710 100644 --- a/clientgui/DlgAbout.h +++ b/clientgui/DlgAbout.h @@ -59,3 +59,4 @@ public: #endif // _DLGABOUT_H_ + diff --git a/clientgui/DlgAttachProject.cpp b/clientgui/DlgAttachProject.cpp index 370f23f499..9a25bd8849 100644 --- a/clientgui/DlgAttachProject.cpp +++ b/clientgui/DlgAttachProject.cpp @@ -111,3 +111,4 @@ bool CDlgAttachProject::ShowToolTips() { return TRUE; } + diff --git a/clientgui/DlgAttachProject.h b/clientgui/DlgAttachProject.h index c926ff2aa7..637c13c824 100644 --- a/clientgui/DlgAttachProject.h +++ b/clientgui/DlgAttachProject.h @@ -64,3 +64,4 @@ public: #endif // _DLGATTACHPROJECT_H_ + diff --git a/clientgui/DlgConnection.cpp b/clientgui/DlgConnection.cpp index 8a2829d7d3..a6076f55fa 100644 --- a/clientgui/DlgConnection.cpp +++ b/clientgui/DlgConnection.cpp @@ -94,3 +94,4 @@ bool CDlgConnection::ShowToolTips() { return TRUE; } + diff --git a/clientgui/DlgConnection.h b/clientgui/DlgConnection.h index 404b7bb90d..f6cc900ea3 100644 --- a/clientgui/DlgConnection.h +++ b/clientgui/DlgConnection.h @@ -59,3 +59,4 @@ public: #endif // _DLGCONNECTION_H_ + diff --git a/clientgui/DlgOptions.cpp b/clientgui/DlgOptions.cpp index 8ce81887b4..995a10880c 100644 --- a/clientgui/DlgOptions.cpp +++ b/clientgui/DlgOptions.cpp @@ -254,3 +254,4 @@ bool CDlgOptions::ShowToolTips() { return TRUE; } + diff --git a/clientgui/DlgOptions.h b/clientgui/DlgOptions.h index 9e29d58ecd..a5b4abdc22 100644 --- a/clientgui/DlgOptions.h +++ b/clientgui/DlgOptions.h @@ -102,3 +102,4 @@ public: #endif // _DLGOPTIONS_H_ + diff --git a/clientgui/Events.h b/clientgui/Events.h index 05b74d001e..5a790a1ac1 100644 --- a/clientgui/Events.h +++ b/clientgui/Events.h @@ -28,4 +28,5 @@ enum { } enumEvents; -#endif \ No newline at end of file +#endif + diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index 39c6455ce1..edcdaaa626 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -35,3 +35,4 @@ CMainDocument::CMainDocument(void) CMainDocument::~CMainDocument(void) { } + diff --git a/clientgui/MainDocument.h b/clientgui/MainDocument.h index bef6274162..9253aac615 100644 --- a/clientgui/MainDocument.h +++ b/clientgui/MainDocument.h @@ -35,4 +35,5 @@ public: }; -#endif \ No newline at end of file +#endif + diff --git a/clientgui/MainFrame.cpp b/clientgui/MainFrame.cpp index 5e66710f7d..144867cc58 100644 --- a/clientgui/MainFrame.cpp +++ b/clientgui/MainFrame.cpp @@ -34,6 +34,7 @@ #include "Events.h" #include "DlgAbout.h" #include "DlgOptions.h" +#include "DlgAttachProject.h" #include "res/BOINCGUIApp.xpm" @@ -41,13 +42,14 @@ IMPLEMENT_DYNAMIC_CLASS(CMainFrame, wxFrame) 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) + EVT_CLOSE ( CMainFrame::OnClose) + EVT_IDLE ( CMainFrame::OnIdle) + EVT_MENU (wxID_EXIT, CMainFrame::OnExit) + EVT_MENU (ID_COMMANDSATTACHPROJECT, CMainFrame::OnCommandsAttachProject) + 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) END_EVENT_TABLE () @@ -93,7 +95,7 @@ bool CMainFrame::CreateMenu() { // Commands menu wxMenu *menuCommands = new wxMenu; - menuCommands->Append(wxID_EXIT, _("&Attach to Project...")); + menuCommands->Append(ID_COMMANDSATTACHPROJECT, _("&Attach to Project...")); // Tools menu wxMenu *menuTools = new wxMenu; @@ -149,15 +151,11 @@ bool CMainFrame::CreateNotebookPage(wxWindow* pwndNewNotebookPage) { wxASSERT(pwndNewNotebookPage->IsKindOf(CLASSINFO(CBaseListCtrlView)) || pwndNewNotebookPage->IsKindOf(CLASSINFO(CBaseWindowView))); - if(pwndNewNotebookPage->IsKindOf(CLASSINFO(CBaseListCtrlView))) - { + if(pwndNewNotebookPage->IsKindOf(CLASSINFO(CBaseListCtrlView))) { CBaseListCtrlView* pPage = (CBaseListCtrlView*)pwndNewNotebookPage; m_pNotebook->AddPage(pPage, pPage->GetViewName(), true, -1); - } - else - { - if(pwndNewNotebookPage->IsKindOf(CLASSINFO(CBaseWindowView))) - { + } else { + if(pwndNewNotebookPage->IsKindOf(CLASSINFO(CBaseWindowView))) { CBaseWindowView* pPage = (CBaseWindowView*)pwndNewNotebookPage; m_pNotebook->AddPage(pPage, pPage->GetViewName(), true, -1); } @@ -227,6 +225,16 @@ void CMainFrame::OnClose(wxCloseEvent &event) { } +void CMainFrame::OnCommandsAttachProject(wxCommandEvent &WXUNUSED(event)) { + CDlgAttachProject* pDlg = new CDlgAttachProject(this); + + pDlg->ShowModal(); + + if (pDlg) + delete pDlg; +} + + void CMainFrame::OnToolsOptions(wxCommandEvent &WXUNUSED(event)) { CDlgOptions* pDlg = new CDlgOptions(this); @@ -259,3 +267,4 @@ void CMainFrame::OnStatusbar (wxCommandEvent &WXUNUSED(event)) { void CMainFrame::OnStatusbarUI (wxUpdateUIEvent &event) { event.Check(m_pStatusbar != NULL); } + diff --git a/clientgui/MainFrame.h b/clientgui/MainFrame.h index 97f995ab4b..7163e39304 100644 --- a/clientgui/MainFrame.h +++ b/clientgui/MainFrame.h @@ -39,6 +39,7 @@ public: void OnIdle(wxIdleEvent &event); void OnExit(wxCommandEvent &event); + void OnCommandsAttachProject(wxCommandEvent &event); void OnToolsOptions(wxCommandEvent &event); void OnAbout(wxCommandEvent &event); void OnStatusbar(wxCommandEvent &event); @@ -71,4 +72,5 @@ private: }; -#endif \ No newline at end of file +#endif + diff --git a/clientgui/MessagesView.cpp b/clientgui/MessagesView.cpp index 962df21627..40e301af3d 100644 --- a/clientgui/MessagesView.cpp +++ b/clientgui/MessagesView.cpp @@ -51,3 +51,4 @@ wxString CMessagesView::GetViewName(void) { return wxString(_("Messages")); } + diff --git a/clientgui/MessagesView.h b/clientgui/MessagesView.h index f7529278cb..0397b41d25 100644 --- a/clientgui/MessagesView.h +++ b/clientgui/MessagesView.h @@ -41,4 +41,5 @@ public: }; -#endif \ No newline at end of file +#endif + diff --git a/clientgui/ProjectsView.cpp b/clientgui/ProjectsView.cpp index 30459b7ec0..114494767e 100644 --- a/clientgui/ProjectsView.cpp +++ b/clientgui/ProjectsView.cpp @@ -53,3 +53,4 @@ wxString CProjectsView::GetViewName(void) { return wxString(_("Projects")); } + diff --git a/clientgui/ProjectsView.h b/clientgui/ProjectsView.h index ee02ec0916..7a4f519bca 100644 --- a/clientgui/ProjectsView.h +++ b/clientgui/ProjectsView.h @@ -41,4 +41,5 @@ public: }; -#endif \ No newline at end of file +#endif + diff --git a/clientgui/ResourceUtilizationView.cpp b/clientgui/ResourceUtilizationView.cpp index f0a5aa143e..f8a5742f63 100644 --- a/clientgui/ResourceUtilizationView.cpp +++ b/clientgui/ResourceUtilizationView.cpp @@ -52,3 +52,4 @@ wxString CResourceUtilizationView::GetViewName(void) { return wxString(_("Disk")); } + diff --git a/clientgui/ResourceUtilizationView.h b/clientgui/ResourceUtilizationView.h index c7837054e6..47b5dd77ca 100644 --- a/clientgui/ResourceUtilizationView.h +++ b/clientgui/ResourceUtilizationView.h @@ -41,4 +41,5 @@ public: }; -#endif \ No newline at end of file +#endif + diff --git a/clientgui/TransfersView.cpp b/clientgui/TransfersView.cpp index 0d6f1137e4..206bf13618 100644 --- a/clientgui/TransfersView.cpp +++ b/clientgui/TransfersView.cpp @@ -55,3 +55,4 @@ wxString CTransfersView::GetViewName(void) { return wxString(_("Transfers")); } + diff --git a/clientgui/TransfersView.h b/clientgui/TransfersView.h index f33f953fef..ec68786e0f 100644 --- a/clientgui/TransfersView.h +++ b/clientgui/TransfersView.h @@ -41,4 +41,5 @@ public: }; -#endif \ No newline at end of file +#endif + diff --git a/clientgui/WorkView.cpp b/clientgui/WorkView.cpp index 14a03d76a9..b49841e3c5 100644 --- a/clientgui/WorkView.cpp +++ b/clientgui/WorkView.cpp @@ -56,3 +56,4 @@ wxString CWorkView::GetViewName(void) { return wxString(_("Work")); } + diff --git a/clientgui/WorkView.h b/clientgui/WorkView.h index d968c59fee..c53011e2bb 100644 --- a/clientgui/WorkView.h +++ b/clientgui/WorkView.h @@ -41,4 +41,5 @@ public: }; -#endif \ No newline at end of file +#endif + diff --git a/clientgui/_wx_intellisense.h b/clientgui/_wx_intellisense.h index c621768ec4..1913071f19 100644 --- a/clientgui/_wx_intellisense.h +++ b/clientgui/_wx_intellisense.h @@ -10,3 +10,4 @@ * Visual Studio the opportunity to parse the file and add its contents to intellisense. */ #include + diff --git a/clientgui/resource.h b/clientgui/resource.h index bad9222412..c555558f6d 100644 --- a/clientgui/resource.h +++ b/clientgui/resource.h @@ -15,3 +15,4 @@ #define _APS_NEXT_SYMED_VALUE 101 #endif #endif + diff --git a/clientgui/stdwx.cpp b/clientgui/stdwx.cpp index 553b1d63c6..e51b474920 100644 --- a/clientgui/stdwx.cpp +++ b/clientgui/stdwx.cpp @@ -33,3 +33,4 @@ // 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 c70a846f1f..8fb46a81a1 100644 --- a/clientgui/stdwx.h +++ b/clientgui/stdwx.h @@ -48,4 +48,5 @@ #include // system settings #include // static line -#endif \ No newline at end of file +#endif +