*** empty log message ***

svn path=/trunk/boinc/; revision=5336
This commit is contained in:
Rom Walton 2005-02-07 04:47:18 +00:00
parent daa7c4559d
commit 9caa71644b
8 changed files with 569 additions and 384 deletions

View File

@ -24105,3 +24105,19 @@ David 6 Feb 2005
handle_request.C
sched_send.C
server_types.C
Rom 6 Feb 2005
- Bug Fix: Enable the user to select which language the BOINC Manager
should display on startup. This is configured via the tools\options
dialog.
- Bug Fix: BOINC Manager should now remember whether it is maximized
or minimized, it does not remember position because wxWidgets
has a hard time with negitive coordinate values that multi-mon
configurations may have. If you plug in a negative value for
x or y the client ends up off the visible part of the screen.
clientgui/
BOINCGUI.pjd
BOINCGUIApp.cpp, .h
DlgOptions.cpp, .h
MainFrame.cpp, .h

File diff suppressed because it is too large Load Diff

View File

@ -68,6 +68,9 @@ bool CBOINCGUIApp::OnInit()
m_hBOINCCoreProcess = NULL;
m_hIdleDetectionDll = NULL;
#endif
m_strDefaultWindowStation.Clear();
m_strDefaultDesktop.Clear();
// Initialize the BOINC Diagnostics Framework
int dwDiagnosticsFlags =
@ -89,6 +92,8 @@ bool CBOINCGUIApp::OnInit()
wxConfigBase::Set(m_pConfig);
wxASSERT(NULL != m_pConfig);
m_pConfig->SetPath(wxT("/"));
// Enable Logging and Trace Masks
m_pLog = new wxLogBOINC();
wxLog::SetActiveTarget(m_pLog);
@ -106,11 +111,15 @@ bool CBOINCGUIApp::OnInit()
m_pLocale = new wxLocale();
wxASSERT(NULL != m_pLocale);
// Locale information is stored relative to the executable,
m_pLocale->Init();
wxInt32 iSelectedLanguage = m_pConfig->Read(wxT("Language"), 0L);
// Locale information is stored relative to the executable.
m_pLocale->Init(iSelectedLanguage);
m_pLocale->AddCatalogLookupPathPrefix(wxT("locale"));
m_pLocale->AddCatalog(GetAppName());
InitSupportedLanguages();
// Commandline parsing is done in wxApp::OnInit()
if (!wxApp::OnInit())
return false;
@ -249,6 +258,27 @@ void CBOINCGUIApp::DetectDefaultDesktop()
}
void CBOINCGUIApp::InitSupportedLanguages()
{
wxInt32 iIndex = 0;
const wxLanguageInfo* liLanguage = NULL;
// These are just special tags so deal with them in a special way
m_strLanguages[wxLANGUAGE_DEFAULT] = _("(Automatic Detection)");
m_strLanguages[wxLANGUAGE_UNKNOWN] = _("(Unknown)");
m_strLanguages[wxLANGUAGE_USER_DEFINED] = _("(User Defined)");
for ( iIndex = 0; iIndex <= wxLANGUAGE_USER_DEFINED; iIndex++ )
{
liLanguage = wxLocale::GetLanguageInfo( iIndex );
if ( NULL != liLanguage )
{
m_strLanguages[iIndex] = liLanguage->Description;
}
}
}
bool CBOINCGUIApp::IsBOINCCoreRunning()
{
wxInt32 iMode = -1;

View File

@ -46,6 +46,8 @@ protected:
void DetectDefaultWindowStation();
void DetectDefaultDesktop();
void InitSupportedLanguages();
bool IsBOINCCoreRunning();
void StartupBOINCCore();
void ShutdownBOINCCore();
@ -76,21 +78,27 @@ protected:
wxString m_strDefaultWindowStation;
wxString m_strDefaultDesktop;
// The last value defined in the wxLanguage enum is wxLANGUAGE_USER_DEFINED.
// defined in: wx/intl.h
wxString m_strLanguages[wxLANGUAGE_USER_DEFINED + 1];
public:
bool OnInit();
wxInt32 UpdateSystemIdleDetection();
CMainFrame* GetFrame() { return m_pFrame; };
CMainDocument* GetDocument() { return m_pDocument; };
CMainFrame* GetFrame() { return m_pFrame; };
CMainDocument* GetDocument() { return m_pDocument; };
#ifndef NOTASKBAR
CTaskBarIcon* GetTaskBarIcon() { return m_pTaskBarIcon; };
CTaskBarIcon* GetTaskBarIcon() { return m_pTaskBarIcon; };
#endif
wxString GetDefaultWindowStation() { return m_strDefaultWindowStation; };
wxString GetDefaultDesktop() { return m_strDefaultDesktop; };
wxString GetDefaultWindowStation() { return m_strDefaultWindowStation; };
wxString GetDefaultDesktop() { return m_strDefaultDesktop; };
wxString* GetSupportedLanguages() { return (wxString*)&m_strLanguages; };
wxInt32 GetSupportedLanguagesCount() { return WXSIZEOF(m_strLanguages); };
};

View File

@ -23,6 +23,7 @@
#endif
#include "stdwx.h"
#include "BOINCGUIApp.h"
#include "DlgOptions.h"
@ -95,143 +96,151 @@ void CDlgOptions::CreateControls()
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
itemPanel4->SetSizer(itemBoxSizer5);
itemPanel4->SetAutoLayout(TRUE);
wxStaticText* itemStaticText6 = new wxStaticText;
itemStaticText6->Create( itemPanel4, wxID_STATIC, _("This page is intentionally left blank"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
itemBoxSizer5->Add(itemStaticText6, 1, wxGROW, 5);
wxGridSizer* itemGridSizer6 = new wxGridSizer(2, 2, 0, 0);
itemBoxSizer5->Add(itemGridSizer6, 0, wxGROW|wxALL, 3);
wxStaticText* itemStaticText7 = new wxStaticText;
itemStaticText7->Create( itemPanel4, wxID_STATIC, _("Language Selection:"), wxDefaultPosition, wxDefaultSize, 0 );
itemGridSizer6->Add(itemStaticText7, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxComboBox* itemComboBox8 = new wxComboBox;
itemComboBox8->Create( itemPanel4, ID_LANGUAGESELECTION, wxT(""), wxDefaultPosition, wxDefaultSize, wxGetApp().GetSupportedLanguagesCount(), wxGetApp().GetSupportedLanguages(), wxCB_READONLY );
m_LanguageSelectionCtrl = itemComboBox8;
itemComboBox8->SetStringSelection(_("(Automatic Detection)"));
itemGridSizer6->Add(itemComboBox8, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemNotebook3->AddPage(itemPanel4, _("General"));
wxPanel* itemPanel7 = new wxPanel;
itemPanel7->Create( itemNotebook3, ID_HTTPPROXY, wxDefaultPosition, wxSize(99, 150), wxTAB_TRAVERSAL );
wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL);
itemPanel7->SetSizer(itemBoxSizer8);
itemPanel7->SetAutoLayout(TRUE);
wxCheckBox* itemCheckBox9 = new wxCheckBox;
itemCheckBox9->Create( itemPanel7, ID_ENABLEHTTPPROXYCTRL, _("Connect via HTTP proxy server"), wxDefaultPosition, wxDefaultSize, 0 );
m_EnableHTTPProxyCtrl = itemCheckBox9;
itemCheckBox9->SetValue(FALSE);
itemBoxSizer8->Add(itemCheckBox9, 0, wxGROW|wxALL, 5);
wxStaticBox* itemStaticBoxSizer10Static = new wxStaticBox(itemPanel7, wxID_ANY, _("HTTP Proxy Server Configuration"));
wxStaticBoxSizer* itemStaticBoxSizer10 = new wxStaticBoxSizer(itemStaticBoxSizer10Static, wxVERTICAL);
itemBoxSizer8->Add(itemStaticBoxSizer10, 0, wxGROW|wxALL, 5);
wxGridSizer* itemGridSizer11 = new wxGridSizer(2, 1, 0, 0);
itemStaticBoxSizer10->Add(itemGridSizer11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxFlexGridSizer* itemFlexGridSizer12 = new wxFlexGridSizer(2, 2, 0, 0);
itemGridSizer11->Add(itemFlexGridSizer12, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText13 = new wxStaticText;
itemStaticText13->Create( itemPanel7, wxID_STATIC, _("Address:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer12->Add(itemStaticText13, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxTextCtrl* itemTextCtrl14 = new wxTextCtrl;
itemTextCtrl14->Create( itemPanel7, ID_HTTPADDRESSCTRL, _T(""), wxDefaultPosition, wxSize(150, -1), 0 );
m_HTTPAddressCtrl = itemTextCtrl14;
itemFlexGridSizer12->Add(itemTextCtrl14, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxPanel* itemPanel9 = new wxPanel;
itemPanel9->Create( itemNotebook3, ID_HTTPPROXY, wxDefaultPosition, wxSize(99, 150), wxTAB_TRAVERSAL );
wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxVERTICAL);
itemPanel9->SetSizer(itemBoxSizer10);
itemPanel9->SetAutoLayout(TRUE);
wxCheckBox* itemCheckBox11 = new wxCheckBox;
itemCheckBox11->Create( itemPanel9, ID_ENABLEHTTPPROXYCTRL, _("Connect via HTTP proxy server"), wxDefaultPosition, wxDefaultSize, 0 );
m_EnableHTTPProxyCtrl = itemCheckBox11;
itemCheckBox11->SetValue(FALSE);
itemBoxSizer10->Add(itemCheckBox11, 0, wxGROW|wxALL, 5);
wxStaticBox* itemStaticBoxSizer12Static = new wxStaticBox(itemPanel9, wxID_ANY, _("HTTP Proxy Server Configuration"));
wxStaticBoxSizer* itemStaticBoxSizer12 = new wxStaticBoxSizer(itemStaticBoxSizer12Static, wxVERTICAL);
itemBoxSizer10->Add(itemStaticBoxSizer12, 0, wxGROW|wxALL, 5);
wxGridSizer* itemGridSizer13 = new wxGridSizer(2, 1, 0, 0);
itemStaticBoxSizer12->Add(itemGridSizer13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxFlexGridSizer* itemFlexGridSizer14 = new wxFlexGridSizer(2, 2, 0, 0);
itemGridSizer13->Add(itemFlexGridSizer14, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText15 = new wxStaticText;
itemStaticText15->Create( itemPanel7, wxID_STATIC, _("Port:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer12->Add(itemStaticText15, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
itemStaticText15->Create( itemPanel9, wxID_STATIC, _("Address:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer14->Add(itemStaticText15, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxTextCtrl* itemTextCtrl16 = new wxTextCtrl;
itemTextCtrl16->Create( itemPanel7, ID_HTTPPORTCTRL, _T(""), wxDefaultPosition, wxSize(50, -1), 0 );
m_HTTPPortCtrl = itemTextCtrl16;
itemFlexGridSizer12->Add(itemTextCtrl16, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemTextCtrl16->Create( itemPanel9, ID_HTTPADDRESSCTRL, _T(""), wxDefaultPosition, wxSize(150, -1), 0 );
m_HTTPAddressCtrl = itemTextCtrl16;
itemFlexGridSizer14->Add(itemTextCtrl16, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticBox* itemStaticBoxSizer17Static = new wxStaticBox(itemPanel7, wxID_ANY, _("Leave these blank if not needed"));
wxStaticBoxSizer* itemStaticBoxSizer17 = new wxStaticBoxSizer(itemStaticBoxSizer17Static, wxVERTICAL);
itemStaticBoxSizer10->Add(itemStaticBoxSizer17, 0, wxGROW|wxALL, 5);
wxFlexGridSizer* itemFlexGridSizer18 = new wxFlexGridSizer(2, 2, 0, 0);
itemStaticBoxSizer17->Add(itemFlexGridSizer18, 0, wxALIGN_LEFT|wxALL, 5);
wxStaticText* itemStaticText19 = new wxStaticText;
itemStaticText19->Create( itemPanel7, wxID_STATIC, _("User Name:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer18->Add(itemStaticText19, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText17 = new wxStaticText;
itemStaticText17->Create( itemPanel9, wxID_STATIC, _("Port:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer14->Add(itemStaticText17, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxTextCtrl* itemTextCtrl20 = new wxTextCtrl;
itemTextCtrl20->Create( itemPanel7, ID_HTTPUSERNAMECTRL, _T(""), wxDefaultPosition, wxSize(175, -1), 0 );
m_HTTPUsernameCtrl = itemTextCtrl20;
itemFlexGridSizer18->Add(itemTextCtrl20, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxTextCtrl* itemTextCtrl18 = new wxTextCtrl;
itemTextCtrl18->Create( itemPanel9, ID_HTTPPORTCTRL, _T(""), wxDefaultPosition, wxSize(50, -1), 0 );
m_HTTPPortCtrl = itemTextCtrl18;
itemFlexGridSizer14->Add(itemTextCtrl18, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticBox* itemStaticBoxSizer19Static = new wxStaticBox(itemPanel9, wxID_ANY, _("Leave these blank if not needed"));
wxStaticBoxSizer* itemStaticBoxSizer19 = new wxStaticBoxSizer(itemStaticBoxSizer19Static, wxVERTICAL);
itemStaticBoxSizer12->Add(itemStaticBoxSizer19, 0, wxGROW|wxALL, 5);
wxFlexGridSizer* itemFlexGridSizer20 = new wxFlexGridSizer(2, 2, 0, 0);
itemStaticBoxSizer19->Add(itemFlexGridSizer20, 0, wxALIGN_LEFT|wxALL, 5);
wxStaticText* itemStaticText21 = new wxStaticText;
itemStaticText21->Create( itemPanel7, wxID_STATIC, _("Password:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer18->Add(itemStaticText21, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
itemStaticText21->Create( itemPanel9, wxID_STATIC, _("User Name:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer20->Add(itemStaticText21, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxTextCtrl* itemTextCtrl22 = new wxTextCtrl;
itemTextCtrl22->Create( itemPanel7, ID_HTTPPASSWORDCTRL, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
m_HTTPPasswordCtrl = itemTextCtrl22;
itemFlexGridSizer18->Add(itemTextCtrl22, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemTextCtrl22->Create( itemPanel9, ID_HTTPUSERNAMECTRL, _T(""), wxDefaultPosition, wxSize(175, -1), 0 );
m_HTTPUsernameCtrl = itemTextCtrl22;
itemFlexGridSizer20->Add(itemTextCtrl22, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemNotebook3->AddPage(itemPanel7, _("HTTP Proxy"));
wxPanel* itemPanel23 = new wxPanel;
itemPanel23->Create( itemNotebook3, ID_SOCKSPROXY, wxDefaultPosition, wxSize(99, 80), wxTAB_TRAVERSAL );
wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxVERTICAL);
itemPanel23->SetSizer(itemBoxSizer24);
itemPanel23->SetAutoLayout(TRUE);
wxCheckBox* itemCheckBox25 = new wxCheckBox;
itemCheckBox25->Create( itemPanel23, ID_ENABLESOCKSPROXYCTRL, _("Connect via SOCKS proxy server"), wxDefaultPosition, wxDefaultSize, 0 );
m_EnableSOCKSProxyCtrl = itemCheckBox25;
itemCheckBox25->SetValue(FALSE);
itemBoxSizer24->Add(itemCheckBox25, 0, wxGROW|wxALL, 5);
wxStaticText* itemStaticText23 = new wxStaticText;
itemStaticText23->Create( itemPanel9, wxID_STATIC, _("Password:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer20->Add(itemStaticText23, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxStaticBox* itemStaticBoxSizer26Static = new wxStaticBox(itemPanel23, wxID_ANY, _("SOCKS Proxy Server Configuration"));
wxStaticBoxSizer* itemStaticBoxSizer26 = new wxStaticBoxSizer(itemStaticBoxSizer26Static, wxVERTICAL);
itemBoxSizer24->Add(itemStaticBoxSizer26, 0, wxGROW|wxALL, 5);
wxGridSizer* itemGridSizer27 = new wxGridSizer(2, 1, 0, 0);
itemStaticBoxSizer26->Add(itemGridSizer27, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxFlexGridSizer* itemFlexGridSizer28 = new wxFlexGridSizer(2, 2, 0, 0);
itemGridSizer27->Add(itemFlexGridSizer28, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText29 = new wxStaticText;
itemStaticText29->Create( itemPanel23, wxID_STATIC, _("Address:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer28->Add(itemStaticText29, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxTextCtrl* itemTextCtrl24 = new wxTextCtrl;
itemTextCtrl24->Create( itemPanel9, ID_HTTPPASSWORDCTRL, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
m_HTTPPasswordCtrl = itemTextCtrl24;
itemFlexGridSizer20->Add(itemTextCtrl24, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxTextCtrl* itemTextCtrl30 = new wxTextCtrl;
itemTextCtrl30->Create( itemPanel23, ID_SOCKSADDRESSCTRL, _T(""), wxDefaultPosition, wxSize(150, -1), 0 );
m_SOCKSAddressCtrl = itemTextCtrl30;
itemFlexGridSizer28->Add(itemTextCtrl30, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemNotebook3->AddPage(itemPanel9, _("HTTP Proxy"));
wxPanel* itemPanel25 = new wxPanel;
itemPanel25->Create( itemNotebook3, ID_SOCKSPROXY, wxDefaultPosition, wxSize(99, 80), wxTAB_TRAVERSAL );
wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL);
itemPanel25->SetSizer(itemBoxSizer26);
itemPanel25->SetAutoLayout(TRUE);
wxCheckBox* itemCheckBox27 = new wxCheckBox;
itemCheckBox27->Create( itemPanel25, ID_ENABLESOCKSPROXYCTRL, _("Connect via SOCKS proxy server"), wxDefaultPosition, wxDefaultSize, 0 );
m_EnableSOCKSProxyCtrl = itemCheckBox27;
itemCheckBox27->SetValue(FALSE);
itemBoxSizer26->Add(itemCheckBox27, 0, wxGROW|wxALL, 5);
wxStaticBox* itemStaticBoxSizer28Static = new wxStaticBox(itemPanel25, wxID_ANY, _("SOCKS Proxy Server Configuration"));
wxStaticBoxSizer* itemStaticBoxSizer28 = new wxStaticBoxSizer(itemStaticBoxSizer28Static, wxVERTICAL);
itemBoxSizer26->Add(itemStaticBoxSizer28, 0, wxGROW|wxALL, 5);
wxGridSizer* itemGridSizer29 = new wxGridSizer(2, 1, 0, 0);
itemStaticBoxSizer28->Add(itemGridSizer29, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxFlexGridSizer* itemFlexGridSizer30 = new wxFlexGridSizer(2, 2, 0, 0);
itemGridSizer29->Add(itemFlexGridSizer30, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText31 = new wxStaticText;
itemStaticText31->Create( itemPanel23, wxID_STATIC, _("Port:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer28->Add(itemStaticText31, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
itemStaticText31->Create( itemPanel25, wxID_STATIC, _("Address:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer30->Add(itemStaticText31, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxTextCtrl* itemTextCtrl32 = new wxTextCtrl;
itemTextCtrl32->Create( itemPanel23, ID_SOCKSPORTCTRL, _T(""), wxDefaultPosition, wxSize(50, -1), 0 );
m_SOCKSPortCtrl = itemTextCtrl32;
itemFlexGridSizer28->Add(itemTextCtrl32, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemTextCtrl32->Create( itemPanel25, ID_SOCKSADDRESSCTRL, _T(""), wxDefaultPosition, wxSize(150, -1), 0 );
m_SOCKSAddressCtrl = itemTextCtrl32;
itemFlexGridSizer30->Add(itemTextCtrl32, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticBox* itemStaticBoxSizer33Static = new wxStaticBox(itemPanel23, wxID_ANY, _("Leave these blank if not needed"));
wxStaticBoxSizer* itemStaticBoxSizer33 = new wxStaticBoxSizer(itemStaticBoxSizer33Static, wxVERTICAL);
itemStaticBoxSizer26->Add(itemStaticBoxSizer33, 0, wxGROW|wxALL, 5);
wxFlexGridSizer* itemFlexGridSizer34 = new wxFlexGridSizer(2, 2, 0, 0);
itemStaticBoxSizer33->Add(itemFlexGridSizer34, 0, wxALIGN_LEFT|wxALL, 5);
wxStaticText* itemStaticText35 = new wxStaticText;
itemStaticText35->Create( itemPanel23, wxID_STATIC, _("User Name:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer34->Add(itemStaticText35, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText33 = new wxStaticText;
itemStaticText33->Create( itemPanel25, wxID_STATIC, _("Port:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer30->Add(itemStaticText33, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxTextCtrl* itemTextCtrl36 = new wxTextCtrl;
itemTextCtrl36->Create( itemPanel23, ID_SOCKSUSERNAMECTRL, _T(""), wxDefaultPosition, wxSize(175, -1), 0 );
m_SOCKSUsernameCtrl = itemTextCtrl36;
itemFlexGridSizer34->Add(itemTextCtrl36, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxTextCtrl* itemTextCtrl34 = new wxTextCtrl;
itemTextCtrl34->Create( itemPanel25, ID_SOCKSPORTCTRL, _T(""), wxDefaultPosition, wxSize(50, -1), 0 );
m_SOCKSPortCtrl = itemTextCtrl34;
itemFlexGridSizer30->Add(itemTextCtrl34, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticBox* itemStaticBoxSizer35Static = new wxStaticBox(itemPanel25, wxID_ANY, _("Leave these blank if not needed"));
wxStaticBoxSizer* itemStaticBoxSizer35 = new wxStaticBoxSizer(itemStaticBoxSizer35Static, wxVERTICAL);
itemStaticBoxSizer28->Add(itemStaticBoxSizer35, 0, wxGROW|wxALL, 5);
wxFlexGridSizer* itemFlexGridSizer36 = new wxFlexGridSizer(2, 2, 0, 0);
itemStaticBoxSizer35->Add(itemFlexGridSizer36, 0, wxALIGN_LEFT|wxALL, 5);
wxStaticText* itemStaticText37 = new wxStaticText;
itemStaticText37->Create( itemPanel23, wxID_STATIC, _("Password:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer34->Add(itemStaticText37, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
itemStaticText37->Create( itemPanel25, wxID_STATIC, _("User Name:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer36->Add(itemStaticText37, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxTextCtrl* itemTextCtrl38 = new wxTextCtrl;
itemTextCtrl38->Create( itemPanel23, ID_SOCKSPASSWORDCTRL, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
m_SOCKSPasswordCtrl = itemTextCtrl38;
itemFlexGridSizer34->Add(itemTextCtrl38, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemTextCtrl38->Create( itemPanel25, ID_SOCKSUSERNAMECTRL, _T(""), wxDefaultPosition, wxSize(175, -1), 0 );
m_SOCKSUsernameCtrl = itemTextCtrl38;
itemFlexGridSizer36->Add(itemTextCtrl38, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemNotebook3->AddPage(itemPanel23, _("SOCKS Proxy"));
wxStaticText* itemStaticText39 = new wxStaticText;
itemStaticText39->Create( itemPanel25, wxID_STATIC, _("Password:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer36->Add(itemStaticText39, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
wxTextCtrl* itemTextCtrl40 = new wxTextCtrl;
itemTextCtrl40->Create( itemPanel25, ID_SOCKSPASSWORDCTRL, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
m_SOCKSPasswordCtrl = itemTextCtrl40;
itemFlexGridSizer36->Add(itemTextCtrl40, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemNotebook3->AddPage(itemPanel25, _("SOCKS Proxy"));
itemBoxSizer2->Add(itemNotebook3Sizer, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxBoxSizer* itemBoxSizer39 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer2->Add(itemBoxSizer39, 0, wxALIGN_RIGHT|wxALL, 5);
wxButton* itemButton40 = new wxButton;
itemButton40->Create( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton40->SetDefault();
itemBoxSizer39->Add(itemButton40, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxBoxSizer* itemBoxSizer41 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer2->Add(itemBoxSizer41, 0, wxALIGN_RIGHT|wxALL, 5);
wxButton* itemButton42 = new wxButton;
itemButton42->Create( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton42->SetDefault();
itemBoxSizer41->Add(itemButton42, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton41 = new wxButton;
itemButton41->Create( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer39->Add(itemButton41, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton43 = new wxButton;
itemButton43->Create( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer41->Add(itemButton43, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
}

View File

@ -33,7 +33,8 @@
#define SYMBOL_CDLGTOOLSOPTIONS_POSITION wxDefaultPosition
#define ID_NOTEBOOK 10001
#define ID_GENERAL 10002
#define ID_HTTPPROXY 10003
#define ID_LANGUAGESELECTION 10003
#define ID_HTTPPROXY 10004
#define ID_ENABLEHTTPPROXYCTRL 10007
#define ID_HTTPADDRESSCTRL 10010
#define ID_HTTPPORTCTRL 10011
@ -88,6 +89,7 @@ public:
/// Should we show tooltips?
static bool ShowToolTips();
wxComboBox* m_LanguageSelectionCtrl;
bool m_bProxySectionConfigured;
wxCheckBox* m_EnableHTTPProxyCtrl;
wxTextCtrl* m_HTTPAddressCtrl;

View File

@ -72,6 +72,9 @@ END_EVENT_TABLE ()
CMainFrame::CMainFrame()
{
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::CMainFrame - Default Constructor Function Begin"));
m_iSelectedLanguage = 0;
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::CMainFrame - Default Constructor Function End"));
}
@ -427,9 +430,17 @@ bool CMainFrame::SaveState()
//
pConfig->SetPath(strBaseConfigLocation);
pConfig->Write(wxT("Language"), m_iSelectedLanguage);
pConfig->Write(wxT("CurrentPage"), m_pNotebook->GetSelection());
pConfig->Write(wxT("Width"), GetSize().GetWidth());
pConfig->Write(wxT("Height"), GetSize().GetHeight());
pConfig->Write(wxT("WindowIconized"), IsIconized());
pConfig->Write(wxT("WindowMaximized"), IsMaximized());
if ( !IsIconized() && !IsMaximized() )
{
pConfig->Write(wxT("Width"), GetSize().GetWidth());
pConfig->Write(wxT("Height"), GetSize().GetHeight());
}
//
@ -472,6 +483,10 @@ bool CMainFrame::RestoreState()
wxString strPreviousLocation = wxEmptyString;
wxInt32 iIndex = 0;
wxInt32 iPageCount = 0;
bool bWindowIconized = false;
bool bWindowMaximized = false;
wxInt32 iTop = 0;
wxInt32 iLeft = 0;
wxInt32 iHeight = 0;
wxInt32 iWidth = 0;
@ -488,12 +503,21 @@ bool CMainFrame::RestoreState()
pConfig->SetPath(strBaseConfigLocation);
pConfig->Read(wxT("Language"), &m_iSelectedLanguage, 0L);
pConfig->Read(wxT("CurrentPage"), &iCurrentPage, 1);
m_pNotebook->SetSelection(iCurrentPage);
pConfig->Read(wxT("WindowIconized"), &bWindowIconized, false);
pConfig->Read(wxT("WindowMaximized"), &bWindowMaximized, false);
pConfig->Read(wxT("Width"), &iWidth, 800);
pConfig->Read(wxT("Height"), &iHeight, 600);
SetSize( -1, -1, iWidth, iHeight );
Iconize( bWindowIconized );
Maximize( bWindowMaximized );
//
@ -691,6 +715,8 @@ void CMainFrame::OnToolsOptions( wxCommandEvent& WXUNUSED(event) )
pDlg->m_SOCKSUsernameCtrl->SetValue( strBuffer );
if ( 0 == pDoc->GetProxySOCKSPassword( strBuffer ) )
pDlg->m_SOCKSPasswordCtrl->SetValue( strBuffer );
pDlg->m_LanguageSelectionCtrl->SetSelection( m_iSelectedLanguage );
}
iAnswer = pDlg->ShowModal();
@ -721,6 +747,17 @@ void CMainFrame::OnToolsOptions( wxCommandEvent& WXUNUSED(event) )
pDoc->SetProxySOCKSPassword( strBuffer );
pDoc->SetProxyConfiguration();
if ( m_iSelectedLanguage != pDlg->m_LanguageSelectionCtrl->GetSelection() )
{
::wxMessageBox(
_("The BOINC Managers default language has been changed, in order for this change to take affect you must restart the manager."),
_("Language Selection..."),
wxICON_INFORMATION
);
}
m_iSelectedLanguage = pDlg->m_LanguageSelectionCtrl->GetSelection();
}
if (pDlg)

View File

@ -74,6 +74,8 @@ private:
wxString m_strBaseTitle;
wxInt32 m_iSelectedLanguage;
bool CreateMenu();
bool DeleteMenu();