From f0da3b7c50236443d3810b76f42ba7ec297673fd Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 10 Nov 2008 19:44:54 +0000 Subject: [PATCH] - MGR: Provide a way to re-enable the Exit Dialog. clientgui/ AdvancedFrame.cpp BOINCGUIApp.h DlgOptions.cpp, .h svn path=/trunk/boinc/; revision=16462 --- checkin_notes | 8 ++++++++ clientgui/AdvancedFrame.cpp | 6 ++++++ clientgui/BOINCGUIApp.h | 5 +++++ clientgui/DlgOptions.cpp | 11 +++++++++++ clientgui/DlgOptions.h | 2 ++ 5 files changed, 32 insertions(+) diff --git a/checkin_notes b/checkin_notes index 74c5325ac0..d08f396884 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9330,3 +9330,11 @@ Rom 10 Nov 2008 clientgui/ SkinManager.cpp DlgExitMessage.cpp + +Rom 10 Nov 2008 + - MGR: Provide a way to re-enable the Exit Dialog. + + clientgui/ + AdvancedFrame.cpp + BOINCGUIApp.h + DlgOptions.cpp, .h diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index 293812e556..7b0eeb04c2 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -1497,7 +1497,10 @@ void CAdvancedFrame::OnOptionsOptions(wxCommandEvent& WXUNUSED(event)) { dlg.m_ReminderFrequencyCtrl->SetValue(m_iReminderFrequency); #ifdef __WXMSW__ dlg.m_EnableBOINCManagerAutoStartCtrl->SetValue(!wxGetApp().GetBOINCMGRDisableAutoStart()); + dlg.m_EnableBOINCManagerExitMessageCtrl->SetValue(wxGetApp().GetBOINCMGRDisplayExitMessage()); +#endif +#ifdef __WXMSW__ // Connection Tab if (m_pDialupManager) { m_pDialupManager->GetISPNames(astrDialupConnections); @@ -1570,7 +1573,10 @@ void CAdvancedFrame::OnOptionsOptions(wxCommandEvent& WXUNUSED(event)) { m_iReminderFrequency = dlg.m_ReminderFrequencyCtrl->GetValue(); #ifdef __WXMSW__ wxGetApp().SetBOINCMGRDisableAutoStart(!dlg.m_EnableBOINCManagerAutoStartCtrl->GetValue()); + wxGetApp().SetBOINCMGRDisplayExitMessage(dlg.m_EnableBOINCManagerExitMessageCtrl->GetValue()); +#endif +#ifdef __WXMSW__ // Connection Tab m_strNetworkDialupConnectionName = dlg.GetDefaultDialupConnection(); #endif diff --git a/clientgui/BOINCGUIApp.h b/clientgui/BOINCGUIApp.h index f0b4071a8e..37ec273cd6 100644 --- a/clientgui/BOINCGUIApp.h +++ b/clientgui/BOINCGUIApp.h @@ -142,6 +142,11 @@ public: void SetBOINCMGRDisableAutoStart(int iDisableAutoStart) { m_iBOINCMGRDisableAutoStart = iDisableAutoStart; } + int GetBOINCMGRDisplayExitMessage() + { return m_iDisplayExitDialog; } + void SetBOINCMGRDisplayExitMessage(int iDisplayExitMessage) + { m_iDisplayExitDialog = iDisplayExitMessage; } + wxArrayString& GetSupportedLanguages() { return m_astrLanguages; } diff --git a/clientgui/DlgOptions.cpp b/clientgui/DlgOptions.cpp index d9507e2f3a..4b409efdb0 100644 --- a/clientgui/DlgOptions.cpp +++ b/clientgui/DlgOptions.cpp @@ -86,6 +86,7 @@ bool CDlgOptions::Create(wxWindow* parent, wxWindowID id, const wxString& captio m_LanguageSelectionCtrl = NULL; m_ReminderFrequencyCtrl = NULL; m_EnableBOINCManagerAutoStartCtrl = NULL; + m_EnableBOINCManagerExitMessageCtrl = NULL; m_DialupStaticBoxCtrl = NULL; #if defined(__WXMSW__) m_DialupConnectionsCtrl = NULL; @@ -189,6 +190,16 @@ void CDlgOptions::CreateControls() if (ShowToolTips()) m_EnableBOINCManagerAutoStartCtrl->SetToolTip(_("Launch BOINC Manager when you log on.")); itemFlexGridSizer6->Add(m_EnableBOINCManagerAutoStartCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxStaticText* itemStaticText11 = new wxStaticText; + itemStaticText11->Create( itemPanel4, wxID_STATIC, _("Enable BOINC Manager exit message:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer6->Add(itemStaticText11, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5); + + m_EnableBOINCManagerExitMessageCtrl = new wxCheckBox; + m_EnableBOINCManagerExitMessageCtrl->Create( itemPanel4, ID_ENABLEEXITMESSAGE, wxT(""), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE); + if (ShowToolTips()) + m_EnableBOINCManagerExitMessageCtrl->SetToolTip(_("Display the exit message dialog when shutting down BOINC Manager.")); + itemFlexGridSizer6->Add(m_EnableBOINCManagerExitMessageCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); #endif itemNotebook3->AddPage(itemPanel4, _("General")); diff --git a/clientgui/DlgOptions.h b/clientgui/DlgOptions.h index eac0df5201..62cfbf245d 100644 --- a/clientgui/DlgOptions.h +++ b/clientgui/DlgOptions.h @@ -53,6 +53,7 @@ #define ID_LANGUAGESELECTION 10004 #define ID_REMINDERFREQUENCY 10018 #define ID_ENABLEAUTOSTART 10031 +#define ID_ENABLEEXITMESSAGE 10032 #define ID_CONNECTONS 10019 #define ID_NETWORKAUTODETECT 10020 #define ID_NETWORKLAN 10021 @@ -157,6 +158,7 @@ public: wxComboBox* m_LanguageSelectionCtrl; wxSlider* m_ReminderFrequencyCtrl; wxCheckBox* m_EnableBOINCManagerAutoStartCtrl; + wxCheckBox* m_EnableBOINCManagerExitMessageCtrl; wxStaticBoxSizer* m_DialupStaticBoxCtrl; wxListBox* m_DialupConnectionsCtrl; wxButton* m_DialupSetDefaultCtrl;