mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=8856
This commit is contained in:
parent
2fd5bf26d8
commit
aeb69034a8
|
@ -13705,7 +13705,6 @@ David 13 Nov 2005
|
|||
|
||||
lib/
|
||||
crypt.C
|
||||
- add "venue" to acct mgr RPCs
|
||||
|
||||
David 13 Nov 2005
|
||||
- Manager: initialize buffer when read password from file
|
||||
|
@ -13724,3 +13723,15 @@ David 14 Nov 2005
|
|||
xml.inc
|
||||
user/
|
||||
am_set_host_info.php (new)
|
||||
|
||||
Rom 14 Nov 2005
|
||||
- Bug Fix: Force a refresh of the statistics window on a resize event.
|
||||
- Bug Fix: Prepopulate the password box on the Select Computer dialog
|
||||
when the participant types in localhost for the computer name.
|
||||
|
||||
clientgui/
|
||||
BOINCGUI.pjd
|
||||
DlgSelectComputer.cpp, .h
|
||||
MainDocument.cpp, .h
|
||||
MainFrame.cpp
|
||||
ViewStatistics.cpp, .h
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "stdwx.h"
|
||||
#include "BOINCGUIApp.h"
|
||||
#include "MainDocument.h"
|
||||
|
||||
////@begin includes
|
||||
////@end includes
|
||||
|
@ -45,6 +46,8 @@ IMPLEMENT_DYNAMIC_CLASS( CDlgSelectComputer, wxDialog )
|
|||
BEGIN_EVENT_TABLE( CDlgSelectComputer, wxDialog )
|
||||
|
||||
////@begin CDlgSelectComputer event table entries
|
||||
EVT_TEXT( ID_SELECTCOMPUTERNAME, CDlgSelectComputer::OnComputerNameUpdated )
|
||||
|
||||
////@end CDlgSelectComputer event table entries
|
||||
|
||||
END_EVENT_TABLE()
|
||||
|
@ -153,7 +156,7 @@ bool CDlgSelectComputer::ShowToolTips(){
|
|||
* Get bitmap resources
|
||||
*/
|
||||
|
||||
wxBitmap CDlgSelectComputer::GetBitmapResource( const wxString& /*name*/ )
|
||||
wxBitmap CDlgSelectComputer::GetBitmapResource( const wxString& WXUNUSED(name) )
|
||||
{
|
||||
// Bitmap retrieval
|
||||
////@begin CDlgSelectComputer bitmap retrieval
|
||||
|
@ -165,11 +168,30 @@ wxBitmap CDlgSelectComputer::GetBitmapResource( const wxString& /*name*/ )
|
|||
* Get icon resources
|
||||
*/
|
||||
|
||||
wxIcon CDlgSelectComputer::GetIconResource( const wxString& /*name*/ )
|
||||
wxIcon CDlgSelectComputer::GetIconResource( const wxString& WXUNUSED(name) )
|
||||
{
|
||||
// Icon retrieval
|
||||
////@begin CDlgSelectComputer icon retrieval
|
||||
return wxNullIcon;
|
||||
////@end CDlgSelectComputer icon retrieval
|
||||
}
|
||||
|
||||
/*!
|
||||
* wxEVT_COMMAND_TEXT_UPDATED event handler for ID_SELECTCOMPUTERNAME
|
||||
*/
|
||||
|
||||
void CDlgSelectComputer::OnComputerNameUpdated( wxCommandEvent& event )
|
||||
{
|
||||
wxString strPassword = wxEmptyString;
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
|
||||
wxASSERT(pDoc);
|
||||
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
|
||||
|
||||
if (m_ComputerNameCtrl->GetValue().Lower() == wxT("localhost")) {
|
||||
pDoc->m_pNetworkConnection->GetLocalPassword(strPassword);
|
||||
m_ComputerPasswordCtrl->SetValue(strPassword);
|
||||
}
|
||||
}
|
||||
|
||||
const char *BOINC_RCSID_28d78701f5="$Id$";
|
||||
|
|
|
@ -87,6 +87,9 @@ public:
|
|||
|
||||
////@begin CDlgSelectComputer event handler declarations
|
||||
|
||||
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_SELECTCOMPUTERNAME
|
||||
void OnComputerNameUpdated( wxCommandEvent& event );
|
||||
|
||||
////@end CDlgSelectComputer event handler declarations
|
||||
|
||||
////@begin CDlgSelectComputer member function declarations
|
||||
|
@ -94,8 +97,8 @@ public:
|
|||
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 ; }
|
||||
wxString GetComputerPassword() const { return m_strComputerPassword ; }
|
||||
void SetComputerPassword(wxString value) { m_strComputerPassword = value ; }
|
||||
|
||||
/// Retrieves bitmap resources
|
||||
wxBitmap GetBitmapResource( const wxString& name );
|
||||
|
|
|
@ -48,10 +48,11 @@ CNetworkConnection::CNetworkConnection(CMainDocument* pDocument) :
|
|||
CNetworkConnection::~CNetworkConnection() {
|
||||
}
|
||||
|
||||
void get_password_from_file(wxString& passwd) {
|
||||
void CNetworkConnection::GetLocalPassword(wxString& strPassword){
|
||||
char buf[256];
|
||||
|
||||
FILE* f = fopen("gui_rpc_auth.cfg", "r");
|
||||
if (!f) return;
|
||||
char buf[256];
|
||||
strcpy(buf, "");
|
||||
fgets(buf, 256, f);
|
||||
fclose(f);
|
||||
|
@ -62,7 +63,7 @@ void get_password_from_file(wxString& passwd) {
|
|||
buf[n] = 0;
|
||||
}
|
||||
}
|
||||
passwd = buf;
|
||||
strPassword = buf;
|
||||
}
|
||||
|
||||
// TODO: get rid of "reconnecting" stuff
|
||||
|
@ -77,11 +78,6 @@ void* CNetworkConnection::Poll() {
|
|||
retval = m_pDocument->rpc.init_poll();
|
||||
if (!retval) {
|
||||
wxLogTrace(wxT("Function Status"), wxT("CNetworkConnection::Poll - init_poll() returned ERR_CONNECT, now authorizing..."));
|
||||
if (m_strNewComputerName.empty() && m_strNewComputerPassword.empty()) {
|
||||
// if connecting to local computer,
|
||||
// look for password in file
|
||||
get_password_from_file(m_strNewComputerPassword);
|
||||
}
|
||||
retval = m_pDocument->rpc.authorize(m_strNewComputerPassword.c_str());
|
||||
if (!retval) {
|
||||
wxLogTrace(wxT("Function Status"), wxT("CNetworkConnection::Poll - Connection Success"));
|
||||
|
|
|
@ -39,6 +39,7 @@ public:
|
|||
int FrameShutdownDetected();
|
||||
int GetConnectedComputerName(wxString& strMachine);
|
||||
int GetConnectingComputerName(wxString& strMachine);
|
||||
void GetLocalPassword(wxString& strPassword);
|
||||
int SetNewComputerName(const wxChar* szComputer);
|
||||
int SetNewComputerPassword(const wxChar* szPassword);
|
||||
void SetStateError();
|
||||
|
@ -77,8 +78,6 @@ public:
|
|||
//
|
||||
private:
|
||||
|
||||
CNetworkConnection* m_pNetworkConnection;
|
||||
|
||||
bool m_bCachedStateLocked;
|
||||
|
||||
wxDateTime m_dtCachedActivityRunModeTimestamp;
|
||||
|
@ -93,6 +92,8 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
CNetworkConnection* m_pNetworkConnection;
|
||||
|
||||
int OnInit();
|
||||
int OnExit();
|
||||
int OnPoll();
|
||||
|
|
|
@ -1383,7 +1383,9 @@ void CMainFrame::OnInitialized(CMainFrameEvent&) {
|
|||
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
|
||||
|
||||
if (!pDoc->IsConnected()) {
|
||||
pDoc->Connect(wxEmptyString, wxEmptyString, TRUE);
|
||||
wxString strPassword = wxEmptyString;
|
||||
pDoc->m_pNetworkConnection->GetLocalPassword(strPassword);
|
||||
pDoc->Connect(wxT("localhost"), strPassword, TRUE);
|
||||
}
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnInitialized - Function End"));
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
BEGIN_EVENT_TABLE (CPaintStatistics, wxPanel)
|
||||
EVT_PAINT(CPaintStatistics::OnPaint)
|
||||
EVT_SIZE(CPaintStatistics::OnSize)
|
||||
END_EVENT_TABLE ()
|
||||
|
||||
CPaintStatistics::CPaintStatistics() {
|
||||
|
@ -268,6 +269,11 @@ void CPaintStatistics::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
|||
dc.EndDrawing();
|
||||
}
|
||||
|
||||
void CPaintStatistics::OnSize(wxSizeEvent& event) {
|
||||
Refresh(TRUE, NULL);
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(CViewStatistics, CBOINCBaseView)
|
||||
|
||||
BEGIN_EVENT_TABLE (CViewStatistics, CBOINCBaseView)
|
||||
|
|
|
@ -33,12 +33,13 @@ class CPaintStatistics : public wxPanel
|
|||
public:
|
||||
CPaintStatistics();
|
||||
CPaintStatistics(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "panel");
|
||||
|
||||
wxInt32 m_SelectedStatistic;
|
||||
|
||||
wxInt32 m_SelectedStatistic;
|
||||
wxString heading;
|
||||
|
||||
protected:
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue