From f0e0f67371eb4fdb9100f63006e55fd3fa9ae231 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 10 Apr 2005 19:01:23 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=5820 --- clientgui/BOINCBaseView.cpp | 36 ++-- clientgui/BOINCBaseView.h | 26 ++- clientgui/BOINCGUIApp.h | 23 +- clientgui/BOINCListCtrl.h | 23 +- clientgui/BOINCTaskBar.h | 31 ++- clientgui/BOINCTaskCtrl.h | 47 ++-- clientgui/DlgAbout.cpp | 2 +- clientgui/DlgAccountManager.cpp | 37 ++-- clientgui/MainDocument.cpp | 370 ++++++++++++++++---------------- clientgui/MainFrame.cpp | 75 ++++--- clientgui/Makefile.am | 14 +- 11 files changed, 332 insertions(+), 352 deletions(-) diff --git a/clientgui/BOINCBaseView.cpp b/clientgui/BOINCBaseView.cpp index 4276d4e99a..65b27dc4b5 100644 --- a/clientgui/BOINCBaseView.cpp +++ b/clientgui/BOINCBaseView.cpp @@ -37,8 +37,8 @@ IMPLEMENT_DYNAMIC_CLASS(CBOINCBaseView, wxPanel) CBOINCBaseView::CBOINCBaseView() {} CBOINCBaseView::CBOINCBaseView( - wxNotebook* pNotebook, wxWindowID iHtmlWindowID, wxInt32 iHtmlWindowFlags, - wxWindowID iListWindowID, wxInt32 iListWindowFlags, bool donothing + wxNotebook* pNotebook, wxWindowID iHtmlWindowID, int iHtmlWindowFlags, + wxWindowID iListWindowID, int iListWindowFlags, bool donothing ) : wxPanel(pNotebook, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL) { if (!donothing) { wxASSERT(NULL != pNotebook); @@ -104,7 +104,7 @@ const char** CBOINCBaseView::GetViewIcon() { } -wxInt32 CBOINCBaseView::GetListRowCount() { +int CBOINCBaseView::GetListRowCount() { wxASSERT(m_pListPane); return m_pListPane->GetItemCount(); } @@ -174,7 +174,7 @@ void CBOINCBaseView::FireOnTaskCellMouseHover( } -wxInt32 CBOINCBaseView::GetDocCount() { +int CBOINCBaseView::GetDocCount() { return 0; } @@ -185,15 +185,15 @@ void CBOINCBaseView::OnListRender (wxTimerEvent& event) { wxASSERT(m_pListPane); - wxInt32 iDocCount = GetDocCount(); - wxInt32 iCacheCount = GetCacheCount(); + int iDocCount = GetDocCount(); + int iCacheCount = GetCacheCount(); if (iDocCount != iCacheCount) { if (0 >= iDocCount) { EmptyCache(); m_pListPane->DeleteAllItems(); } else { - wxInt32 iIndex = 0; - wxInt32 iReturnValue = -1; + int iIndex = 0; + int iReturnValue = -1; if (iDocCount > iCacheCount) { for (iIndex = 0; iIndex < (iDocCount - iCacheCount); iIndex++ ) { @@ -344,31 +344,31 @@ void CBOINCBaseView::SetCurrentQuickTip(const wxString& strQuickTip, const wxStr } -wxInt32 CBOINCBaseView::AddCacheElement() { +int CBOINCBaseView::AddCacheElement() { return -1; } -wxInt32 CBOINCBaseView::EmptyCache() { +int CBOINCBaseView::EmptyCache() { return -1; } -wxInt32 CBOINCBaseView::GetCacheCount() { +int CBOINCBaseView::GetCacheCount() { return -1; } -wxInt32 CBOINCBaseView::RemoveCacheElement() { +int CBOINCBaseView::RemoveCacheElement() { return -1; } -wxInt32 CBOINCBaseView::SyncronizeCache() { - wxInt32 iRowIndex = 0; - wxInt32 iRowTotal = 0; - wxInt32 iColumnIndex = 0; - wxInt32 iColumnTotal = 0; +int CBOINCBaseView::SyncronizeCache() { + int iRowIndex = 0; + int iRowTotal = 0; + int iColumnIndex = 0; + int iColumnTotal = 0; wxString strDocumentText = wxEmptyString; wxString strListPaneText = wxEmptyString; bool bNeedRefreshData = false; @@ -403,7 +403,7 @@ wxInt32 CBOINCBaseView::SyncronizeCache() { } -wxInt32 CBOINCBaseView::UpdateCache( +int CBOINCBaseView::UpdateCache( long WXUNUSED(item), long WXUNUSED(column), wxString& WXUNUSED(strNewData) ) { return -1; diff --git a/clientgui/BOINCBaseView.h b/clientgui/BOINCBaseView.h index e87c912e1d..1dfc983682 100644 --- a/clientgui/BOINCBaseView.h +++ b/clientgui/BOINCBaseView.h @@ -32,8 +32,7 @@ class CBOINCTaskCtrl; class CBOINCListCtrl; -class CTaskItem : wxObject -{ +class CTaskItem : wxObject { public: wxString m_strTaskName; wxString m_strTaskDescription; @@ -43,8 +42,7 @@ public: bool m_bIsClicked; }; -class CBOINCBaseView : public wxPanel -{ +class CBOINCBaseView : public wxPanel { DECLARE_DYNAMIC_CLASS( CBOINCBaseView ) public: @@ -53,9 +51,9 @@ public: CBOINCBaseView( wxNotebook* pNotebook, wxWindowID iHtmlWindowID, - wxInt32 iHtmlWindowFlags, + int iHtmlWindowFlags, wxWindowID iListWindowID, - wxInt32 iListWindowFlags, + int iListWindowFlags, bool donothing=false ); @@ -63,7 +61,7 @@ public: virtual wxString GetViewName(); virtual const char** GetViewIcon(); - virtual wxInt32 GetListRowCount(); + virtual int GetListRowCount(); void FireOnListRender( wxTimerEvent& event ); bool FireOnSaveState( wxConfigBase* pConfig ); @@ -82,7 +80,7 @@ public: protected: - virtual wxInt32 GetDocCount(); + virtual int GetDocCount(); virtual void OnListRender( wxTimerEvent& event ); @@ -109,12 +107,12 @@ protected: wxString GetCurrentQuickTipText(); void SetCurrentQuickTip( const wxString& strQuickTip, const wxString& strQuickTipText ); - virtual wxInt32 AddCacheElement(); - virtual wxInt32 EmptyCache(); - virtual wxInt32 GetCacheCount(); - virtual wxInt32 RemoveCacheElement(); - virtual wxInt32 SyncronizeCache(); - virtual wxInt32 UpdateCache( long item, long column, wxString& strNewData ); + virtual int AddCacheElement(); + virtual int EmptyCache(); + virtual int GetCacheCount(); + virtual int RemoveCacheElement(); + virtual int SyncronizeCache(); + virtual int UpdateCache( long item, long column, wxString& strNewData ); bool _EnsureLastItemVisible(); virtual bool EnsureLastItemVisible(); diff --git a/clientgui/BOINCGUIApp.h b/clientgui/BOINCGUIApp.h index e9287f9945..23988d967b 100644 --- a/clientgui/BOINCGUIApp.h +++ b/clientgui/BOINCGUIApp.h @@ -36,8 +36,7 @@ #endif -class CBOINCGUIApp : public wxApp -{ +class CBOINCGUIApp : public wxApp { DECLARE_DYNAMIC_CLASS(CBOINCGUIApp) protected: @@ -54,8 +53,8 @@ protected: void StartupBOINCCore(); void ShutdownBOINCCore(); - wxInt32 StartupSystemIdleDetection(); - wxInt32 ShutdownSystemIdleDetection(); + int StartupSystemIdleDetection(); + int ShutdownSystemIdleDetection(); wxConfig* m_pConfig; wxLocale* m_pLocale; @@ -73,7 +72,7 @@ protected: bool m_bBOINCStartedByManager; bool m_bFrameVisible; - wxInt32 m_lBOINCCoreProcessId; + int m_lBOINCCoreProcessId; #ifdef __WXMSW__ HANDLE m_hBOINCCoreProcess; @@ -92,19 +91,19 @@ public: bool OnInit(); - wxInt32 UpdateSystemIdleDetection(); + int 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; } #ifdef __APPLE__ - CMacSystemMenu* GetMacSystemMenu() { return m_pMacSystemMenu; }; + CMacSystemMenu* GetMacSystemMenu() { return m_pMacSystemMenu; } #endif #endif - wxString* GetSupportedLanguages() { return (wxString*)&m_strLanguages; }; - wxInt32 GetSupportedLanguagesCount() { return WXSIZEOF(m_strLanguages); }; + wxString* GetSupportedLanguages() { return (wxString*)&m_strLanguages; } + int GetSupportedLanguagesCount() { return WXSIZEOF(m_strLanguages); } }; diff --git a/clientgui/BOINCListCtrl.h b/clientgui/BOINCListCtrl.h index 9e299e2814..32e4472981 100644 --- a/clientgui/BOINCListCtrl.h +++ b/clientgui/BOINCListCtrl.h @@ -27,28 +27,27 @@ class CBOINCBaseView; -class CBOINCListCtrl : public wxListView -{ - DECLARE_DYNAMIC_CLASS( CBOINCListCtrl ) +class CBOINCListCtrl : public wxListView { + DECLARE_DYNAMIC_CLASS(CBOINCListCtrl) public: CBOINCListCtrl(); - CBOINCListCtrl( CBOINCBaseView* pView, wxWindowID iListWindowID, wxInt32 iListWindowFlags ); + CBOINCListCtrl(CBOINCBaseView* pView, wxWindowID iListWindowID, int iListWindowFlags); ~CBOINCListCtrl(); - virtual bool OnSaveState( wxConfigBase* pConfig ); - virtual bool OnRestoreState( wxConfigBase* pConfig ); + virtual bool OnSaveState(wxConfigBase* pConfig); + virtual bool OnRestoreState(wxConfigBase* pConfig); private: - virtual void OnClick( wxCommandEvent& event ); - virtual void OnSelected( wxListEvent& event ); - virtual void OnDeselected( wxListEvent& event ); + virtual void OnClick(wxCommandEvent& event); + virtual void OnSelected(wxListEvent& event); + virtual void OnDeselected(wxListEvent& event); - virtual wxString OnGetItemText( long item, long column ) const; - virtual int OnGetItemImage( long item ) const; - virtual wxListItemAttr* OnGetItemAttr( long item ) const; + virtual wxString OnGetItemText(long item, long column) const; + virtual int OnGetItemImage(long item) const; + virtual wxListItemAttr* OnGetItemAttr(long item) const; bool m_bIsSingleSelection; diff --git a/clientgui/BOINCTaskBar.h b/clientgui/BOINCTaskBar.h index b2ba499391..c756fc351b 100644 --- a/clientgui/BOINCTaskBar.h +++ b/clientgui/BOINCTaskBar.h @@ -35,39 +35,38 @@ #endif -class CTaskBarIcon : public wxTaskBarIconEx -{ +class CTaskBarIcon : public wxTaskBarIconEx { DECLARE_DYNAMIC_CLASS(CTaskBarIcon) public: CTaskBarIcon(); ~CTaskBarIcon(); - void OnOpen( wxCommandEvent& event ); - void OnActivitySelection( wxCommandEvent& event ); - void OnNetworkSelection( wxCommandEvent& event ); - void OnAbout( wxCommandEvent& event ); - void OnExit( wxCommandEvent& event ); + void OnOpen(wxCommandEvent& event); + void OnActivitySelection(wxCommandEvent& event); + void OnNetworkSelection(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + void OnExit(wxCommandEvent& event); #ifdef __WXMSW__ - void OnShutdown( wxTaskBarIconExEvent& event ); + void OnShutdown(wxTaskBarIconExEvent& event); #endif - void OnIdle( wxIdleEvent& event ); - void OnClose( wxCloseEvent& event ); + void OnIdle(wxIdleEvent& event); + void OnClose(wxCloseEvent& event); #ifdef __WXMSW__ - void OnMouseMove( wxTaskBarIconEvent& event ); + void OnMouseMove(wxTaskBarIconEvent& event); #endif - void OnLButtonDClick( wxTaskBarIconEvent& event ); + void OnLButtonDClick(wxTaskBarIconEvent& event); #ifdef __WXMSW__ - void OnContextMenu( wxTaskBarIconExEvent& event ); + void OnContextMenu(wxTaskBarIconExEvent& event); #else - void OnContextMenu( wxTaskBarIconEvent& event ); + void OnContextMenu(wxTaskBarIconEvent& event); #endif - void OnRButtonDown( wxTaskBarIconEvent& event ); - void OnRButtonUp( wxTaskBarIconEvent& event ); + void OnRButtonDown(wxTaskBarIconEvent& event); + void OnRButtonUp(wxTaskBarIconEvent& event); wxMenu *BuildContextMenu(); void AdjustMenuItems(wxMenu* menu); diff --git a/clientgui/BOINCTaskCtrl.h b/clientgui/BOINCTaskCtrl.h index 783d7ae8e3..c7a5b5ac4f 100644 --- a/clientgui/BOINCTaskCtrl.h +++ b/clientgui/BOINCTaskCtrl.h @@ -27,72 +27,71 @@ class CBOINCBaseView; -class CBOINCTaskCtrl : public wxHtmlWindow -{ +class CBOINCTaskCtrl : public wxHtmlWindow { DECLARE_DYNAMIC_CLASS( CBOINCTaskCtrl ) public: CBOINCTaskCtrl(); - CBOINCTaskCtrl( CBOINCBaseView* pView, wxWindowID iHtmlWindowID, wxInt32 iHtmlWindowFlags ); + CBOINCTaskCtrl( CBOINCBaseView* pView, wxWindowID iHtmlWindowID, int iHtmlWindowFlags ); ~CBOINCTaskCtrl(); - virtual void BeginTaskPage(); - virtual void BeginTaskSection( const wxString& strTaskHeaderFilename, + virtual void BeginTaskPage(); + virtual void BeginTaskSection( const wxString& strTaskHeaderFilename, bool bHidden ); #if 0 - virtual void BeginTaskSection( const wxString& strLink, + virtual void BeginTaskSection( const wxString& strLink, const wxString& strTaskHeaderFilename, bool bHidden ); #endif - virtual void CreateTask( const wxString& strLink, + virtual void CreateTask( const wxString& strLink, const wxString& strTaskName, bool bHidden ); - virtual void CreateTask( const wxString& strLink, + virtual void CreateTask( const wxString& strLink, const wxString& strTaskIconFilename, const wxString& strTaskName, bool bHidden ); - virtual void CreateTaskSeparator( bool bHidden ); - virtual void EndTaskSection( bool bHidden ); - virtual void UpdateQuickTip( const wxString& strIconFilename, + virtual void CreateTaskSeparator( bool bHidden ); + virtual void EndTaskSection( bool bHidden ); + virtual void UpdateQuickTip( const wxString& strIconFilename, const wxString& strTip, bool bHidden ); #if 0 - virtual void UpdateQuickTip( const wxString& strLink, + virtual void UpdateQuickTip( const wxString& strLink, const wxString& strIconFilename, const wxString& strTip, bool bHidden ); #endif - virtual void EndTaskPage(); + virtual void EndTaskPage(); - virtual void CreateTaskHeader( const wxString& strFilename, + virtual void CreateTaskHeader( const wxString& strFilename, const wxBitmap& itemTaskBitmap, const wxString& strTaskName ); - virtual void AddVirtualFile( const wxString& strFilename, + virtual void AddVirtualFile( const wxString& strFilename, wxImage& itemImage, long lType ); - virtual void AddVirtualFile( const wxString& strFilename, + virtual void AddVirtualFile( const wxString& strFilename, const wxBitmap& itemBitmap, long lType ); - virtual void RemoveVirtualFile( const wxString& strFilename ); + virtual void RemoveVirtualFile( const wxString& strFilename ); - virtual bool OnSaveState( wxConfigBase* pConfig ); - virtual bool OnRestoreState( wxConfigBase* pConfig ); + virtual bool OnSaveState( wxConfigBase* pConfig ); + virtual bool OnRestoreState( wxConfigBase* pConfig ); - virtual void OnLinkClicked( const wxHtmlLinkInfo& link ); - virtual void OnCellClicked( wxHtmlCell* cell, wxCoord x, wxCoord y, const wxMouseEvent& event ); - virtual void OnCellMouseHover( wxHtmlCell* cell, wxCoord x, wxCoord y ); + virtual void OnLinkClicked( const wxHtmlLinkInfo& link ); + virtual void OnCellClicked( wxHtmlCell* cell, wxCoord x, wxCoord y, const wxMouseEvent& event ); + virtual void OnCellMouseHover( wxHtmlCell* cell, wxCoord x, wxCoord y ); virtual wxHtmlOpeningStatus OnOpeningURL( wxHtmlURLType type, const wxString& url, wxString *redirect ); private: - CBOINCBaseView* m_pParentView; + CBOINCBaseView* m_pParentView; - wxString m_strTaskPage; + wxString m_strTaskPage; }; diff --git a/clientgui/DlgAbout.cpp b/clientgui/DlgAbout.cpp index fea54762c0..c9bdc6c6f5 100644 --- a/clientgui/DlgAbout.cpp +++ b/clientgui/DlgAbout.cpp @@ -187,7 +187,7 @@ wxBitmap CDlgAbout::GetBitmapResource(const wxString& name) { * Get icon resources */ -wxIcon CDlgAbout::GetIconResource(const wxString& name) { +wxIcon CDlgAbout::GetIconResource(const wxString&) { // Icon retrieval ////@begin CDlgAbout icon retrieval return wxNullIcon; diff --git a/clientgui/DlgAccountManager.cpp b/clientgui/DlgAccountManager.cpp index dd0bce1eaa..2f334fcf43 100644 --- a/clientgui/DlgAccountManager.cpp +++ b/clientgui/DlgAccountManager.cpp @@ -45,13 +45,13 @@ * CDlgAccountManager type definition */ -IMPLEMENT_DYNAMIC_CLASS( CDlgAccountManager, wxDialog ) +IMPLEMENT_DYNAMIC_CLASS(CDlgAccountManager, wxDialog) /*! * CDlgAccountManager event table definition */ -BEGIN_EVENT_TABLE( CDlgAccountManager, wxDialog ) +BEGIN_EVENT_TABLE(CDlgAccountManager, wxDialog) ////@begin CDlgAccountManager event table entries ////@end CDlgAccountManager event table entries @@ -62,11 +62,11 @@ END_EVENT_TABLE() * CDlgAccountManager constructors */ -CDlgAccountManager::CDlgAccountManager( ) +CDlgAccountManager::CDlgAccountManager() { } -CDlgAccountManager::CDlgAccountManager( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +CDlgAccountManager::CDlgAccountManager(wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style) { Create(parent, id, caption, pos, size, style); } @@ -75,7 +75,7 @@ CDlgAccountManager::CDlgAccountManager( wxWindow* parent, wxWindowID id, const w * CDlgAccountManager creator */ -bool CDlgAccountManager::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +bool CDlgAccountManager::Create(wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style) { ////@begin CDlgAccountManager member initialisation m_AcctManagerUsernameCtrl = NULL; @@ -84,7 +84,7 @@ bool CDlgAccountManager::Create( wxWindow* parent, wxWindowID id, const wxString ////@begin CDlgAccountManager creation SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); - wxDialog::Create( parent, id, caption, pos, size, style ); + wxDialog::Create(parent, id, caption, pos, size, style); CreateControls(); GetSizer()->Fit(this); @@ -114,37 +114,37 @@ void CDlgAccountManager::CreateControls() itemBoxSizer3->Add(itemFlexGridSizer4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); wxStaticText* itemStaticText5 = new wxStaticText; - itemStaticText5->Create( itemDialog1, wxID_STATIC, _("Username:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + itemStaticText5->Create(itemDialog1, wxID_STATIC, _("Username:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); itemFlexGridSizer4->Add(itemStaticText5, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); m_AcctManagerUsernameCtrl = new wxTextCtrl; - m_AcctManagerUsernameCtrl->Create( itemDialog1, ID_ACCTMANAGERUSERNAME, _T(""), wxDefaultPosition, wxSize(200, -1), 0 ); + m_AcctManagerUsernameCtrl->Create(itemDialog1, ID_ACCTMANAGERUSERNAME, _T(""), wxDefaultPosition, wxSize(200, -1), 0); itemFlexGridSizer4->Add(m_AcctManagerUsernameCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); wxStaticText* itemStaticText7 = new wxStaticText; - itemStaticText7->Create( itemDialog1, wxID_STATIC, _("Password:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + itemStaticText7->Create(itemDialog1, wxID_STATIC, _("Password:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); itemFlexGridSizer4->Add(itemStaticText7, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); m_AcctManagerPasswordCtrl = new wxTextCtrl; - m_AcctManagerPasswordCtrl->Create( itemDialog1, ID_ACCTMANAGERPASSWORD, _T(""), wxDefaultPosition, wxSize(200, -1), wxTE_PASSWORD ); + m_AcctManagerPasswordCtrl->Create(itemDialog1, ID_ACCTMANAGERPASSWORD, _T(""), wxDefaultPosition, wxSize(200, -1), wxTE_PASSWORD); itemFlexGridSizer4->Add(m_AcctManagerPasswordCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxVERTICAL); itemBoxSizer3->Add(itemBoxSizer9, 0, wxALIGN_TOP|wxALL, 5); wxButton* itemButton10 = new wxButton; - itemButton10->Create( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton10->Create(itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0); itemButton10->SetDefault(); itemBoxSizer9->Add(itemButton10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); wxButton* itemButton11 = new wxButton; - itemButton11->Create( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + 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) ); + m_AcctManagerUsernameCtrl->SetValidator(wxGenericValidator(& m_strAcctManagerUsername)); + m_AcctManagerPasswordCtrl->SetValidator(wxGenericValidator(& m_strAcctManagerPassword)); ////@end CDlgAccountManager content construction } @@ -152,8 +152,7 @@ void CDlgAccountManager::CreateControls() * Should we show tooltips? */ -bool CDlgAccountManager::ShowToolTips() -{ +bool CDlgAccountManager::ShowToolTips() { return TRUE; } @@ -161,8 +160,7 @@ bool CDlgAccountManager::ShowToolTips() * Get bitmap resources */ -wxBitmap CDlgAccountManager::GetBitmapResource( const wxString& name ) -{ +wxBitmap CDlgAccountManager::GetBitmapResource(const wxString&) { // Bitmap retrieval ////@begin CDlgAccountManager bitmap retrieval return wxNullBitmap; @@ -173,8 +171,7 @@ wxBitmap CDlgAccountManager::GetBitmapResource( const wxString& name ) * Get icon resources */ -wxIcon CDlgAccountManager::GetIconResource( const wxString& name ) -{ +wxIcon CDlgAccountManager::GetIconResource(const wxString&) { // Icon retrieval ////@begin CDlgAccountManager icon retrieval return wxNullIcon; diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index fb5d5adc72..fc1f96feef 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -73,7 +73,7 @@ void* CNetworkConnection::Poll() { retval = m_pDocument->rpc.authorize(strComputerPassword.c_str()); if (!retval) { wxLogTrace("CNetworkConnection::Poll - Connection Success"); - SetStateSuccess( strComputer, strComputerPassword ); + SetStateSuccess(strComputer, strComputerPassword); } else if (ERR_AUTHENTICATOR == retval) { wxLogTrace("CNetworkConnection::Poll - RPC Authorization - ERR_AUTHENTICATOR"); SetStateErrorAuthentication(); @@ -85,10 +85,10 @@ void* CNetworkConnection::Poll() { wxLogTrace("CNetworkConnection::Poll - RPC Connection Failed '%d'", retval); SetStateError(); } - } else if (IsConnectEventSignaled() || m_bReconnectOnError ) { - if ( ( m_bForceReconnect ) || - ( !IsConnected() && m_bReconnectOnError ) - ) { + } else if (IsConnectEventSignaled() || m_bReconnectOnError) { + if ((m_bForceReconnect) || + (!IsConnected() && m_bReconnectOnError) + ) { wxLogTrace("CNetworkConnection::Poll - Resetting Document State"); m_pDocument->ResetState(); wxLogTrace("CNetworkConnection::Poll - Setting connection state to reconnecting"); @@ -126,30 +126,30 @@ void* CNetworkConnection::Poll() { } -wxInt32 CNetworkConnection::FrameShutdownDetected() { +int CNetworkConnection::FrameShutdownDetected() { m_bFrameShutdownDetected = true; return 0; } -wxInt32 CNetworkConnection::GetConnectedComputerName( wxString& strMachine ) { +int CNetworkConnection::GetConnectedComputerName(wxString& strMachine) { strMachine = m_strConnectedComputerName; return 0; } -wxInt32 CNetworkConnection::GetConnectingComputerName( wxString& strMachine ) { +int CNetworkConnection::GetConnectingComputerName(wxString& strMachine) { strMachine = m_strNewComputerName; return 0; } -wxInt32 CNetworkConnection::SetNewComputerName( const wxChar* szComputer ) { +int CNetworkConnection::SetNewComputerName(const wxChar* szComputer) { m_strNewComputerName = szComputer; return 0; } -wxInt32 CNetworkConnection::SetNewComputerPassword( const wxChar* szPassword ) { +int CNetworkConnection::SetNewComputerPassword(const wxChar* szPassword) { m_strNewComputerPassword = szPassword; return 0; } @@ -197,7 +197,7 @@ void CNetworkConnection::SetStateReconnecting() { } -void CNetworkConnection::SetStateSuccess( std::string& strComputer, std::string& strComputerPassword ) { +void CNetworkConnection::SetStateSuccess(std::string& strComputer, std::string& strComputerPassword) { CMainFrame* pFrame = wxGetApp().GetFrame(); if (pFrame && !m_bFrameShutdownDetected) { wxASSERT(wxDynamicCast(pFrame, CMainFrame)); @@ -230,7 +230,7 @@ IMPLEMENT_DYNAMIC_CLASS(CMainDocument, wxObject) CMainDocument::CMainDocument() { #ifdef __WIN32__ - wxInt32 retval; + int retval; WSADATA wsdata; retval = WSAStartup(MAKEWORD(1, 1), &wsdata); @@ -276,12 +276,12 @@ CMainDocument::~CMainDocument() { } -wxInt32 CMainDocument::CachedStateUpdate() { +int CMainDocument::CachedStateUpdate() { CMainFrame* pFrame = wxGetApp().GetFrame(); - wxInt32 retval = 0; + int retval = 0; wxTimeSpan ts(m_dtCachedStateLockTimestamp - m_dtCachedStateTimestamp); - if (!m_bCachedStateLocked && IsConnected() && (ts.GetSeconds() > 3600) ) { + if (!m_bCachedStateLocked && IsConnected() && (ts.GetSeconds() > 3600)) { wxASSERT(wxDynamicCast(pFrame, CMainFrame)); pFrame->UpdateStatusText(_("Retrieving system state; please wait...")); @@ -307,15 +307,15 @@ wxInt32 CMainDocument::CachedStateUpdate() { } -wxInt32 CMainDocument::ForceCacheUpdate() { +int CMainDocument::ForceCacheUpdate() { m_dtCachedStateLockTimestamp = wxDateTime::Now(); m_dtCachedStateTimestamp = wxDateTime((time_t)0); return 0; } -wxInt32 CMainDocument::OnInit() { - wxInt32 iRetVal = -1; +int CMainDocument::OnInit() { + int iRetVal = -1; // attempt to lookup account management information acct_mgr.init(); @@ -327,8 +327,8 @@ wxInt32 CMainDocument::OnInit() { } -wxInt32 CMainDocument::OnExit() { - wxInt32 iRetVal = 0; +int CMainDocument::OnExit() { + int iRetVal = 0; // attempt to cleanup the account management information acct_mgr.close(); @@ -342,8 +342,8 @@ wxInt32 CMainDocument::OnExit() { } -wxInt32 CMainDocument::OnPoll() { - wxInt32 iRetVal = 0; +int CMainDocument::OnPoll() { + int iRetVal = 0; if (m_pNetworkConnection) { m_pNetworkConnection->Poll(); @@ -353,7 +353,7 @@ wxInt32 CMainDocument::OnPoll() { } -wxInt32 CMainDocument::OnRefreshState() { +int CMainDocument::OnRefreshState() { if (IsConnected()) CachedStateUpdate(); @@ -361,7 +361,7 @@ wxInt32 CMainDocument::OnRefreshState() { } -wxInt32 CMainDocument::ResetState() { +int CMainDocument::ResetState() { rpc.close(); state.clear(); host.clear(); @@ -380,28 +380,28 @@ wxInt32 CMainDocument::ResetState() { } -wxInt32 CMainDocument::Connect(const wxChar* szComputer, const wxChar* szComputerPassword, bool bDisconnect) { +int CMainDocument::Connect(const wxChar* szComputer, const wxChar* szComputerPassword, bool bDisconnect) { - if ( bDisconnect ) { + if (bDisconnect) { m_pNetworkConnection->ForceReconnect(); } - m_pNetworkConnection->SetNewComputerName( szComputer ); - m_pNetworkConnection->SetNewComputerPassword( szComputerPassword ); + m_pNetworkConnection->SetNewComputerName(szComputer); + m_pNetworkConnection->SetNewComputerPassword(szComputerPassword); m_pNetworkConnection->FireReconnectEvent(); return 0; } -wxInt32 CMainDocument::GetConnectedComputerName(wxString& strMachine) { - m_pNetworkConnection->GetConnectedComputerName( strMachine ); +int CMainDocument::GetConnectedComputerName(wxString& strMachine) { + m_pNetworkConnection->GetConnectedComputerName(strMachine); return 0; } -wxInt32 CMainDocument::GetConnectingComputerName(wxString& strMachine) { - m_pNetworkConnection->GetConnectingComputerName( strMachine ); +int CMainDocument::GetConnectingComputerName(wxString& strMachine) { + m_pNetworkConnection->GetConnectingComputerName(strMachine); return 0; } @@ -416,30 +416,30 @@ bool CMainDocument::IsReconnecting() { } -wxInt32 CMainDocument::CachedStateLock() { +int CMainDocument::CachedStateLock() { m_bCachedStateLocked = true; m_dtCachedStateLockTimestamp = wxDateTime::Now(); return 0; } -wxInt32 CMainDocument::CachedStateUnlock() { +int CMainDocument::CachedStateUnlock() { m_bCachedStateLocked = false; return 0; } -wxInt32 CMainDocument::FrameShutdownDetected() { +int CMainDocument::FrameShutdownDetected() { return m_pNetworkConnection->FrameShutdownDetected(); } -wxInt32 CMainDocument::GetCoreClientVersion() { +int CMainDocument::GetCoreClientVersion() { return rpc.client_version; } -wxInt32 CMainDocument::GetActivityRunMode(wxInt32& iMode) { - wxInt32 iRetVal = 0; +int CMainDocument::GetActivityRunMode(int& iMode) { + int iRetVal = 0; if (IsConnected()) { wxTimeSpan ts(wxDateTime::Now() - m_dtCachedActivityRunModeTimestamp); @@ -461,8 +461,8 @@ wxInt32 CMainDocument::GetActivityRunMode(wxInt32& iMode) { } -wxInt32 CMainDocument::SetActivityRunMode(wxInt32 iMode) { - wxInt32 iRetVal = 0; +int CMainDocument::SetActivityRunMode(int iMode) { + int iRetVal = 0; if (IsConnected()) { iRetVal = rpc.set_run_mode(iMode); @@ -476,8 +476,8 @@ wxInt32 CMainDocument::SetActivityRunMode(wxInt32 iMode) { } -wxInt32 CMainDocument::GetNetworkRunMode(wxInt32& iMode) { - wxInt32 iRetVal = 0; +int CMainDocument::GetNetworkRunMode(int& iMode) { + int iRetVal = 0; if (IsConnected()) { wxTimeSpan ts(wxDateTime::Now() - m_dtCachedNetworkRunModeTimestamp); @@ -499,8 +499,8 @@ wxInt32 CMainDocument::GetNetworkRunMode(wxInt32& iMode) { } -wxInt32 CMainDocument::SetNetworkRunMode(wxInt32 iMode) { - wxInt32 iRetVal = 0; +int CMainDocument::SetNetworkRunMode(int iMode) { + int iRetVal = 0; if (IsConnected()) { iRetVal = rpc.set_network_mode(iMode); @@ -514,8 +514,8 @@ wxInt32 CMainDocument::SetNetworkRunMode(wxInt32 iMode) { } -wxInt32 CMainDocument::GetActivityState(bool& bActivitiesSuspended, bool& bNetworkSuspended) { - wxInt32 iRetVal = 0; +int CMainDocument::GetActivityState(bool& bActivitiesSuspended, bool& bNetworkSuspended) { + int iRetVal = 0; wxTimeSpan ts(wxDateTime::Now() - m_dtCachedActivityStateTimestamp); if (ts.GetSeconds() > 10) { @@ -537,21 +537,21 @@ wxInt32 CMainDocument::GetActivityState(bool& bActivitiesSuspended, bool& bNetwo } -wxInt32 CMainDocument::RunBenchmarks() { +int CMainDocument::RunBenchmarks() { return rpc.run_benchmarks(); } -wxInt32 CMainDocument::CoreClientQuit() { +int CMainDocument::CoreClientQuit() { return rpc.quit(); } -wxInt32 CMainDocument::CachedProjectStatusUpdate() { - wxInt32 iRetVal = 0; - wxInt32 i = 0; +int CMainDocument::CachedProjectStatusUpdate() { + int iRetVal = 0; + int i = 0; - if ( IsConnected() ) { + if (IsConnected()) { iRetVal = rpc.get_project_status(project_status); if (iRetVal) { wxLogTrace("CMainDocument::CachedProjectStatusUpdate - Get Project Status Failed '%d'", iRetVal); @@ -568,8 +568,8 @@ wxInt32 CMainDocument::CachedProjectStatusUpdate() { } -wxInt32 CMainDocument::GetProjectCount() { - wxInt32 iCount = -1; +int CMainDocument::GetProjectCount() { + int iCount = -1; CachedStateUpdate(); CachedProjectStatusUpdate(); @@ -581,7 +581,7 @@ wxInt32 CMainDocument::GetProjectCount() { } -wxInt32 CMainDocument::GetProjectProjectName(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetProjectProjectName(int iIndex, wxString& strBuffer) { PROJECT* pProject = NULL; strBuffer = ""; @@ -604,7 +604,7 @@ wxInt32 CMainDocument::GetProjectProjectName(wxInt32 iIndex, wxString& strBuffer } -wxInt32 CMainDocument::GetProjectProjectURL(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetProjectProjectURL(int iIndex, wxString& strBuffer) { PROJECT* pProject = NULL; try { @@ -622,7 +622,7 @@ wxInt32 CMainDocument::GetProjectProjectURL(wxInt32 iIndex, wxString& strBuffer) } -wxInt32 CMainDocument::GetProjectAccountName(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetProjectAccountName(int iIndex, wxString& strBuffer) { PROJECT* pProject = NULL; try { @@ -640,7 +640,7 @@ wxInt32 CMainDocument::GetProjectAccountName(wxInt32 iIndex, wxString& strBuffer } -wxInt32 CMainDocument::GetProjectTeamName(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetProjectTeamName(int iIndex, wxString& strBuffer) { PROJECT* pProject = NULL; try { @@ -658,7 +658,7 @@ wxInt32 CMainDocument::GetProjectTeamName(wxInt32 iIndex, wxString& strBuffer) { } -wxInt32 CMainDocument::GetProjectTotalCredit(wxInt32 iIndex, float& fBuffer) { +int CMainDocument::GetProjectTotalCredit(int iIndex, float& fBuffer) { PROJECT* pProject = NULL; try { @@ -676,7 +676,7 @@ wxInt32 CMainDocument::GetProjectTotalCredit(wxInt32 iIndex, float& fBuffer) { } -wxInt32 CMainDocument::GetProjectAvgCredit(wxInt32 iIndex, float& fBuffer) { +int CMainDocument::GetProjectAvgCredit(int iIndex, float& fBuffer) { PROJECT* pProject = NULL; try { @@ -694,7 +694,7 @@ wxInt32 CMainDocument::GetProjectAvgCredit(wxInt32 iIndex, float& fBuffer) { } -wxInt32 CMainDocument::GetProjectResourceShare(wxInt32 iIndex, float& fBuffer) { +int CMainDocument::GetProjectResourceShare(int iIndex, float& fBuffer) { PROJECT* pProject = NULL; try { @@ -712,13 +712,13 @@ wxInt32 CMainDocument::GetProjectResourceShare(wxInt32 iIndex, float& fBuffer) { } -wxInt32 CMainDocument::GetProjectTotalResourceShare(wxInt32 WXUNUSED(iIndex), float& fBuffer) { +int CMainDocument::GetProjectTotalResourceShare(int WXUNUSED(iIndex), float& fBuffer) { fBuffer = m_fProjectTotalResourceShare; return 0; } -wxInt32 CMainDocument::GetProjectMinRPCTime(wxInt32 iIndex, wxInt32& iBuffer) { +int CMainDocument::GetProjectMinRPCTime(int iIndex, int& iBuffer) { PROJECT* pProject = NULL; try { @@ -737,8 +737,8 @@ wxInt32 CMainDocument::GetProjectMinRPCTime(wxInt32 iIndex, wxInt32& iBuffer) { } -wxInt32 CMainDocument::GetProjectWebsiteCount(wxInt32 iIndex) { - wxInt32 iCount = 0; +int CMainDocument::GetProjectWebsiteCount(int iIndex) { + int iCount = 0; wxString strProjectURL = wxEmptyString; std::string str; PROJECT* pProject = NULL; @@ -756,7 +756,7 @@ wxInt32 CMainDocument::GetProjectWebsiteCount(wxInt32 iIndex) { } -wxInt32 CMainDocument::GetProjectWebsiteName(wxInt32 iProjectIndex, wxInt32 iWebsiteIndex, wxString& strBuffer) { +int CMainDocument::GetProjectWebsiteName(int iProjectIndex, int iWebsiteIndex, wxString& strBuffer) { wxString strProjectURL = wxEmptyString; std::string str; PROJECT* pProject = NULL; @@ -777,7 +777,7 @@ wxInt32 CMainDocument::GetProjectWebsiteName(wxInt32 iProjectIndex, wxInt32 iWeb } -wxInt32 CMainDocument::GetProjectWebsiteDescription(wxInt32 iProjectIndex, wxInt32 iWebsiteIndex, wxString& strBuffer) { +int CMainDocument::GetProjectWebsiteDescription(int iProjectIndex, int iWebsiteIndex, wxString& strBuffer) { wxString strProjectURL = wxEmptyString; std::string str; PROJECT* pProject = NULL; @@ -798,7 +798,7 @@ wxInt32 CMainDocument::GetProjectWebsiteDescription(wxInt32 iProjectIndex, wxInt } -wxInt32 CMainDocument::GetProjectWebsiteLink(wxInt32 iProjectIndex, wxInt32 iWebsiteIndex, wxString& strBuffer) { +int CMainDocument::GetProjectWebsiteLink(int iProjectIndex, int iWebsiteIndex, wxString& strBuffer) { wxString strProjectURL = wxEmptyString; std::string str; PROJECT* pProject = NULL; @@ -819,7 +819,7 @@ wxInt32 CMainDocument::GetProjectWebsiteLink(wxInt32 iProjectIndex, wxInt32 iWeb } -bool CMainDocument::IsProjectSuspended(wxInt32 iIndex) { +bool CMainDocument::IsProjectSuspended(int iIndex) { PROJECT* pProject = NULL; bool bRetVal = false; @@ -838,7 +838,7 @@ bool CMainDocument::IsProjectSuspended(wxInt32 iIndex) { } -bool CMainDocument::IsProjectRPCPending(wxInt32 iIndex) { +bool CMainDocument::IsProjectRPCPending(int iIndex) { PROJECT* pProject = NULL; bool bRetVal = false; @@ -857,14 +857,14 @@ bool CMainDocument::IsProjectRPCPending(wxInt32 iIndex) { } -wxInt32 CMainDocument::ProjectAttach(const wxString& strURL, const wxString& strAccountKey) { +int CMainDocument::ProjectAttach(const wxString& strURL, const wxString& strAccountKey) { return rpc.project_attach(strURL.c_str(), strAccountKey.c_str()); } -wxInt32 CMainDocument::ProjectDetach(wxInt32 iIndex) { +int CMainDocument::ProjectDetach(int iIndex) { PROJECT* pProject = NULL; - wxInt32 iRetVal = -1; + int iRetVal = -1; try { if (!project_status.projects.empty()) @@ -881,9 +881,9 @@ wxInt32 CMainDocument::ProjectDetach(wxInt32 iIndex) { } -wxInt32 CMainDocument::ProjectUpdate(wxInt32 iIndex) { +int CMainDocument::ProjectUpdate(int iIndex) { PROJECT* pProject = NULL; - wxInt32 iRetVal = -1; + int iRetVal = -1; try { if (!project_status.projects.empty()) @@ -900,9 +900,9 @@ wxInt32 CMainDocument::ProjectUpdate(wxInt32 iIndex) { } -wxInt32 CMainDocument::ProjectReset(wxInt32 iIndex) { +int CMainDocument::ProjectReset(int iIndex) { PROJECT* pProject = NULL; - wxInt32 iRetVal = -1; + int iRetVal = -1; try { if (!project_status.projects.empty()) @@ -919,10 +919,10 @@ wxInt32 CMainDocument::ProjectReset(wxInt32 iIndex) { } -wxInt32 CMainDocument::ProjectSuspend(wxInt32 iIndex) { +int CMainDocument::ProjectSuspend(int iIndex) { PROJECT* pProject = NULL; PROJECT* pStateProject = NULL; - wxInt32 iRetVal = -1; + int iRetVal = -1; try { if (!project_status.projects.empty()) @@ -948,10 +948,10 @@ wxInt32 CMainDocument::ProjectSuspend(wxInt32 iIndex) { } -wxInt32 CMainDocument::ProjectResume(wxInt32 iIndex) { +int CMainDocument::ProjectResume(int iIndex) { PROJECT* pProject = NULL; PROJECT* pStateProject = NULL; - wxInt32 iRetVal = -1; + int iRetVal = -1; try { if (!project_status.projects.empty()) @@ -978,10 +978,10 @@ wxInt32 CMainDocument::ProjectResume(wxInt32 iIndex) { } -wxInt32 CMainDocument::CachedResultsStatusUpdate() { - wxInt32 iRetVal = 0; +int CMainDocument::CachedResultsStatusUpdate() { + int iRetVal = 0; - if ( IsConnected() ) { + if (IsConnected()) { iRetVal = rpc.get_results(results); if (iRetVal) { wxLogTrace("CMainDocument::CachedResultsStatusUpdate - Get Result Status Failed '%d'", iRetVal); @@ -993,8 +993,8 @@ wxInt32 CMainDocument::CachedResultsStatusUpdate() { } -wxInt32 CMainDocument::GetWorkCount() { - wxInt32 iCount = -1; +int CMainDocument::GetWorkCount() { + int iCount = -1; CachedStateUpdate(); CachedResultsStatusUpdate(); @@ -1006,7 +1006,7 @@ wxInt32 CMainDocument::GetWorkCount() { } -wxInt32 CMainDocument::GetWorkProjectName(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetWorkProjectName(int iIndex, wxString& strBuffer) { RESULT* pResult = NULL; RESULT* pStateResult = NULL; PROJECT* pProject = NULL; @@ -1035,7 +1035,7 @@ wxInt32 CMainDocument::GetWorkProjectName(wxInt32 iIndex, wxString& strBuffer) { } -wxInt32 CMainDocument::GetWorkProjectURL(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetWorkProjectURL(int iIndex, wxString& strBuffer) { RESULT* pResult = NULL; try { @@ -1053,7 +1053,7 @@ wxInt32 CMainDocument::GetWorkProjectURL(wxInt32 iIndex, wxString& strBuffer) { } -wxInt32 CMainDocument::GetWorkApplicationName(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetWorkApplicationName(int iIndex, wxString& strBuffer) { RESULT* pResult = NULL; RESULT* pStateResult = NULL; WORKUNIT* pWorkunit = NULL; @@ -1086,7 +1086,7 @@ wxInt32 CMainDocument::GetWorkApplicationName(wxInt32 iIndex, wxString& strBuffe } -wxInt32 CMainDocument::GetWorkApplicationVersion(wxInt32 iIndex, wxInt32& iBuffer) { +int CMainDocument::GetWorkApplicationVersion(int iIndex, int& iBuffer) { RESULT* pResult = NULL; RESULT* pStateResult = NULL; WORKUNIT* pWorkunit = NULL; @@ -1119,7 +1119,7 @@ wxInt32 CMainDocument::GetWorkApplicationVersion(wxInt32 iIndex, wxInt32& iBuffe } -wxInt32 CMainDocument::GetWorkName(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetWorkName(int iIndex, wxString& strBuffer) { RESULT* pResult = NULL; try { @@ -1137,7 +1137,7 @@ wxInt32 CMainDocument::GetWorkName(wxInt32 iIndex, wxString& strBuffer) { } -wxInt32 CMainDocument::GetWorkCurrentCPUTime(wxInt32 iIndex, float& fBuffer) { +int CMainDocument::GetWorkCurrentCPUTime(int iIndex, float& fBuffer) { RESULT* pResult = NULL; try { @@ -1155,7 +1155,7 @@ wxInt32 CMainDocument::GetWorkCurrentCPUTime(wxInt32 iIndex, float& fBuffer) { } -wxInt32 CMainDocument::GetWorkEstimatedCPUTime(wxInt32 iIndex, float& fBuffer) { +int CMainDocument::GetWorkEstimatedCPUTime(int iIndex, float& fBuffer) { RESULT* pResult = NULL; try { @@ -1173,7 +1173,7 @@ wxInt32 CMainDocument::GetWorkEstimatedCPUTime(wxInt32 iIndex, float& fBuffer) { } -wxInt32 CMainDocument::GetWorkFinalCPUTime(wxInt32 iIndex, float& fBuffer) { +int CMainDocument::GetWorkFinalCPUTime(int iIndex, float& fBuffer) { RESULT* pResult = NULL; try { @@ -1191,7 +1191,7 @@ wxInt32 CMainDocument::GetWorkFinalCPUTime(wxInt32 iIndex, float& fBuffer) { } -wxInt32 CMainDocument::GetWorkFractionDone(wxInt32 iIndex, float& fBuffer) { +int CMainDocument::GetWorkFractionDone(int iIndex, float& fBuffer) { RESULT* pResult = NULL; try { @@ -1209,7 +1209,7 @@ wxInt32 CMainDocument::GetWorkFractionDone(wxInt32 iIndex, float& fBuffer) { } -wxInt32 CMainDocument::GetWorkReportDeadline(wxInt32 iIndex, wxInt32& iBuffer) { +int CMainDocument::GetWorkReportDeadline(int iIndex, int& iBuffer) { RESULT* pResult = NULL; try { @@ -1227,8 +1227,8 @@ wxInt32 CMainDocument::GetWorkReportDeadline(wxInt32 iIndex, wxInt32& iBuffer) { } -wxInt32 CMainDocument::GetWorkState(wxInt32 iIndex) { - wxInt32 iBuffer = 0; +int CMainDocument::GetWorkState(int iIndex) { + int iBuffer = 0; RESULT* pResult = NULL; try { @@ -1246,8 +1246,8 @@ wxInt32 CMainDocument::GetWorkState(wxInt32 iIndex) { } -wxInt32 CMainDocument::GetWorkSchedulerState(wxInt32 iIndex) { - wxInt32 iBuffer = 0; +int CMainDocument::GetWorkSchedulerState(int iIndex) { + int iBuffer = 0; RESULT* pResult = NULL; try { @@ -1265,7 +1265,7 @@ wxInt32 CMainDocument::GetWorkSchedulerState(wxInt32 iIndex) { } -bool CMainDocument::IsWorkAborted(wxInt32 iIndex) { +bool CMainDocument::IsWorkAborted(int iIndex) { RESULT* pResult = NULL; bool bRetVal = false; @@ -1284,7 +1284,7 @@ bool CMainDocument::IsWorkAborted(wxInt32 iIndex) { } -bool CMainDocument::IsWorkAcknowledged(wxInt32 iIndex) { +bool CMainDocument::IsWorkAcknowledged(int iIndex) { RESULT* pResult = NULL; bool bRetVal = false; @@ -1303,7 +1303,7 @@ bool CMainDocument::IsWorkAcknowledged(wxInt32 iIndex) { } -bool CMainDocument::IsWorkActive(wxInt32 iIndex) { +bool CMainDocument::IsWorkActive(int iIndex) { RESULT* pResult = NULL; bool bRetVal = false; @@ -1322,7 +1322,7 @@ bool CMainDocument::IsWorkActive(wxInt32 iIndex) { } -bool CMainDocument::IsWorkReadyToReport(wxInt32 iIndex) { +bool CMainDocument::IsWorkReadyToReport(int iIndex) { RESULT* pResult = NULL; bool bRetVal = false; @@ -1341,7 +1341,7 @@ bool CMainDocument::IsWorkReadyToReport(wxInt32 iIndex) { } -bool CMainDocument::IsWorkSuspended(wxInt32 iIndex) { +bool CMainDocument::IsWorkSuspended(int iIndex) { RESULT* pResult = NULL; bool bRetVal = false; @@ -1360,7 +1360,7 @@ bool CMainDocument::IsWorkSuspended(wxInt32 iIndex) { } -bool CMainDocument::IsWorkGraphicsSupported(wxInt32 iIndex) { +bool CMainDocument::IsWorkGraphicsSupported(int iIndex) { RESULT* pResult = NULL; bool bRetVal = false; @@ -1379,10 +1379,10 @@ bool CMainDocument::IsWorkGraphicsSupported(wxInt32 iIndex) { } -wxInt32 CMainDocument::WorkSuspend(wxInt32 iIndex) { +int CMainDocument::WorkSuspend(int iIndex) { RESULT* pResult = NULL; RESULT* pStateResult = NULL; - wxInt32 iRetVal = 0; + int iRetVal = 0; try { if (!results.results.empty()) @@ -1409,10 +1409,10 @@ wxInt32 CMainDocument::WorkSuspend(wxInt32 iIndex) { } -wxInt32 CMainDocument::WorkResume(wxInt32 iIndex) { +int CMainDocument::WorkResume(int iIndex) { RESULT* pResult = NULL; RESULT* pStateResult = NULL; - wxInt32 iRetVal = 0; + int iRetVal = 0; try { if (!results.results.empty()) @@ -1439,10 +1439,10 @@ wxInt32 CMainDocument::WorkResume(wxInt32 iIndex) { } -wxInt32 CMainDocument::WorkShowGraphics(wxInt32 iIndex, bool bFullScreen, +int CMainDocument::WorkShowGraphics(int iIndex, bool bFullScreen, std::string WindowStation, std::string Desktop, std::string Display) { RESULT* pResult = NULL; - wxInt32 iRetVal = 0; + int iRetVal = 0; try { if (!results.results.empty()) @@ -1461,17 +1461,17 @@ wxInt32 CMainDocument::WorkShowGraphics(wxInt32 iIndex, bool bFullScreen, iRetVal = rpc.show_graphics( pResult->project_url.c_str(), pResult->name.c_str(), bFullScreen, di - ); + ); } return iRetVal; } -wxInt32 CMainDocument::WorkAbort(wxInt32 iIndex) { +int CMainDocument::WorkAbort(int iIndex) { RESULT* pResult = NULL; RESULT* pStateResult = NULL; - wxInt32 iRetVal = 0; + int iRetVal = 0; try { if (!results.results.empty()) @@ -1498,10 +1498,10 @@ wxInt32 CMainDocument::WorkAbort(wxInt32 iIndex) { } -wxInt32 CMainDocument::CachedMessageUpdate() { - wxInt32 iRetVal = 0; +int CMainDocument::CachedMessageUpdate() { + int iRetVal = 0; - if ( IsConnected() ) { + if (IsConnected()) { iRetVal = rpc.get_messages(m_iMessageSequenceNumber, messages); if (iRetVal) { wxLogTrace("CMainDocument::CachedMessageUpdate - Get Messages Failed '%d'", iRetVal); @@ -1516,8 +1516,8 @@ wxInt32 CMainDocument::CachedMessageUpdate() { } -wxInt32 CMainDocument::GetMessageCount() { - wxInt32 iCount = -1; +int CMainDocument::GetMessageCount() { + int iCount = -1; CachedStateUpdate(); CachedMessageUpdate(); @@ -1529,7 +1529,7 @@ wxInt32 CMainDocument::GetMessageCount() { } -wxInt32 CMainDocument::GetMessageProjectName(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetMessageProjectName(int iIndex, wxString& strBuffer) { MESSAGE* pMessage = NULL; try { @@ -1547,7 +1547,7 @@ wxInt32 CMainDocument::GetMessageProjectName(wxInt32 iIndex, wxString& strBuffer } -wxInt32 CMainDocument::GetMessageTime(wxInt32 iIndex, wxDateTime& dtBuffer) { +int CMainDocument::GetMessageTime(int iIndex, wxDateTime& dtBuffer) { MESSAGE* pMessage = NULL; try { @@ -1567,7 +1567,7 @@ wxInt32 CMainDocument::GetMessageTime(wxInt32 iIndex, wxDateTime& dtBuffer) { } -wxInt32 CMainDocument::GetMessagePriority(wxInt32 iIndex, wxInt32& iBuffer) { +int CMainDocument::GetMessagePriority(int iIndex, int& iBuffer) { MESSAGE* pMessage = NULL; try { @@ -1585,7 +1585,7 @@ wxInt32 CMainDocument::GetMessagePriority(wxInt32 iIndex, wxInt32& iBuffer) { } -wxInt32 CMainDocument::GetMessageMessage(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetMessageMessage(int iIndex, wxString& strBuffer) { MESSAGE* pMessage = NULL; try { @@ -1603,16 +1603,16 @@ wxInt32 CMainDocument::GetMessageMessage(wxInt32 iIndex, wxString& strBuffer) { } -wxInt32 CMainDocument::ResetMessageState() { +int CMainDocument::ResetMessageState() { messages.clear(); m_iMessageSequenceNumber = 0; return 0; } -wxInt32 CMainDocument::CachedFileTransfersUpdate() { - wxInt32 iRetVal = 0; +int CMainDocument::CachedFileTransfersUpdate() { + int iRetVal = 0; - if ( IsConnected() ) { + if (IsConnected()) { iRetVal = rpc.get_file_transfers(ft); if (iRetVal) { wxLogTrace("CMainDocument::CachedFileTransfersUpdate - Get File Transfers Failed '%d'", iRetVal); @@ -1624,8 +1624,8 @@ wxInt32 CMainDocument::CachedFileTransfersUpdate() { } -wxInt32 CMainDocument::GetTransferCount() { - wxInt32 iCount = 0; +int CMainDocument::GetTransferCount() { + int iCount = 0; CachedStateUpdate(); CachedFileTransfersUpdate(); @@ -1637,7 +1637,7 @@ wxInt32 CMainDocument::GetTransferCount() { } -wxInt32 CMainDocument::GetTransferProjectName(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetTransferProjectName(int iIndex, wxString& strBuffer) { FILE_TRANSFER* pFT = NULL; try { @@ -1655,7 +1655,7 @@ wxInt32 CMainDocument::GetTransferProjectName(wxInt32 iIndex, wxString& strBuffe } -wxInt32 CMainDocument::GetTransferFileName(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetTransferFileName(int iIndex, wxString& strBuffer) { FILE_TRANSFER* pFT = NULL; try { @@ -1673,7 +1673,7 @@ wxInt32 CMainDocument::GetTransferFileName(wxInt32 iIndex, wxString& strBuffer) } -wxInt32 CMainDocument::GetTransferFileSize(wxInt32 iIndex, float& fBuffer) { +int CMainDocument::GetTransferFileSize(int iIndex, float& fBuffer) { FILE_TRANSFER* pFT = NULL; try { @@ -1691,7 +1691,7 @@ wxInt32 CMainDocument::GetTransferFileSize(wxInt32 iIndex, float& fBuffer) { } -wxInt32 CMainDocument::GetTransferBytesXfered(wxInt32 iIndex, float& fBuffer) +int CMainDocument::GetTransferBytesXfered(int iIndex, float& fBuffer) { FILE_TRANSFER* pFT = NULL; @@ -1710,7 +1710,7 @@ wxInt32 CMainDocument::GetTransferBytesXfered(wxInt32 iIndex, float& fBuffer) } -wxInt32 CMainDocument::GetTransferSpeed(wxInt32 iIndex, float& fBuffer) { +int CMainDocument::GetTransferSpeed(int iIndex, float& fBuffer) { FILE_TRANSFER* pFT = NULL; try { @@ -1728,7 +1728,7 @@ wxInt32 CMainDocument::GetTransferSpeed(wxInt32 iIndex, float& fBuffer) { } -wxInt32 CMainDocument::GetTransferTime(wxInt32 iIndex, float& fBuffer) { +int CMainDocument::GetTransferTime(int iIndex, float& fBuffer) { FILE_TRANSFER* pFT = NULL; try { @@ -1746,7 +1746,7 @@ wxInt32 CMainDocument::GetTransferTime(wxInt32 iIndex, float& fBuffer) { } -wxInt32 CMainDocument::GetTransferNextRequestTime(wxInt32 iIndex, wxInt32& iBuffer) { +int CMainDocument::GetTransferNextRequestTime(int iIndex, int& iBuffer) { FILE_TRANSFER* pFT = NULL; try { @@ -1764,7 +1764,7 @@ wxInt32 CMainDocument::GetTransferNextRequestTime(wxInt32 iIndex, wxInt32& iBuff } -wxInt32 CMainDocument::GetTransferStatus(wxInt32 iIndex, wxInt32& iBuffer) { +int CMainDocument::GetTransferStatus(int iIndex, int& iBuffer) { FILE_TRANSFER* pFT = NULL; try { @@ -1782,7 +1782,7 @@ wxInt32 CMainDocument::GetTransferStatus(wxInt32 iIndex, wxInt32& iBuffer) { } -bool CMainDocument::IsTransferActive(wxInt32 iIndex) { +bool CMainDocument::IsTransferActive(int iIndex) { FILE_TRANSFER* pFT = NULL; bool bRetVal = false; @@ -1800,7 +1800,7 @@ bool CMainDocument::IsTransferActive(wxInt32 iIndex) { return bRetVal; } -bool CMainDocument::IsTransferGeneratedLocally(wxInt32 iIndex) { +bool CMainDocument::IsTransferGeneratedLocally(int iIndex) { FILE_TRANSFER* pFT = NULL; bool bRetVal = false; @@ -1819,9 +1819,9 @@ bool CMainDocument::IsTransferGeneratedLocally(wxInt32 iIndex) { } -wxInt32 CMainDocument::TransferRetryNow(wxInt32 iIndex) { +int CMainDocument::TransferRetryNow(int iIndex) { FILE_TRANSFER* pFT = NULL; - wxInt32 iRetVal = 0; + int iRetVal = 0; try { if (!ft.file_transfers.empty()) @@ -1838,9 +1838,9 @@ wxInt32 CMainDocument::TransferRetryNow(wxInt32 iIndex) { } -wxInt32 CMainDocument::TransferAbort(wxInt32 iIndex) { +int CMainDocument::TransferAbort(int iIndex) { FILE_TRANSFER* pFT = NULL; - wxInt32 iRetVal = 0; + int iRetVal = 0; try { if (!ft.file_transfers.empty()) @@ -1857,10 +1857,10 @@ wxInt32 CMainDocument::TransferAbort(wxInt32 iIndex) { } -wxInt32 CMainDocument::CachedResourceStatusUpdate() { - wxInt32 iRetVal = 0; +int CMainDocument::CachedResourceStatusUpdate() { + int iRetVal = 0; - if ( IsConnected() ) { + if (IsConnected()) { iRetVal = rpc.get_disk_usage(resource_status); if (iRetVal) { wxLogTrace("CMainDocument::CachedResourceStatusUpdate - Get Disk Usage Failed '%d'", iRetVal); @@ -1872,8 +1872,8 @@ wxInt32 CMainDocument::CachedResourceStatusUpdate() { } -wxInt32 CMainDocument::GetResourceCount() { - wxInt32 iCount = -1; +int CMainDocument::GetResourceCount() { + int iCount = -1; CachedStateUpdate(); CachedResourceStatusUpdate(); @@ -1885,7 +1885,7 @@ wxInt32 CMainDocument::GetResourceCount() { } -wxInt32 CMainDocument::GetResourceProjectName(wxInt32 iIndex, wxString& strBuffer) { +int CMainDocument::GetResourceProjectName(int iIndex, wxString& strBuffer) { PROJECT* pProject = NULL; PROJECT* pStateProject = NULL; @@ -1911,7 +1911,7 @@ wxInt32 CMainDocument::GetResourceProjectName(wxInt32 iIndex, wxString& strBuffe } -wxInt32 CMainDocument::GetResourceDiskspace(wxInt32 iIndex, float& fBuffer) { +int CMainDocument::GetResourceDiskspace(int iIndex, float& fBuffer) { PROJECT* pProject = NULL; try { @@ -1928,11 +1928,11 @@ wxInt32 CMainDocument::GetResourceDiskspace(wxInt32 iIndex, float& fBuffer) { return 0; } -wxInt32 CMainDocument::CachedStatisticsStatusUpdate() { - wxInt32 iRetVal = 0; +int CMainDocument::CachedStatisticsStatusUpdate() { + int iRetVal = 0; wxString strEmpty = wxEmptyString; - if ( IsConnected() ) { + if (IsConnected()) { iRetVal = rpc.get_statistics(statistics_status); if (iRetVal) { wxLogTrace("CMainDocument::CachedStatisticsStatusUpdate - Get Statistics Failed '%d'", iRetVal); @@ -1944,8 +1944,8 @@ wxInt32 CMainDocument::CachedStatisticsStatusUpdate() { } -wxInt32 CMainDocument::GetStatisticsCount() { - wxInt32 iCount = -1; +int CMainDocument::GetStatisticsCount() { + int iCount = -1; CachedStateUpdate(); CachedStatisticsStatusUpdate(); @@ -1957,7 +1957,7 @@ wxInt32 CMainDocument::GetStatisticsCount() { } -wxInt32 CMainDocument::GetStatisticsProjectName(wxInt32 iIndex, wxString& strBuffer) +int CMainDocument::GetStatisticsProjectName(int iIndex, wxString& strBuffer) { PROJECT* pProject = NULL; PROJECT* pStateProject = NULL; @@ -1982,8 +1982,8 @@ wxInt32 CMainDocument::GetStatisticsProjectName(wxInt32 iIndex, wxString& strBuf return 0; } -wxInt32 CMainDocument::GetProxyConfiguration() { - wxInt32 iRetVal = 0; +int CMainDocument::GetProxyConfiguration() { + int iRetVal = 0; wxString strEmpty = wxEmptyString; iRetVal = rpc.get_proxy_settings(proxy_info); @@ -1995,74 +1995,74 @@ wxInt32 CMainDocument::GetProxyConfiguration() { } -wxInt32 CMainDocument::GetProxyHTTPProxyEnabled(bool& bEnabled) { +int CMainDocument::GetProxyHTTPProxyEnabled(bool& bEnabled) { bEnabled = proxy_info.use_http_proxy; return 0; } -wxInt32 CMainDocument::GetProxyHTTPServerName(wxString& strServerName) { +int CMainDocument::GetProxyHTTPServerName(wxString& strServerName) { strServerName.Clear(); strServerName = proxy_info.http_server_name.c_str(); return 0; } -wxInt32 CMainDocument::GetProxyHTTPServerPort(wxInt32& iPortNumber) { +int CMainDocument::GetProxyHTTPServerPort(int& iPortNumber) { iPortNumber = proxy_info.http_server_port; return 0; } -wxInt32 CMainDocument::GetProxyHTTPUserName(wxString& strUserName) { +int CMainDocument::GetProxyHTTPUserName(wxString& strUserName) { strUserName.Clear(); strUserName = proxy_info.http_user_name.c_str(); return 0; } -wxInt32 CMainDocument::GetProxyHTTPPassword(wxString& strPassword) { +int CMainDocument::GetProxyHTTPPassword(wxString& strPassword) { strPassword.Clear(); strPassword = proxy_info.http_user_passwd.c_str(); return 0; } -wxInt32 CMainDocument::GetProxySOCKSProxyEnabled(bool& bEnabled) { +int CMainDocument::GetProxySOCKSProxyEnabled(bool& bEnabled) { bEnabled = proxy_info.use_socks_proxy; return 0; } -wxInt32 CMainDocument::GetProxySOCKSServerName(wxString& strServerName) { +int CMainDocument::GetProxySOCKSServerName(wxString& strServerName) { strServerName.Clear(); strServerName = proxy_info.socks_server_name.c_str(); return 0; } -wxInt32 CMainDocument::GetProxySOCKSServerPort(wxInt32& iPortNumber) { +int CMainDocument::GetProxySOCKSServerPort(int& iPortNumber) { iPortNumber = proxy_info.socks_server_port; return 0; } -wxInt32 CMainDocument::GetProxySOCKSUserName(wxString& strUserName) { +int CMainDocument::GetProxySOCKSUserName(wxString& strUserName) { strUserName.Clear(); strUserName = proxy_info.socks5_user_name.c_str(); return 0; } -wxInt32 CMainDocument::GetProxySOCKSPassword(wxString& strPassword) { +int CMainDocument::GetProxySOCKSPassword(wxString& strPassword) { strPassword.Clear(); strPassword = proxy_info.socks5_user_passwd.c_str(); return 0; } -wxInt32 CMainDocument::SetProxyConfiguration() { - wxInt32 iRetVal = 0; +int CMainDocument::SetProxyConfiguration() { + int iRetVal = 0; if (!proxy_info.http_user_name.empty() || !proxy_info.http_user_passwd.empty()) proxy_info.use_http_authentication = true; @@ -2080,74 +2080,74 @@ wxInt32 CMainDocument::SetProxyConfiguration() { } -wxInt32 CMainDocument::SetProxyHTTPProxyEnabled(const bool bEnabled) { +int CMainDocument::SetProxyHTTPProxyEnabled(const bool bEnabled) { proxy_info.use_http_proxy = bEnabled; return 0; } -wxInt32 CMainDocument::SetProxyHTTPServerName(const wxString& strServerName) { +int CMainDocument::SetProxyHTTPServerName(const wxString& strServerName) { proxy_info.http_server_name = strServerName.c_str(); return 0; } -wxInt32 CMainDocument::SetProxyHTTPServerPort(const wxInt32 iPortNumber) { +int CMainDocument::SetProxyHTTPServerPort(const int iPortNumber) { proxy_info.http_server_port = iPortNumber; return 0; } -wxInt32 CMainDocument::SetProxyHTTPUserName(const wxString& strUserName) { +int CMainDocument::SetProxyHTTPUserName(const wxString& strUserName) { proxy_info.http_user_name = strUserName.c_str(); return 0; } -wxInt32 CMainDocument::SetProxyHTTPPassword(const wxString& strPassword) { +int CMainDocument::SetProxyHTTPPassword(const wxString& strPassword) { proxy_info.http_user_passwd = strPassword.c_str(); return 0; } -wxInt32 CMainDocument::SetProxySOCKSProxyEnabled(const bool bEnabled) { +int CMainDocument::SetProxySOCKSProxyEnabled(const bool bEnabled) { proxy_info.use_socks_proxy = bEnabled; return 0; } -wxInt32 CMainDocument::SetProxySOCKSServerName(const wxString& strServerName) { +int CMainDocument::SetProxySOCKSServerName(const wxString& strServerName) { proxy_info.socks_server_name = strServerName.c_str(); return 0; } -wxInt32 CMainDocument::SetProxySOCKSServerPort(const wxInt32 iPortNumber) { +int CMainDocument::SetProxySOCKSServerPort(const int iPortNumber) { proxy_info.socks_server_port = iPortNumber; return 0; } -wxInt32 CMainDocument::SetProxySOCKSUserName(const wxString& strUserName) { +int CMainDocument::SetProxySOCKSUserName(const wxString& strUserName) { proxy_info.socks5_user_name = strUserName.c_str(); return 0; } -wxInt32 CMainDocument::SetProxySOCKSPassword(const wxString& strPassword) { +int CMainDocument::SetProxySOCKSPassword(const wxString& strPassword) { proxy_info.socks5_user_passwd = strPassword.c_str(); return 0; } -wxInt32 CMainDocument::GetAccountManagerName(wxString& strName) { +int CMainDocument::GetAccountManagerName(wxString& strName) { strName.Clear(); strName = acct_mgr.acct_mgr.name.c_str(); return 0; } -wxInt32 CMainDocument::InitializeAccountManagerLogin(const wxString& strLogin, const wxString& strPassword) { +int CMainDocument::InitializeAccountManagerLogin(const wxString& strLogin, const wxString& strPassword) { acct_mgr.acct_mgr_login_initialized = true; acct_mgr.acct_mgr_login.login = strLogin.c_str(); acct_mgr.acct_mgr_login.password = strPassword.c_str(); @@ -2155,8 +2155,8 @@ wxInt32 CMainDocument::InitializeAccountManagerLogin(const wxString& strLogin, c } -wxInt32 CMainDocument::UpdateAccountManagerAccounts() { - wxInt32 iRetVal = 0; +int CMainDocument::UpdateAccountManagerAccounts() { + int iRetVal = 0; iRetVal = rpc.acct_mgr_rpc( acct_mgr.acct_mgr.url.c_str(), diff --git a/clientgui/MainFrame.cpp b/clientgui/MainFrame.cpp index ff7e9169c5..cb0a3ae92d 100644 --- a/clientgui/MainFrame.cpp +++ b/clientgui/MainFrame.cpp @@ -67,7 +67,7 @@ CStatusBar::CStatusBar(wxWindow *parent) : { wxLogTrace(wxT("Function Start/End"), wxT("CStatusBar::CStatusBar - Function Begin")); - const wxInt32 widths[] = {-1, 200, 20}; + const int widths[] = {-1, 200, 20}; SetFieldsCount(WXSIZEOF(widths), widths); m_pbmpConnected = new wxStaticBitmap(this, -1, wxIcon(connect_xpm)); @@ -229,21 +229,20 @@ CMainFrame::CMainFrame(wxString strTitle) : } -CMainFrame::~CMainFrame() -{ +CMainFrame::~CMainFrame() { wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::~CMainFrame - Function Begin")); - CMainDocument* pDoc = wxGetApp().GetDocument(); + CMainDocument* pDoc = wxGetApp().GetDocument(); - wxASSERT(NULL != pDoc); + wxASSERT(pDoc); wxASSERT(wxDynamicCast(pDoc, CMainDocument)); - wxASSERT(NULL != m_pRefreshStateTimer); - wxASSERT(NULL != m_pFrameRenderTimer); - wxASSERT(NULL != m_pFrameListPanelRenderTimer); - wxASSERT(NULL != m_pDocumentPollTimer); - wxASSERT(NULL != m_pMenubar); - wxASSERT(NULL != m_pNotebook); - wxASSERT(NULL != m_pStatusbar); + wxASSERT(m_pRefreshStateTimer); + wxASSERT(m_pFrameRenderTimer); + wxASSERT(m_pFrameListPanelRenderTimer); + wxASSERT(m_pDocumentPollTimer); + wxASSERT(m_pMenubar); + wxASSERT(m_pNotebook); + wxASSERT(m_pStatusbar); SaveState(); @@ -299,13 +298,13 @@ bool CMainFrame::CreateMenu() { ID_HIDE, _("Close"), _("Closes the main BOINC Manager window") - ); + ); #else menuFile->Append( ID_HIDE, _("&Hide"), _("Hides the main BOINC Manager window") - ); + ); #endif menuFile->AppendSeparator(); @@ -313,17 +312,17 @@ bool CMainFrame::CreateMenu() { ID_ACTIVITYRUNALWAYS, _("&Run always"), _("Does work regardless of preferences") - ); + ); menuFile->AppendRadioItem( ID_ACTIVITYRUNBASEDONPREPERENCES, _("Run based on &preferences"), _("Does work according to your preferences") - ); + ); menuFile->AppendRadioItem( ID_ACTIVITYSUSPEND, _("&Suspend"), _("Stops work regardless of preferences") - ); + ); menuFile->AppendSeparator(); @@ -331,7 +330,7 @@ bool CMainFrame::CreateMenu() { ID_NETWORKSUSPEND, _("&Disable BOINC Network Access"), _("Stops BOINC network activity") - ); + ); menuFile->AppendSeparator(); @@ -339,7 +338,7 @@ bool CMainFrame::CreateMenu() { ID_RUNBENCHMARKS, _("Run &Benchmarks"), _("Runs BOINC CPU benchmarks") - ); + ); menuFile->AppendSeparator(); @@ -347,7 +346,7 @@ bool CMainFrame::CreateMenu() { ID_SELECTCOMPUTER, _("Select Computer..."), _("Connect to another computer running BOINC") - ); + ); menuFile->AppendSeparator(); @@ -355,7 +354,7 @@ bool CMainFrame::CreateMenu() { wxID_EXIT, _("E&xit"), _("Exit the BOINC Manager") - ); + ); // Tools menu wxMenu *menuTools = new wxMenu; @@ -364,7 +363,7 @@ bool CMainFrame::CreateMenu() { ID_TOOLSUPDATEACCOUNTS, _("&Update Accounts"), _("Connect to your account manager website and update all of your accounts") - ); + ); menuTools->AppendSeparator(); } @@ -373,7 +372,7 @@ bool CMainFrame::CreateMenu() { ID_TOOLSOPTIONS, _("&Options"), _("Configure GUI options and proxy settings") - ); + ); // Help menu wxMenu *menuHelp = new wxMenu; @@ -381,22 +380,22 @@ bool CMainFrame::CreateMenu() { wxID_ABOUT, _("&About BOINC Manager..."), _("Show information about BOINC and BOINC Manager") - ); + ); // construct menu m_pMenubar = new wxMenuBar; m_pMenubar->Append( menuFile, _("&File") - ); + ); m_pMenubar->Append( menuTools, _("&Tools") - ); + ); m_pMenubar->Append( menuHelp, _("&Help") - ); + ); SetMenuBar(m_pMenubar); wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::CreateMenu - Function End")); @@ -450,7 +449,7 @@ bool CMainFrame::CreateNotebookPage(T pwndNewNotebookPage) { wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::CreateNotebookPage - Function Begin")); wxImageList* pImageList; - wxInt32 iImageIndex = 0; + int iImageIndex = 0; wxASSERT(NULL != pwndNewNotebookPage); wxASSERT(NULL != m_pNotebook); @@ -608,7 +607,7 @@ bool CMainFrame::SaveState() { pConfig->Write( strBuffer, m_aSelectedComputerMRU.Item(iIndex) - ); + ); } pConfig->SetPath(strPreviousLocation); @@ -652,7 +651,7 @@ bool CMainFrame::RestoreState() { // // Restore Frame State // - wxInt32 iCurrentPage; + int iCurrentPage; pConfig->SetPath(strBaseConfigLocation); @@ -795,7 +794,7 @@ void CMainFrame::OnNetworkSelection(wxCommandEvent& event) { wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnNetworkSelection - Function Begin")); CMainDocument* pDoc = wxGetApp().GetDocument(); - wxInt32 iCurrentNetworkMode = -1; + int iCurrentNetworkMode = -1; wxASSERT(NULL != pDoc); wxASSERT(wxDynamicCast(pDoc, CMainDocument)); @@ -912,7 +911,7 @@ void CMainFrame::OnToolsUpdateAccounts(wxCommandEvent& WXUNUSED(event)) CMainDocument* pDoc = wxGetApp().GetDocument(); CDlgAccountManager* pDlg = new CDlgAccountManager(this); - wxInt32 iAnswer = 0; + int iAnswer = 0; wxString strLogin = wxEmptyString; wxString strPassword = wxEmptyString; @@ -945,10 +944,10 @@ void CMainFrame::OnToolsOptions(wxCommandEvent& WXUNUSED(event)) { CMainDocument* pDoc = wxGetApp().GetDocument(); CDlgOptions* pDlg = new CDlgOptions(this); - wxInt32 iAnswer = 0; + int iAnswer = 0; bool bProxyInformationConfigured = false; bool bBuffer = false; - wxInt32 iBuffer = 0; + int iBuffer = 0; wxString strBuffer = wxEmptyString; wxASSERT(NULL != pDoc); @@ -1109,7 +1108,7 @@ void CMainFrame::OnConnect(CMainFrameEvent&) { CMainDocument* pDoc = wxGetApp().GetDocument(); CDlgAttachProject* pDlg = new CDlgAttachProject(this); - wxInt32 iAnswer = 0; + int iAnswer = 0; long lProjectCount = 0; wxASSERT(m_pNotebook); @@ -1256,8 +1255,8 @@ void CMainFrame::OnFrameRender(wxTimerEvent &event) { // Update the menu bar wxMenuBar* pMenuBar = GetMenuBar(); - wxInt32 iActivityMode = -1; - wxInt32 iNetworkMode = -1; + int iActivityMode = -1; + int iNetworkMode = -1; wxASSERT(NULL != pMenuBar); wxASSERT(wxDynamicCast(pMenuBar, wxMenuBar)); @@ -1373,7 +1372,7 @@ void CMainFrame::OnListPanelRender(wxTimerEvent&) { } -void CMainFrame::OnDocumentPoll( wxTimerEvent& event ) { +void CMainFrame::OnDocumentPoll(wxTimerEvent& event) { CMainDocument* pDoc = wxGetApp().GetDocument(); wxASSERT(pDoc); diff --git a/clientgui/Makefile.am b/clientgui/Makefile.am index 29e4ecd9ee..2c872cc8a0 100644 --- a/clientgui/Makefile.am +++ b/clientgui/Makefile.am @@ -29,17 +29,7 @@ boinc_gui_SOURCES = \ ViewResources.cpp \ ViewStatistics.cpp \ ViewTransfers.cpp \ - ViewWork.cpp \ - ../lib/acct_mgr_client.C \ - ../lib/diagnostics.C \ - ../lib/gui_rpc_client.C \ - ../lib/filesys.C \ - ../lib/mfile.C \ - ../lib/miofile.C \ - ../lib/parse.C \ - ../lib/util.C \ - ../lib/md5_file.C \ - ../lib/md5.c + ViewWork.cpp EXTRA_DIST = *.h \ res \ @@ -48,7 +38,7 @@ EXTRA_DIST = *.h \ boinc_gui_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CPPFLAGS) $(CLIENTGUIFLAGS) boinc_gui_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CXXFLAGS) $(CLIENTGUIFLAGS) -boinc_gui_LDADD = $(CLIENTGUILIBS) +boinc_gui_LDADD = $(CLIENTGUILIBS) -L ../lib -lboinc all-local: client_gui-bin client_gui-bin: @CLIENT_GUI_BIN_FILENAME@