*** empty log message ***

svn path=/trunk/boinc/; revision=5753
This commit is contained in:
Rom Walton 2005-04-01 22:17:44 +00:00
parent 04cb56544b
commit a5dd77fa89
13 changed files with 899 additions and 479 deletions

View File

@ -26450,3 +26450,16 @@ Rom 31 Mar 2005
clientgui/
BOINCTaskBar.cpp
MainFrame.cpp, .h
Rom 1 Apr 2005
- Make the dialog manager files and implementation match so others
can make changes to the dialogs
clientgui/
BOINCGUI.pjd
DlgAbout.cpp, .h
DlgAccountManager.cpp, .h
DlgAttachProject.cpp, .h
DlgConnection.cpp, .h
DlgOptions.cpp, .h
DlgSelectComputer.cpp, .h

File diff suppressed because it is too large Load Diff

View File

@ -16,14 +16,25 @@
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation "DlgAbout.h"
#endif
#include "stdwx.h"
#include "BOINCGUIApp.h"
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
////@begin includes
////@end includes
#include "DlgAbout.h"
#ifdef __WXMSW__
@ -32,14 +43,31 @@
#include "config.h"
#endif
////@begin XPM images
#include "res/boincsm.xpm"
////@end XPM images
/*!
* CDlgAbout type definition
*/
IMPLEMENT_CLASS( CDlgAbout, wxDialog )
IMPLEMENT_DYNAMIC_CLASS( CDlgAbout, wxDialog )
/*!
* CDlgAbout event table definition
*/
BEGIN_EVENT_TABLE( CDlgAbout, wxDialog )
////@begin CDlgAbout event table entries
////@end CDlgAbout event table entries
END_EVENT_TABLE()
/*!
* CDlgAbout constructors
*/
CDlgAbout::CDlgAbout( )
{
@ -50,109 +78,144 @@ CDlgAbout::CDlgAbout( wxWindow* parent, wxWindowID id, const wxString& caption,
Create(parent, id, caption, pos, size, style);
}
/*!
* CDlgHelpAbout creator
*/
bool CDlgAbout::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
////@begin CDlgAbout member initialisation
m_strVersion = BOINC_VERSION_STRING;
////@end CDlgAbout member initialisation
////@begin CDlgAbout creation
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
GetSizer()->Fit(this);
GetSizer()->SetSizeHints(this);
Centre();
////@end CDlgAbout creation
return TRUE;
}
/*!
* Control creation for CDlgHelpAbout
*/
void CDlgAbout::CreateControls()
{
////@begin CDlgAbout content construction
CDlgAbout* item1 = this;
CDlgAbout* itemDialog1 = this;
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
item1->SetSizer(item2);
item1->SetAutoLayout(TRUE);
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
itemDialog1->SetSizer(itemBoxSizer2);
wxStaticText* item3 = new wxStaticText;
item3->Create( item1, wxID_STATIC, wxGetApp().GetAppName(), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
item3->SetFont(wxFont(24, wxDEFAULT, wxNORMAL, wxBOLD, FALSE, _T("")));
item2->Add(item3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText3 = new wxStaticText;
itemStaticText3->Create( itemDialog1, wxID_STATIC, _("BOINC Manager"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
itemStaticText3->SetFont(wxFont(24, wxDEFAULT, wxNORMAL, wxBOLD, FALSE, _T("")));
itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
wxBoxSizer* item4 = new wxBoxSizer(wxHORIZONTAL);
item2->Add(item4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxBoxSizer* item5 = new wxBoxSizer(wxVERTICAL);
item4->Add(item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer4->Add(itemBoxSizer5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxBitmap item6Bitmap(boincsm_xpm);
wxStaticBitmap* item6 = new wxStaticBitmap;
item6->Create( item1, wxID_STATIC, item6Bitmap, wxDefaultPosition, wxSize(50, 50), 0 );
item5->Add(item6, 0, wxALIGN_LEFT|wxALL, 5);
wxBitmap itemStaticBitmap6Bitmap(itemDialog1->GetBitmapResource(wxT("res/boincsm.xpm")));
wxStaticBitmap* itemStaticBitmap6 = new wxStaticBitmap;
itemStaticBitmap6->Create( itemDialog1, wxID_STATIC, itemStaticBitmap6Bitmap, wxDefaultPosition, wxSize(50, 50), 0 );
itemBoxSizer5->Add(itemStaticBitmap6, 0, wxALIGN_LEFT|wxALL, 5);
wxFlexGridSizer* item7 = new wxFlexGridSizer(0, 2, 0, 0);
item4->Add(item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxFlexGridSizer* itemFlexGridSizer7 = new wxFlexGridSizer(0, 2, 0, 0);
itemBoxSizer4->Add(itemFlexGridSizer7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* item8 = new wxStaticText;
item8->Create( item1, wxID_STATIC, _T("Version:"), wxDefaultPosition, wxDefaultSize, 0 );
item7->Add(item8, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText8 = new wxStaticText;
itemStaticText8->Create( itemDialog1, wxID_STATIC, _("Version:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer7->Add(itemStaticText8, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* item9 = new wxStaticText;
item9->Create( item1, wxID_STATIC, wxT( BOINC_VERSION_STRING ), wxDefaultPosition, wxDefaultSize, 0 );
item7->Add(item9, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText9 = new wxStaticText;
itemStaticText9->Create( itemDialog1, wxID_STATIC, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer7->Add(itemStaticText9, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* item10 = new wxStaticText;
item10->Create( item1, wxID_STATIC, _T("Licence type:"), wxDefaultPosition, wxDefaultSize, 0 );
item7->Add(item10, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText10 = new wxStaticText;
itemStaticText10->Create( itemDialog1, wxID_STATIC, _("Licence type:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer7->Add(itemStaticText10, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* item11 = new wxStaticText;
item11->Create( item1, wxID_STATIC, _T("Lesser GNU Public License"), wxDefaultPosition, wxDefaultSize, 0 );
item7->Add(item11, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText11 = new wxStaticText;
itemStaticText11->Create( itemDialog1, wxID_STATIC, _("Lesser GNU Public License"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer7->Add(itemStaticText11, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* item12 = new wxStaticText;
item12->Create( item1, wxID_STATIC, _T("Copyright:"), wxDefaultPosition, wxDefaultSize, 0 );
item7->Add(item12, 0, wxALIGN_RIGHT|wxALIGN_TOP|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText12 = new wxStaticText;
itemStaticText12->Create( itemDialog1, wxID_STATIC, _("Copyright:"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer7->Add(itemStaticText12, 0, wxALIGN_RIGHT|wxALIGN_TOP|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* item13 = new wxStaticText;
item13->Create( item1, wxID_STATIC, _T("(C) 2005 University of California at Berkeley.\nAll Rights Reserved."), wxDefaultPosition, wxDefaultSize, 0 );
item7->Add(item13, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText13 = new wxStaticText;
itemStaticText13->Create( itemDialog1, wxID_STATIC, _("(C) 2005 University of California at Berkeley.\nAll Rights Reserved."), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer7->Add(itemStaticText13, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* item14 = new wxStaticText;
item14->Create( item1, wxID_STATIC, _T("Default System Encoding:"), wxDefaultPosition, wxDefaultSize, 0 );
item7->Add(item14, 0, wxALIGN_RIGHT|wxALIGN_TOP|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText14 = new wxStaticText;
itemStaticText14->Create( itemDialog1, wxID_STATIC, _("Berkeley Open Infrastructure for Network Computing"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add(itemStaticText14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
wxStaticText* item15 = new wxStaticText;
item15->Create( item1, wxID_STATIC, wxLocale::GetSystemEncodingName(), wxDefaultPosition, wxDefaultSize, 0 );
item7->Add(item15, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText15 = new wxStaticText;
itemStaticText15->Create( itemDialog1, wxID_STATIC, _("A software platform for distributed computing using volunteered computer resources"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add(itemStaticText15, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
wxStaticText* item16 = new wxStaticText;
item16->Create( item1, wxID_STATIC, _T("Berkeley Open Infrastructure for Network Computing"), wxDefaultPosition, wxDefaultSize, 0 );
item2->Add(item16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
wxStaticText* itemStaticText16 = new wxStaticText;
itemStaticText16->Create( itemDialog1, wxID_STATIC, _("http://boinc.berkeley.edu/"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add(itemStaticText16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
wxStaticText* item17 = new wxStaticText;
item17->Create( item1, wxID_STATIC, _T("A software platform for distributed computing using volunteered computer resources"), wxDefaultPosition, wxDefaultSize, 0 );
item2->Add(item17, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
wxStaticLine* itemStaticLine17 = new wxStaticLine;
itemStaticLine17->Create( itemDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
itemBoxSizer2->Add(itemStaticLine17, 0, wxGROW|wxALL, 5);
wxStaticText* item18 = new wxStaticText;
item18->Create( item1, wxID_STATIC, _T("http://boinc.berkeley.edu/"), wxDefaultPosition, wxDefaultSize, 0 );
item2->Add(item18, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
wxStaticLine* item19 = new wxStaticLine;
item19->Create( item1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
item2->Add(item19, 0, wxGROW|wxALL, 5);
wxButton* item20 = new wxButton;
item20->Create( item1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
item20->SetDefault();
item2->Add(item20, 0, wxALIGN_RIGHT|wxALL, 5);
wxButton* itemButton18 = new wxButton;
itemButton18->Create( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton18->SetDefault();
itemBoxSizer2->Add(itemButton18, 0, wxALIGN_RIGHT|wxALL, 5);
// Set validators
itemStaticText9->SetValidator( wxGenericValidator(& m_strVersion) );
////@end CDlgAbout content construction
}
/*!
* Should we show tooltips?
*/
bool CDlgAbout::ShowToolTips()
{
return TRUE;
}
/*!
* Get bitmap resources
*/
const char *BOINC_RCSID_a8d52a49e0 = "$Id$";
wxBitmap CDlgAbout::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin CDlgAbout bitmap retrieval
if (name == wxT("res/boincsm.xpm"))
{
wxBitmap bitmap(boincsm_xpm);
return bitmap;
}
return wxNullBitmap;
////@end CDlgAbout bitmap retrieval
}
/*!
* Get icon resources
*/
wxIcon CDlgAbout::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin CDlgAbout icon retrieval
return wxNullIcon;
////@end CDlgAbout icon retrieval
}

View File

@ -16,7 +16,7 @@
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#ifndef _DLGABOUT_H_
#define _DLGABOUT_H_
@ -24,39 +24,89 @@
#pragma interface "DlgAbout.cpp"
#endif
/*!
* Includes
*/
////@begin includes
#include "wx/valgen.h"
#include "wx/statline.h"
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#define SYMBOL_CDLGHELPABOUT_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_CDLGHELPABOUT_TITLE _("About BOINC")
#define SYMBOL_CDLGHELPABOUT_IDNAME ID_DIALOG
#define SYMBOL_CDLGHELPABOUT_SIZE wxSize(400, 300)
#define SYMBOL_CDLGHELPABOUT_POSITION wxDefaultPosition
#define SYMBOL_CDLGABOUT_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU
#define SYMBOL_CDLGABOUT_TITLE _("About BOINC Manager")
#define SYMBOL_CDLGABOUT_IDNAME ID_DIALOG
#define SYMBOL_CDLGABOUT_SIZE wxSize(400, 300)
#define SYMBOL_CDLGABOUT_POSITION wxDefaultPosition
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
#ifndef wxFIXED_MINSIZE
#define wxFIXED_MINSIZE 0
#endif
/*!
* CDlgAbout class declaration
*/
class CDlgAbout: public wxDialog
{
DECLARE_CLASS( CDlgAbout )
DECLARE_DYNAMIC_CLASS( CDlgAbout )
DECLARE_EVENT_TABLE()
public:
/// Constructors
CDlgAbout( );
CDlgAbout( wxWindow* parent, wxWindowID id = SYMBOL_CDLGHELPABOUT_IDNAME, const wxString& caption = SYMBOL_CDLGHELPABOUT_TITLE, const wxPoint& pos = SYMBOL_CDLGHELPABOUT_POSITION, const wxSize& size = SYMBOL_CDLGHELPABOUT_SIZE, long style = SYMBOL_CDLGHELPABOUT_STYLE );
CDlgAbout( wxWindow* parent, wxWindowID id = SYMBOL_CDLGABOUT_IDNAME, const wxString& caption = SYMBOL_CDLGABOUT_TITLE, const wxPoint& pos = SYMBOL_CDLGABOUT_POSITION, const wxSize& size = SYMBOL_CDLGABOUT_SIZE, long style = SYMBOL_CDLGABOUT_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CDLGHELPABOUT_IDNAME, const wxString& caption = SYMBOL_CDLGHELPABOUT_TITLE, const wxPoint& pos = SYMBOL_CDLGHELPABOUT_POSITION, const wxSize& size = SYMBOL_CDLGHELPABOUT_SIZE, long style = SYMBOL_CDLGHELPABOUT_STYLE );
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CDLGABOUT_IDNAME, const wxString& caption = SYMBOL_CDLGABOUT_TITLE, const wxPoint& pos = SYMBOL_CDLGABOUT_POSITION, const wxSize& size = SYMBOL_CDLGABOUT_SIZE, long style = SYMBOL_CDLGABOUT_STYLE );
/// Creates the controls and sizers
void CreateControls();
////@begin CDlgAbout event handler declarations
////@end CDlgAbout event handler declarations
////@begin CDlgAbout member function declarations
wxString GetVersion() const { return m_strVersion ; }
void SetVersion(wxString value) { m_strVersion = value ; }
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end CDlgAbout member function declarations
/// Should we show tooltips?
static bool ShowToolTips();
////@begin CDlgAbout member variables
wxString m_strVersion;
////@end CDlgAbout member variables
};
#endif
// _DLGABOUT_H_

View File

@ -16,24 +16,53 @@
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation "DlgAccountManager.h"
#endif
#include "stdwx.h"
#include "BOINCGUIApp.h"
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
////@begin includes
////@end includes
#include "DlgAccountManager.h"
#include "res/boincsm.xpm"
////@begin XPM images
////@end XPM images
/*!
* CDlgAccountManager type definition
*/
IMPLEMENT_DYNAMIC_CLASS( CDlgAccountManager, wxDialog )
/*!
* CDlgAccountManager event table definition
*/
BEGIN_EVENT_TABLE( CDlgAccountManager, wxDialog )
////@begin CDlgAccountManager event table entries
////@end CDlgAccountManager event table entries
END_EVENT_TABLE()
CDlgAccountManager::CDlgAccountManager()
/*!
* CDlgAccountManager constructors
*/
CDlgAccountManager::CDlgAccountManager( )
{
}
@ -42,6 +71,10 @@ CDlgAccountManager::CDlgAccountManager( wxWindow* parent, wxWindowID id, const w
Create(parent, id, caption, pos, size, style);
}
/*!
* CDlgAccountManager creator
*/
bool CDlgAccountManager::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin CDlgAccountManager member initialisation
@ -61,6 +94,10 @@ bool CDlgAccountManager::Create( wxWindow* parent, wxWindowID id, const wxString
return TRUE;
}
/*!
* Control creation for CDlgAccountManager
*/
void CDlgAccountManager::CreateControls()
{
////@begin CDlgAccountManager content construction
@ -104,14 +141,26 @@ void CDlgAccountManager::CreateControls()
itemButton11->Create( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer9->Add(itemButton11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
// Set validators
m_AcctManagerUsernameCtrl->SetValidator( wxGenericValidator(& m_strAcctManagerUsername) );
m_AcctManagerPasswordCtrl->SetValidator( wxGenericValidator(& m_strAcctManagerPassword) );
////@end CDlgAccountManager content construction
}
/*!
* Should we show tooltips?
*/
bool CDlgAccountManager::ShowToolTips()
{
return TRUE;
}
/*!
* Get bitmap resources
*/
wxBitmap CDlgAccountManager::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
@ -120,6 +169,10 @@ wxBitmap CDlgAccountManager::GetBitmapResource( const wxString& name )
////@end CDlgAccountManager bitmap retrieval
}
/*!
* Get icon resources
*/
wxIcon CDlgAccountManager::GetIconResource( const wxString& name )
{
// Icon retrieval

View File

@ -16,7 +16,7 @@
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#ifndef _DLGACCOUNTMANAGER_H_
#define _DLGACCOUNTMANAGER_H_
@ -29,6 +29,7 @@
*/
////@begin includes
#include "wx/valgen.h"
////@end includes
/*!
@ -44,7 +45,7 @@
////@begin control identifiers
#define ID_DIALOG 10000
#define SYMBOL_CDLGACCOUNTMANAGER_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_CDLGACCOUNTMANAGER_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU
#define SYMBOL_CDLGACCOUNTMANAGER_TITLE _("Account Manager Credentials")
#define SYMBOL_CDLGACCOUNTMANAGER_IDNAME ID_DIALOG
#define SYMBOL_CDLGACCOUNTMANAGER_SIZE wxSize(400, 300)
@ -88,6 +89,12 @@ public:
////@end CDlgAccountManager event handler declarations
////@begin CDlgAccountManager member function declarations
wxString GetAcctManagerUsername() const { return m_strAcctManagerUsername ; }
void SetAcctManagerUsername(wxString value) { m_strAcctManagerUsername = value ; }
wxString GetAcctManagerPassword() const { return m_strAcctManagerPassword ; }
void SetAcctManagerPassword(wxString value) { m_strAcctManagerPassword = value ; }
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
@ -101,6 +108,8 @@ public:
////@begin CDlgAccountManager member variables
wxTextCtrl* m_AcctManagerUsernameCtrl;
wxTextCtrl* m_AcctManagerPasswordCtrl;
wxString m_strAcctManagerUsername;
wxString m_strAcctManagerPassword;
////@end CDlgAccountManager member variables
};

View File

@ -35,7 +35,6 @@
////@begin includes
////@end includes
#include "stdwx.h"
#include "DlgAttachProject.h"
#include "ValidateURL.h"
#include "ValidateAccountKey.h"

View File

@ -16,84 +16,149 @@
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation "DlgConnection.h"
#endif
#include "stdwx.h"
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
////@begin includes
////@end includes
#include "DlgConnection.h"
////@begin XPM images
IMPLEMENT_CLASS( CDlgConnection, wxDialog )
////@end XPM images
/*!
* CDlgConnection type definition
*/
IMPLEMENT_DYNAMIC_CLASS( CDlgConnection, wxDialog )
/*!
* CDlgConnection event table definition
*/
BEGIN_EVENT_TABLE( CDlgConnection, wxDialog )
////@begin CDlgConnection event table entries
////@end CDlgConnection event table entries
END_EVENT_TABLE()
/*!
* CDlgConnection constructors
*/
CDlgConnection::CDlgConnection( )
{
}
CDlgConnection::CDlgConnection( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
Create(parent, id, caption, pos, size, style);
}
/*!
* CDlgConnection creator
*/
bool CDlgConnection::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin CDlgConnection member initialisation
////@end CDlgConnection member initialisation
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
////@begin CDlgConnection creation
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
GetSizer()->Fit(this);
GetSizer()->SetSizeHints(this);
Centre();
////@end CDlgConnection creation
return TRUE;
}
/*!
* Control creation for CDlgConnection
*/
void CDlgConnection::CreateControls()
{
CDlgConnection* item1 = this;
////@begin CDlgConnection content construction
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
item1->SetSizer(item2);
item1->SetAutoLayout(TRUE);
CDlgConnection* itemDialog1 = this;
wxBoxSizer* item3 = new wxBoxSizer(wxHORIZONTAL);
item2->Add(item3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
itemDialog1->SetSizer(itemBoxSizer2);
wxBoxSizer* item4 = new wxBoxSizer(wxVERTICAL);
item3->Add(item4, 0, wxALIGN_TOP|wxALL, 5);
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxStaticText* item5 = new wxStaticText;
item5->Create( item1, wxID_STATIC, _("BOINC needs to connect to the network.\nMay it do so now?"), wxDefaultPosition, wxDefaultSize, 0 );
item4->Add(item5, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_TOP|wxALL, 5);
wxBoxSizer* item6 = new wxBoxSizer(wxVERTICAL);
item3->Add(item6, 0, wxALIGN_TOP|wxALL, 5);
wxStaticText* itemStaticText5 = new wxStaticText;
itemStaticText5->Create( itemDialog1, wxID_STATIC, _("BOINC needs to connect to the network.\nMay it do so now?"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
wxButton* item7 = new wxButton;
item7->Create( item1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
item7->SetDefault();
item6->Add(item7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer3->Add(itemBoxSizer6, 0, wxALIGN_TOP|wxALL, 5);
wxButton* item8 = new wxButton;
item8->Create( item1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
item6->Add(item8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxButton* itemButton7 = new wxButton;
itemButton7->Create( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton7->SetDefault();
itemBoxSizer6->Add(itemButton7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxButton* itemButton8 = new wxButton;
itemButton8->Create( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer6->Add(itemButton8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
////@end CDlgConnection content construction
}
/*!
* Should we show tooltips?
*/
bool CDlgConnection::ShowToolTips()
{
return TRUE;
}
/*!
* Get bitmap resources
*/
const char *BOINC_RCSID_9ed9f07f0a = "$Id$";
wxBitmap CDlgConnection::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin CDlgConnection bitmap retrieval
return wxNullBitmap;
////@end CDlgConnection bitmap retrieval
}
/*!
* Get icon resources
*/
wxIcon CDlgConnection::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin CDlgConnection icon retrieval
return wxNullIcon;
////@end CDlgConnection icon retrieval
}

View File

@ -16,8 +16,7 @@
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#ifndef _DLGCONNECTION_H_
#define _DLGCONNECTION_H_
@ -25,22 +24,51 @@
#pragma interface "DlgConnection.cpp"
#endif
/*!
* Includes
*/
////@begin includes
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#define SYMBOL_CDLGCONNECTION_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_CDLGCONNECTION_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU
#define SYMBOL_CDLGCONNECTION_TITLE _("Connection")
#define SYMBOL_CDLGCONNECTION_IDNAME ID_DIALOG
#define SYMBOL_CDLGCONNECTION_SIZE wxSize(400, 300)
#define SYMBOL_CDLGCONNECTION_POSITION wxDefaultPosition
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
#ifndef wxFIXED_MINSIZE
#define wxFIXED_MINSIZE 0
#endif
/*!
* CDlgConnection class declaration
*/
class CDlgConnection: public wxDialog
{
DECLARE_CLASS( CDlgConnection )
DECLARE_DYNAMIC_CLASS( CDlgConnection )
DECLARE_EVENT_TABLE()
public:
@ -54,10 +82,23 @@ public:
/// Creates the controls and sizers
void CreateControls();
////@begin CDlgConnection event handler declarations
////@end CDlgConnection event handler declarations
////@begin CDlgConnection member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end CDlgConnection member function declarations
/// Should we show tooltips?
static bool ShowToolTips();
////@begin CDlgConnection member variables
////@end CDlgConnection member variables
};
#endif
// _DLGCONNECTION_H_

View File

@ -16,8 +16,7 @@
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation "DlgOptions.h"
#endif
@ -26,37 +25,59 @@
#include "BOINCGUIApp.h"
#include "DlgOptions.h"
////@begin includes
////@end includes
IMPLEMENT_CLASS( CDlgOptions, wxDialog )
////@begin XPM images
////@end XPM images
/*!
* CDlgOptions type definition
*/
IMPLEMENT_DYNAMIC_CLASS( CDlgOptions, wxDialog )
/*!
* CDlgOptions event table definition
*/
BEGIN_EVENT_TABLE( CDlgOptions, wxDialog )
////@begin CDlgOptions event table entries
EVT_NOTEBOOK_PAGE_CHANGED( ID_NOTEBOOK, CDlgOptions::OnNotebookPageChanged )
EVT_UPDATE_UI( ID_NOTEBOOK, CDlgOptions::OnNotebookUpdate )
EVT_CHECKBOX( ID_ENABLEHTTPPROXYCTRL, CDlgOptions::OnEnableHTTPProxyCtrlClick )
EVT_UPDATE_UI( ID_ENABLEHTTPPROXYCTRL, CDlgOptions::OnEnableHTTPProxyCtrlUpdate )
EVT_CHECKBOX( ID_ENABLEHTTPPROXYCTRL, CDlgOptions::OnEnablehttpproxyctrlClick )
EVT_UPDATE_UI( ID_ENABLEHTTPPROXYCTRL, CDlgOptions::OnEnablehttpproxyctrlUpdate )
EVT_CHECKBOX( ID_ENABLESOCKSPROXYCTRL, CDlgOptions::OnEnableSOCKSProxyCtrlClick )
EVT_UPDATE_UI( ID_ENABLESOCKSPROXYCTRL, CDlgOptions::OnEnableSOCKSProxyCtrlUpdate )
EVT_CHECKBOX( ID_ENABLESOCKSPROXYCTRL, CDlgOptions::OnEnablesocksproxyctrlClick )
EVT_UPDATE_UI( ID_ENABLESOCKSPROXYCTRL, CDlgOptions::OnEnablesocksproxyctrlUpdate )
////@end CDlgOptions event table entries
END_EVENT_TABLE()
/*!
* CDlgOptions constructors
*/
CDlgOptions::CDlgOptions( )
{
}
CDlgOptions::CDlgOptions( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
Create(parent, id, caption, pos, size, style);
}
/*!
* CDlgToolsOptions creator
*/
bool CDlgOptions::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
m_bProxySectionConfigured = false;
////@begin CDlgOptions member initialisation
m_LanguageSelectionCtrl = NULL;
m_EnableHTTPProxyCtrl = NULL;
m_HTTPAddressCtrl = NULL;
m_HTTPPortCtrl = NULL;
@ -67,58 +88,67 @@ bool CDlgOptions::Create( wxWindow* parent, wxWindowID id, const wxString& capti
m_SOCKSPortCtrl = NULL;
m_SOCKSUsernameCtrl = NULL;
m_SOCKSPasswordCtrl = NULL;
////@end CDlgOptions member initialisation
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
////@begin CDlgOptions creation
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
GetSizer()->Fit(this);
GetSizer()->SetSizeHints(this);
Centre();
////@end CDlgOptions creation
return TRUE;
}
/*!
* Control creation for CDlgToolsOptions
*/
void CDlgOptions::CreateControls()
{
////@begin CDlgOptions content construction
CDlgOptions* itemDialog1 = this;
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
itemDialog1->SetSizer(itemBoxSizer2);
itemDialog1->SetAutoLayout(TRUE);
wxNotebook* itemNotebook3 = new wxNotebook;
itemNotebook3->Create( itemDialog1, ID_NOTEBOOK, wxDefaultPosition, wxSize(300, 265), wxNB_TOP );
#if !wxCHECK_VERSION(2,5,2)
wxNotebookSizer* itemNotebook3Sizer = new wxNotebookSizer(itemNotebook3);
#endif
wxPanel* itemPanel4 = new wxPanel;
itemPanel4->Create( itemNotebook3, ID_GENERAL, wxDefaultPosition, wxSize(99, 80), wxTAB_TRAVERSAL );
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
itemPanel4->SetSizer(itemBoxSizer5);
itemPanel4->SetAutoLayout(TRUE);
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);
wxString* m_LanguageSelectionCtrlStrings = NULL;
m_LanguageSelectionCtrl = new wxComboBox;
m_LanguageSelectionCtrl->Create( itemPanel4, ID_COMBOBOX, _("(Automatic Detection)"), wxDefaultPosition, wxDefaultSize, wxGetApp().GetSupportedLanguagesCount(), wxGetApp().GetSupportedLanguages(), wxCB_READONLY );
m_LanguageSelectionCtrl->SetStringSelection(_("(Automatic Detection)"));
itemGridSizer6->Add(m_LanguageSelectionCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemNotebook3->AddPage(itemPanel4, _("General"));
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);
m_EnableHTTPProxyCtrl = new wxCheckBox;
m_EnableHTTPProxyCtrl->Create( itemPanel9, ID_ENABLEHTTPPROXYCTRL, _("Connect via HTTP proxy server"), wxDefaultPosition, wxDefaultSize, 0 );
m_EnableHTTPProxyCtrl->SetValue(FALSE);
itemBoxSizer10->Add(m_EnableHTTPProxyCtrl, 0, wxGROW|wxALL, 5);
wxStaticBox* itemStaticBoxSizer12Static = new wxStaticBox(itemPanel9, wxID_ANY, _("HTTP Proxy Server Configuration"));
wxStaticBoxSizer* itemStaticBoxSizer12 = new wxStaticBoxSizer(itemStaticBoxSizer12Static, wxVERTICAL);
@ -131,19 +161,17 @@ void CDlgOptions::CreateControls()
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( itemPanel9, ID_HTTPADDRESSCTRL, _T(""), wxDefaultPosition, wxSize(150, -1), 0 );
m_HTTPAddressCtrl = itemTextCtrl16;
itemFlexGridSizer14->Add(itemTextCtrl16, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_HTTPAddressCtrl = new wxTextCtrl;
m_HTTPAddressCtrl->Create( itemPanel9, ID_HTTPADDRESSCTRL, _T(""), wxDefaultPosition, wxSize(150, -1), 0 );
itemFlexGridSizer14->Add(m_HTTPAddressCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 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* 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);
m_HTTPPortCtrl = new wxTextCtrl;
m_HTTPPortCtrl->Create( itemPanel9, ID_HTTPPORTCTRL, _T(""), wxDefaultPosition, wxSize(50, -1), 0 );
itemFlexGridSizer14->Add(m_HTTPPortCtrl, 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);
@ -154,31 +182,29 @@ void CDlgOptions::CreateControls()
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( itemPanel9, ID_HTTPUSERNAMECTRL, _T(""), wxDefaultPosition, wxSize(175, -1), 0 );
m_HTTPUsernameCtrl = itemTextCtrl22;
itemFlexGridSizer20->Add(itemTextCtrl22, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_HTTPUsernameCtrl = new wxTextCtrl;
m_HTTPUsernameCtrl->Create( itemPanel9, ID_HTTPUSERNAMECTRL, _T(""), wxDefaultPosition, wxSize(175, -1), 0 );
itemFlexGridSizer20->Add(m_HTTPUsernameCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|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);
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);
m_HTTPPasswordCtrl = new wxTextCtrl;
m_HTTPPasswordCtrl->Create( itemPanel9, ID_HTTPPASSWORDCTRL, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
itemFlexGridSizer20->Add(m_HTTPPasswordCtrl, 0, wxGROW|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);
m_EnableSOCKSProxyCtrl = new wxCheckBox;
m_EnableSOCKSProxyCtrl->Create( itemPanel25, ID_ENABLESOCKSPROXYCTRL, _("Connect via SOCKS proxy server"), wxDefaultPosition, wxDefaultSize, 0 );
m_EnableSOCKSProxyCtrl->SetValue(FALSE);
itemBoxSizer26->Add(m_EnableSOCKSProxyCtrl, 0, wxGROW|wxALL, 5);
wxStaticBox* itemStaticBoxSizer28Static = new wxStaticBox(itemPanel25, wxID_ANY, _("SOCKS Proxy Server Configuration"));
wxStaticBoxSizer* itemStaticBoxSizer28 = new wxStaticBoxSizer(itemStaticBoxSizer28Static, wxVERTICAL);
@ -191,19 +217,17 @@ void CDlgOptions::CreateControls()
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( itemPanel25, ID_SOCKSADDRESSCTRL, _T(""), wxDefaultPosition, wxSize(150, -1), 0 );
m_SOCKSAddressCtrl = itemTextCtrl32;
itemFlexGridSizer30->Add(itemTextCtrl32, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_SOCKSAddressCtrl = new wxTextCtrl;
m_SOCKSAddressCtrl->Create( itemPanel25, ID_SOCKSADDRESSCTRL, _T(""), wxDefaultPosition, wxSize(150, -1), 0 );
itemFlexGridSizer30->Add(m_SOCKSAddressCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 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* 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);
m_SOCKSPortCtrl = new wxTextCtrl;
m_SOCKSPortCtrl->Create( itemPanel25, ID_SOCKSPORTCTRL, _T(""), wxDefaultPosition, wxSize(50, -1), 0 );
itemFlexGridSizer30->Add(m_SOCKSPortCtrl, 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);
@ -214,25 +238,29 @@ void CDlgOptions::CreateControls()
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( itemPanel25, ID_SOCKSUSERNAMECTRL, _T(""), wxDefaultPosition, wxSize(175, -1), 0 );
m_SOCKSUsernameCtrl = itemTextCtrl38;
itemFlexGridSizer36->Add(itemTextCtrl38, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_SOCKSUsernameCtrl = new wxTextCtrl;
m_SOCKSUsernameCtrl->Create( itemPanel25, ID_SOCKSUSERNAMECTRL, _T(""), wxDefaultPosition, wxSize(175, -1), 0 );
itemFlexGridSizer36->Add(m_SOCKSUsernameCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
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);
m_SOCKSPasswordCtrl = new wxTextCtrl;
m_SOCKSPasswordCtrl->Create( itemPanel25, ID_SOCKSPASSWORDCTRL, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
itemFlexGridSizer36->Add(m_SOCKSPasswordCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemNotebook3->AddPage(itemPanel25, _("SOCKS Proxy"));
#if !wxCHECK_VERSION(2,5,2)
itemBoxSizer2->Add(itemNotebook3Sizer, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
#else
itemBoxSizer2->Add(itemNotebook3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
#endif
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();
@ -242,24 +270,38 @@ void CDlgOptions::CreateControls()
itemButton43->Create( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer41->Add(itemButton43, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
////@end CDlgOptions content construction
}
/*!
* wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED event handler for ID_NOTEBOOK
*/
void CDlgOptions::OnNotebookPageChanged( wxNotebookEvent& event )
{
// Insert custom code here
////@begin wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED event handler for ID_NOTEBOOK in CDlgToolsOptions.
// Before editing this code, remove the block markers.
event.Skip();
////@end wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED event handler for ID_NOTEBOOK in CDlgToolsOptions.
}
/*!
* wxEVT_UPDATE_UI event handler for ID_NOTEBOOK
*/
void CDlgOptions::OnNotebookUpdate( wxUpdateUIEvent& event )
{
// Insert custom code here
////@begin wxEVT_UPDATE_UI event handler for ID_NOTEBOOK in CDlgToolsOptions.
// Before editing this code, remove the block markers.
event.Skip();
////@end wxEVT_UPDATE_UI event handler for ID_NOTEBOOK in CDlgToolsOptions.
}
/*!
* wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ENABLEHTTPPROXYCTRL
*/
void CDlgOptions::OnEnableHTTPProxyCtrlClick( wxCommandEvent& event )
void CDlgOptions::OnEnablehttpproxyctrlClick( wxCommandEvent& event )
{
if ( event.IsChecked() )
{
@ -275,11 +317,15 @@ void CDlgOptions::OnEnableHTTPProxyCtrlClick( wxCommandEvent& event )
m_HTTPUsernameCtrl->Enable(false);
m_HTTPPasswordCtrl->Enable(false);
}
event.Skip();
}
/*!
* wxEVT_UPDATE_UI event handler for ID_ENABLEHTTPPROXYCTRL
*/
void CDlgOptions::OnEnableHTTPProxyCtrlUpdate( wxUpdateUIEvent& event )
void CDlgOptions::OnEnablehttpproxyctrlUpdate( wxUpdateUIEvent& event )
{
if ( m_bProxySectionConfigured )
{
@ -310,8 +356,11 @@ void CDlgOptions::OnEnableHTTPProxyCtrlUpdate( wxUpdateUIEvent& event )
event.Skip();
}
/*!
* wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ENABLESOCKSPROXYCTRL
*/
void CDlgOptions::OnEnableSOCKSProxyCtrlClick( wxCommandEvent& event )
void CDlgOptions::OnEnablesocksproxyctrlClick( wxCommandEvent& event )
{
if ( event.IsChecked() )
{
@ -330,8 +379,11 @@ void CDlgOptions::OnEnableSOCKSProxyCtrlClick( wxCommandEvent& event )
event.Skip();
}
/*!
* wxEVT_UPDATE_UI event handler for ID_ENABLESOCKSPROXYCTRL
*/
void CDlgOptions::OnEnableSOCKSProxyCtrlUpdate( wxUpdateUIEvent& event )
void CDlgOptions::OnEnablesocksproxyctrlUpdate( wxUpdateUIEvent& event )
{
if ( m_bProxySectionConfigured )
{
@ -362,11 +414,35 @@ void CDlgOptions::OnEnableSOCKSProxyCtrlUpdate( wxUpdateUIEvent& event )
event.Skip();
}
/*!
* Should we show tooltips?
*/
bool CDlgOptions::ShowToolTips()
{
return TRUE;
}
/*!
* Get bitmap resources
*/
const char *BOINC_RCSID_18c9f4f9ba = "$Id$";
wxBitmap CDlgOptions::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin CDlgOptions bitmap retrieval
return wxNullBitmap;
////@end CDlgOptions bitmap retrieval
}
/*!
* Get icon resources
*/
wxIcon CDlgOptions::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin CDlgOptions icon retrieval
return wxNullIcon;
////@end CDlgOptions icon retrieval
}

View File

@ -16,7 +16,7 @@
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#ifndef _DLGOPTIONS_H_
#define _DLGOPTIONS_H_
@ -24,17 +24,36 @@
#pragma interface "DlgOptions.cpp"
#endif
/*!
* Includes
*/
#define ID_TOOLSOPTIONSDIALOG 10000
#define SYMBOL_CDLGTOOLSOPTIONS_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_CDLGTOOLSOPTIONS_TITLE _("Options")
#define SYMBOL_CDLGTOOLSOPTIONS_IDNAME ID_TOOLSOPTIONSDIALOG
#define SYMBOL_CDLGTOOLSOPTIONS_SIZE wxDefaultSize
#define SYMBOL_CDLGTOOLSOPTIONS_POSITION wxDefaultPosition
////@begin includes
#include "wx/notebook.h"
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#define SYMBOL_CDLGOPTIONS_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU
#define SYMBOL_CDLGOPTIONS_TITLE _("Options")
#define SYMBOL_CDLGOPTIONS_IDNAME ID_DIALOG
#define SYMBOL_CDLGOPTIONS_SIZE wxDefaultSize
#define SYMBOL_CDLGOPTIONS_POSITION wxDefaultPosition
#define ID_NOTEBOOK 10001
#define ID_GENERAL 10002
#define ID_LANGUAGESELECTION 10003
#define ID_HTTPPROXY 10004
#define ID_COMBOBOX 10004
#define ID_HTTPPROXY 10003
#define ID_ENABLEHTTPPROXYCTRL 10007
#define ID_HTTPADDRESSCTRL 10010
#define ID_HTTPPORTCTRL 10011
@ -46,28 +65,41 @@
#define ID_SOCKSPORTCTRL 10014
#define ID_SOCKSUSERNAMECTRL 10015
#define ID_SOCKSPASSWORDCTRL 10016
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
#ifndef wxFIXED_MINSIZE
#define wxFIXED_MINSIZE 0
#endif
/*!
* CDlgOptions class declaration
*/
class CDlgOptions: public wxDialog
{
DECLARE_CLASS( CDlgOptions )
DECLARE_DYNAMIC_CLASS( CDlgOptions )
DECLARE_EVENT_TABLE()
public:
/// Constructors
CDlgOptions( );
CDlgOptions( wxWindow* parent, wxWindowID id = SYMBOL_CDLGTOOLSOPTIONS_IDNAME, const wxString& caption = SYMBOL_CDLGTOOLSOPTIONS_TITLE, const wxPoint& pos = SYMBOL_CDLGTOOLSOPTIONS_POSITION, const wxSize& size = SYMBOL_CDLGTOOLSOPTIONS_SIZE, long style = SYMBOL_CDLGTOOLSOPTIONS_STYLE );
CDlgOptions( wxWindow* parent, wxWindowID id = SYMBOL_CDLGOPTIONS_IDNAME, const wxString& caption = SYMBOL_CDLGOPTIONS_TITLE, const wxPoint& pos = SYMBOL_CDLGOPTIONS_POSITION, const wxSize& size = SYMBOL_CDLGOPTIONS_SIZE, long style = SYMBOL_CDLGOPTIONS_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CDLGTOOLSOPTIONS_IDNAME, const wxString& caption = SYMBOL_CDLGTOOLSOPTIONS_TITLE, const wxPoint& pos = SYMBOL_CDLGTOOLSOPTIONS_POSITION, const wxSize& size = SYMBOL_CDLGTOOLSOPTIONS_SIZE, long style = SYMBOL_CDLGTOOLSOPTIONS_STYLE );
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CDLGOPTIONS_IDNAME, const wxString& caption = SYMBOL_CDLGOPTIONS_TITLE, const wxPoint& pos = SYMBOL_CDLGOPTIONS_POSITION, const wxSize& size = SYMBOL_CDLGOPTIONS_SIZE, long style = SYMBOL_CDLGOPTIONS_STYLE );
/// Creates the controls and sizers
void CreateControls();
////@begin CDlgOptions event handler declarations
/// wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED event handler for ID_NOTEBOOK
void OnNotebookPageChanged( wxNotebookEvent& event );
@ -75,22 +107,36 @@ public:
void OnNotebookUpdate( wxUpdateUIEvent& event );
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ENABLEHTTPPROXYCTRL
void OnEnableHTTPProxyCtrlClick( wxCommandEvent& event );
void OnEnablehttpproxyctrlClick( wxCommandEvent& event );
/// wxEVT_UPDATE_UI event handler for ID_ENABLEHTTPPROXYCTRL
void OnEnableHTTPProxyCtrlUpdate( wxUpdateUIEvent& event );
void OnEnablehttpproxyctrlUpdate( wxUpdateUIEvent& event );
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ENABLESOCKSPROXYCTRL
void OnEnableSOCKSProxyCtrlClick( wxCommandEvent& event );
void OnEnablesocksproxyctrlClick( wxCommandEvent& event );
/// wxEVT_UPDATE_UI event handler for ID_ENABLESOCKSPROXYCTRL
void OnEnableSOCKSProxyCtrlUpdate( wxUpdateUIEvent& event );
void OnEnablesocksproxyctrlUpdate( wxUpdateUIEvent& event );
////@end CDlgOptions event handler declarations
////@begin CDlgOptions member function declarations
bool GetBProxySectionConfigured() const { return m_bProxySectionConfigured ; }
void SetBProxySectionConfigured(bool value) { m_bProxySectionConfigured = value ; }
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end CDlgOptions member function declarations
/// Should we show tooltips?
static bool ShowToolTips();
////@begin CDlgOptions member variables
wxComboBox* m_LanguageSelectionCtrl;
bool m_bProxySectionConfigured;
wxCheckBox* m_EnableHTTPProxyCtrl;
wxTextCtrl* m_HTTPAddressCtrl;
wxTextCtrl* m_HTTPPortCtrl;
@ -101,8 +147,9 @@ public:
wxTextCtrl* m_SOCKSPortCtrl;
wxTextCtrl* m_SOCKSUsernameCtrl;
wxTextCtrl* m_SOCKSPasswordCtrl;
bool m_bProxySectionConfigured;
////@end CDlgOptions member variables
};
#endif
// _DLGOPTIONS_H_

View File

@ -144,6 +144,9 @@ void CDlgSelectComputer::CreateControls()
itemButton12->Create( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer10->Add(itemButton12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
// Set validators
m_ComputerNameCtrl->SetValidator( wxGenericValidator(& m_strComputerName) );
m_ComputerPasswordCtrl->SetValidator( wxGenericValidator(& m_strComputerPassword) );
////@end CDlgSelectComputer content construction
}

View File

@ -29,6 +29,7 @@
*/
////@begin includes
#include "wx/valgen.h"
////@end includes
/*!
@ -90,6 +91,12 @@ public:
////@begin CDlgSelectComputer member function declarations
wxString GetComputerName() const { return m_strComputerName ; }
void SetComputerName(wxString value) { m_strComputerName = value ; }
wxString GetStrComputerPassword() const { return m_strComputerPassword ; }
void SetStrComputerPassword(wxString value) { m_strComputerPassword = value ; }
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
@ -103,6 +110,8 @@ public:
////@begin CDlgSelectComputer member variables
wxComboBox* m_ComputerNameCtrl;
wxTextCtrl* m_ComputerPasswordCtrl;
wxString m_strComputerName;
wxString m_strComputerPassword;
////@end CDlgSelectComputer member variables
};