*** empty log message ***

svn path=/trunk/boinc/; revision=4424
This commit is contained in:
Rom Walton 2004-10-25 20:58:06 +00:00
parent c02e5dfa4a
commit 0e02305b34
5 changed files with 210 additions and 20 deletions

View File

@ -79,6 +79,7 @@ bool CBOINCGUIApp::OnInit()
wxASSERT(NULL != m_pTaskBarIcon);
SetTopWindow(m_pFrame);
m_pFrame->Show();
return true;
}

View File

@ -1379,7 +1379,7 @@ wxInt32 CMainDocument::GetResourceDiskspace( wxInt32 iIndex, float& fBuffer )
}
wxInt32 CMainDocument::GetProxyInfo()
wxInt32 CMainDocument::GetProxyConfiguration()
{
wxInt32 retval = 0;
@ -1394,7 +1394,91 @@ wxInt32 CMainDocument::GetProxyInfo()
}
wxInt32 CMainDocument::SetProxyInfo()
wxInt32 CMainDocument::GetProxyHTTPProxyEnabled( bool& bEnabled )
{
bEnabled = proxy_info.use_http_authentication;
return 0;
}
wxInt32 CMainDocument::GetProxyHTTPAuthenticationEnabled( bool& bEnabled )
{
bEnabled = proxy_info.use_http_authentication;
return 0;
}
wxInt32 CMainDocument::GetProxyHTTPServerName( wxString& strServerName )
{
strServerName = proxy_info.http_server_name.c_str();
return 0;
}
wxInt32 CMainDocument::GetProxyHTTPServerPort( wxInt32& iPortNumber )
{
iPortNumber = proxy_info.http_server_port;
return 0;
}
wxInt32 CMainDocument::GetProxyHTTPUserName( wxString& strUserName )
{
strUserName = proxy_info.http_user_name.c_str();
return 0;
}
wxInt32 CMainDocument::GetProxyHTTPPassword( wxString& strPassword )
{
strPassword = proxy_info.http_user_passwd.c_str();
return 0;
}
wxInt32 CMainDocument::GetProxySOCKSProxyEnabled( bool& bEnabled )
{
bEnabled = proxy_info.use_socks_proxy;
return 0;
}
wxInt32 CMainDocument::GetProxySOCKSVersion( wxInt32& iVersion )
{
iVersion = proxy_info.socks_version;
return 0;
}
wxInt32 CMainDocument::GetProxySOCKSServerName( wxString& strServerName )
{
strServerName = proxy_info.socks_server_name.c_str();
return 0;
}
wxInt32 CMainDocument::GetProxySOCKSServerPort( wxInt32& iPortNumber )
{
iPortNumber = proxy_info.socks_server_port;
return 0;
}
wxInt32 CMainDocument::GetProxySOCKSUserName( wxString& strUserName )
{
strUserName = proxy_info.socks5_user_name.c_str();
return 0;
}
wxInt32 CMainDocument::GetProxySOCKSPassword( wxString& strPassword )
{
strPassword = proxy_info.socks5_user_passwd.c_str();
return 0;
}
wxInt32 CMainDocument::SetProxyConfiguration()
{
wxInt32 retval = 0;
@ -1409,7 +1493,86 @@ wxInt32 CMainDocument::SetProxyInfo()
}
wxInt32 CMainDocument::SetProxyHTTPProxyEnabled( const bool bEnabled )
{
proxy_info.use_http_authentication = bEnabled;
return 0;
}
wxInt32 CMainDocument::SetProxyHTTPAuthenticationEnabled( const bool bEnabled )
{
proxy_info.use_http_authentication = bEnabled;
return 0;
}
wxInt32 CMainDocument::SetProxyHTTPServerName( const wxString& strServerName )
{
proxy_info.http_server_name = strServerName.c_str();
return 0;
}
wxInt32 CMainDocument::SetProxyHTTPServerPort( const wxInt32 iPortNumber )
{
proxy_info.http_server_port = iPortNumber;
return 0;
}
wxInt32 CMainDocument::SetProxyHTTPUserName( const wxString& strUserName )
{
proxy_info.http_user_name = strUserName.c_str();
return 0;
}
wxInt32 CMainDocument::SetProxyHTTPPassword( const wxString& strPassword )
{
proxy_info.http_user_passwd = strPassword.c_str();
return 0;
}
wxInt32 CMainDocument::SetProxySOCKSProxyEnabled( const bool bEnabled )
{
proxy_info.use_socks_proxy = bEnabled;
return 0;
}
wxInt32 CMainDocument::SetProxySOCKSVersion( const wxInt32 iVersion )
{
proxy_info.socks_version = iVersion;
return 0;
}
wxInt32 CMainDocument::SetProxySOCKSServerName( const wxString& strServerName )
{
proxy_info.socks_server_name = strServerName.c_str();
return 0;
}
wxInt32 CMainDocument::SetProxySOCKSServerPort( const wxInt32 iPortNumber )
{
proxy_info.socks_server_port = iPortNumber;
return 0;
}
wxInt32 CMainDocument::SetProxySOCKSUserName( const wxString& strUserName )
{
proxy_info.socks5_user_name = strUserName.c_str();
return 0;
}
wxInt32 CMainDocument::SetProxySOCKSPassword( const wxString& strPassword )
{
proxy_info.socks5_user_passwd = strPassword.c_str();
return 0;
}

View File

@ -243,21 +243,33 @@ private:
public:
wxInt32 GetProxyInfo();
wxInt32 SetProxyInfo();
wxInt32 GetProxyConfiguration();
wxInt32 GetProxyHTTPProxyEnabled( bool& bEnabled );
wxInt32 GetProxyHTTPAuthenticationEnabled( bool& bEnabled );
wxInt32 GetProxyHTTPServerName( wxString& strServerName );
wxInt32 GetProxyHTTPServerPort( wxInt32& iPortNumber );
wxInt32 GetProxyHTTPUserName( wxString& strUserName );
wxInt32 GetProxyHTTPPassword( wxString& strPassword );
wxInt32 GetProxySOCKSProxyEnabled( bool& bEnabled );
wxInt32 GetProxySOCKSVersion( wxInt32& iVersion );
wxInt32 GetProxySOCKSServerName( wxString& strServerName );
wxInt32 GetProxySOCKSServerPort( wxInt32& iPortNumber );
wxInt32 GetProxySOCKSUserName( wxString& strUserName );
wxInt32 GetProxySOCKSPassword( wxString& strPassword );
bool use_http_proxy;
bool use_socks_proxy;
bool use_http_authentication;
int socks_version;
std::string socks_server_name;
std::string http_server_name;
int socks_server_port;
int http_server_port;
std::string http_user_name;
std::string http_user_passwd;
std::string socks5_user_name;
std::string socks5_user_passwd;
wxInt32 SetProxyConfiguration();
wxInt32 SetProxyHTTPProxyEnabled( const bool bEnabled );
wxInt32 SetProxyHTTPAuthenticationEnabled( const bool bEnabled );
wxInt32 SetProxyHTTPServerName( const wxString& strServerName );
wxInt32 SetProxyHTTPServerPort( const wxInt32 iPortNumber );
wxInt32 SetProxyHTTPUserName( const wxString& strUserName );
wxInt32 SetProxyHTTPPassword( const wxString& strPassword );
wxInt32 SetProxySOCKSProxyEnabled( const bool bEnabled );
wxInt32 SetProxySOCKSVersion( const wxInt32 iVersion );
wxInt32 SetProxySOCKSServerName( const wxString& strServerName );
wxInt32 SetProxySOCKSServerPort( const wxInt32 iPortNumber );
wxInt32 SetProxySOCKSUserName( const wxString& strUserName );
wxInt32 SetProxySOCKSPassword( const wxString& strPassword );
};

View File

@ -184,7 +184,6 @@ void CTaskBarIcon::OnMouseMove( wxTaskBarIconEvent& event )
wxString strMessage = wxEmptyString;
wxString strBuffer = wxEmptyString;
wxString strProjectName = wxEmptyString;
wxString strResultName = wxEmptyString;
float fProgress = 0;
bool bIsActive = false;
bool bIsExecuting = false;
@ -206,10 +205,9 @@ void CTaskBarIcon::OnMouseMove( wxTaskBarIconEvent& event )
if ( !( bIsActive ) || !( bIsDownloaded ) || !( bIsExecuting ) ) continue;
pDoc->GetWorkProjectName( iIndex, strProjectName );
pDoc->GetWorkName( iIndex, strResultName );
pDoc->GetWorkFractionDone( iIndex, fProgress );
strBuffer.Printf(wxT( "%s: %s: %.2f%%\n"), strProjectName.c_str(), strResultName.c_str(), fProgress * 100 );
strBuffer.Printf(wxT( "%s: %.2f%%\n"), strProjectName.c_str(), fProgress * 100 );
strMessage += strBuffer;
}
@ -224,6 +222,7 @@ void CTaskBarIcon::OnRButtonDown( wxTaskBarIconEvent& event )
CMainDocument* pDoc = wxGetApp().GetDocument();
wxMenu* menu = new wxMenu;
wxMenuItem* menuItem = NULL;
wxInt32 iActivityMode = -1;
wxInt32 iNetworkMode = -1;
@ -231,7 +230,21 @@ void CTaskBarIcon::OnRButtonDown( wxTaskBarIconEvent& event )
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
wxASSERT(NULL != menu);
menu->Append( wxID_OPEN, _("&Open"), wxEmptyString );
#ifdef __WXMSW__
wxFont font = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
font.SetWeight( wxBOLD );
menuItem = new wxMenuItem( menu, wxID_OPEN, _("&Open BOINC Manager..."), wxEmptyString );
menuItem->SetFont( font );
menu->Append( menuItem );
#else
menu->Append( wxID_OPEN, _("&Open BOINC Manager..."), wxEmptyString );
#endif
menu->AppendSeparator();
menu->AppendRadioItem( ID_TB_ACTIVITYRUNALWAYS, _("&Run always"), wxEmptyString );
menu->AppendRadioItem( ID_TB_ACTIVITYRUNBASEDONPREPERENCES, _("Run based on &preferences"), wxEmptyString );

View File

@ -80,6 +80,7 @@
#include <wx/mimetype.h>
#include <wx/event.h>
#include <wx/utils.h>
#include <wx/settings.h>
#include <wx/taskbar.h>
// Standard Libraries