[SCM] BOINC packaging branch, master, updated. debian/6.10.17+dfsg-3-347-g96da082
Steffen Moeller
moeller at debian.org
Tue Dec 6 21:45:09 UTC 2011
The following commit has been merged in the master branch:
commit 8c92f8c2f5cc23c80249fe852c405713da81bd98
Author: Steffen Moeller <moeller at debian.org>
Date: Fri Dec 2 03:22:54 2011 +0100
More patches most likely to be removed
diff --git a/debian/patches/AddSomeConstToMakeClearMemoryIsNotAllocated.patch b/debian/patches/AddSomeConstToMakeClearMemoryIsNotAllocated.patch
new file mode 100644
index 0000000..84a092b
--- /dev/null
+++ b/debian/patches/AddSomeConstToMakeClearMemoryIsNotAllocated.patch
@@ -0,0 +1,749 @@
+Index: boinc/clientgui/ProjectListCtrl.cpp
+===================================================================
+--- boinc.orig/clientgui/ProjectListCtrl.cpp 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ProjectListCtrl.cpp 2011-11-13 23:34:52.000000000 +0100
+@@ -60,7 +60,7 @@
+ #endif
+
+ // Gets the name of the specified object.
+-wxAccStatus CProjectListCtrlAccessible::GetName(int childId, wxString* name)
++wxAccStatus CProjectListCtrlAccessible::GetName(int childId, wxString* const name) const
+ {
+ if (childId == wxACC_SELF)
+ {
+@@ -80,7 +80,7 @@
+
+ // Can return either a child object, or an integer
+ // representing the child element, starting from 1.
+-wxAccStatus CProjectListCtrlAccessible::HitTest(const wxPoint& pt, int* childId, wxAccessible** /*childObject*/)
++wxAccStatus CProjectListCtrlAccessible::HitTest(const wxPoint& pt, int* childId, wxAccessible** const /*childObject*/)
+ {
+ CProjectListCtrl* pCtrl = wxDynamicCast(GetWindow(), CProjectListCtrl);
+ if (pCtrl)
+@@ -94,7 +94,7 @@
+
+
+ // Returns the rectangle for this object (id = 0) or a child element (id > 0).
+-wxAccStatus CProjectListCtrlAccessible::GetLocation(wxRect& rect, int elementId)
++wxAccStatus CProjectListCtrlAccessible::GetLocation(wxRect& rect, int elementId) const
+ {
+ CProjectListCtrl* pCtrl = wxDynamicCast(GetWindow(), CProjectListCtrl);
+ if (pCtrl && (0 == elementId))
+@@ -132,7 +132,7 @@
+
+
+ // Gets the number of children.
+-wxAccStatus CProjectListCtrlAccessible::GetChildCount(int* childCount)
++wxAccStatus CProjectListCtrlAccessible::GetChildCount(int* const childCount) const
+ {
+ CProjectListCtrl* pCtrl = wxDynamicCast(GetWindow(), CProjectListCtrl);
+ if (pCtrl)
+@@ -182,7 +182,7 @@
+
+
+ // Returns the description for this object or a child.
+-wxAccStatus CProjectListCtrlAccessible::GetDescription(int childId, wxString* description)
++wxAccStatus CProjectListCtrlAccessible::GetDescription(int childId, wxString* const description) const
+ {
+ CProjectListCtrl* pCtrl = wxDynamicCast(GetWindow(), CProjectListCtrl);
+ if (pCtrl && (childId != wxACC_SELF))
+@@ -275,7 +275,7 @@
+ // The retrieved string describes the action that is performed on an object,
+ // not what the object does as a result. For example, a toolbar button that prints
+ // a document has a default action of "Press" rather than "Prints the current document."
+-wxAccStatus CProjectListCtrlAccessible::GetDefaultAction(int childId, wxString* actionName)
++wxAccStatus CProjectListCtrlAccessible::GetDefaultAction(int childId, wxString* const actionName) const
+ {
+ CProjectListCtrl* pCtrl = wxDynamicCast(GetWindow(), CProjectListCtrl);
+ if (pCtrl && (childId != wxACC_SELF))
+@@ -289,7 +289,7 @@
+
+
+ // Returns a role constant.
+-wxAccStatus CProjectListCtrlAccessible::GetRole(int childId, wxAccRole* role)
++wxAccStatus CProjectListCtrlAccessible::GetRole(int childId, wxAccRole* const role) const
+ {
+ if (childId == wxACC_SELF)
+ {
+@@ -304,7 +304,7 @@
+
+
+ // Returns a role constant.
+-wxAccStatus CProjectListCtrlAccessible::GetState(int childId, long* state)
++wxAccStatus CProjectListCtrlAccessible::GetState(int childId, long* const state) const
+ {
+ if (childId == wxACC_SELF)
+ {
+@@ -575,14 +575,14 @@
+ */
+
+ bool CProjectListCtrl::Append(
+- wxString strURL,
+- wxString strTitle,
+- wxString strImage,
+- wxString strDescription,
+- bool bNvidiaGPUSupported,
+- bool bATIGPUSupported,
+- bool bMulticoreSupported,
+- bool bSupported
++ const wxString strURL,
++ const wxString strTitle,
++ const wxString strImage,
++ const wxString strDescription,
++ const bool bNvidiaGPUSupported,
++ const bool bATIGPUSupported,
++ const bool bMulticoreSupported,
++ const bool bSupported
+ )
+ {
+ CProjectListItem* pItem = new CProjectListItem();
+Index: boinc/clientgui/ProjectListCtrl.h
+===================================================================
+--- boinc.orig/clientgui/ProjectListCtrl.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ProjectListCtrl.h 2011-11-13 23:24:19.000000000 +0100
+@@ -33,34 +33,34 @@
+ public:
+
+ wxString GetURL() const { return m_strURL ; }
+- void SetURL(wxString value) { m_strURL = value ; }
++ void SetURL(const wxString value) { m_strURL = value ; }
+
+ wxString GetTitle() const { return m_strTitle ; }
+- void SetTitle(wxString value) { m_strTitle = value ; }
++ void SetTitle(const wxString value) { m_strTitle = value ; }
+
+ wxString GetImage() const { return m_strImage ; }
+- void SetImage(wxString value) { m_strImage = value ; }
++ void SetImage(const wxString value) { m_strImage = value ; }
+
+ wxString GetOrganization() const { return m_strOrganization ; }
+- void SetOrganization(wxString value) { m_strOrganization = value ; }
++ void SetOrganization(const wxString value) { m_strOrganization = value ; }
+
+ wxString GetDescription() const { return m_strDescription ; }
+- void SetDescription(wxString value) { m_strDescription = value ; }
++ void SetDescription(const wxString value) { m_strDescription = value ; }
+
+ wxString GetCategory() const { return m_strCategory ; }
+- void SetCategory(wxString value) { m_strCategory = value ; }
++ void SetCategory(const wxString value) { m_strCategory = value ; }
+
+ bool IsNvidiaGPUSupported() const { return m_bNvidiaGPUSupported ; }
+- void SetNvidiaGPUSupported(bool value) { m_bNvidiaGPUSupported = value ; }
++ void SetNvidiaGPUSupported(const bool value) { m_bNvidiaGPUSupported = value ; }
+
+ bool IsATIGPUSupported() const { return m_bATIGPUSupported ; }
+- void SetATIGPUSupported(bool value) { m_bATIGPUSupported = value ; }
++ void SetATIGPUSupported(const bool value) { m_bATIGPUSupported = value ; }
+
+ bool IsMulticoreSupported() const { return m_bMulticoreSupported ; }
+- void SetMulticoreSupported(bool value) { m_bMulticoreSupported = value ; }
++ void SetMulticoreSupported(const bool value) { m_bMulticoreSupported = value ; }
+
+ bool IsPlatformSupported() const { return m_bSupported ; }
+- void SetPlatformSupported(bool value) { m_bSupported = value ; }
++ void SetPlatformSupported(const bool value) { m_bSupported = value ; }
+
+ private:
+ wxString m_strURL;
+@@ -100,19 +100,19 @@
+ CProjectListCtrlAccessible(wxWindow* win): wxWindowAccessible(win) {}
+ #endif
+
+- virtual wxAccStatus GetName(int childId, wxString* name);
+- virtual wxAccStatus HitTest(const wxPoint& pt, int* childId, wxAccessible** childObject);
+- virtual wxAccStatus GetLocation(wxRect& rect, int elementId);
+- virtual wxAccStatus GetChildCount(int* childCount);
++ virtual wxAccStatus GetName(int childId, wxString* const name) const;
++ virtual wxAccStatus HitTest(const wxPoint& pt, int* childId, wxAccessible** const childObject);
++ virtual wxAccStatus GetLocation(wxRect& rect, int elementId) const;
++ virtual wxAccStatus GetChildCount(int* const childCount) const;
+ virtual wxAccStatus DoDefaultAction(int childId);
+- virtual wxAccStatus GetDescription(int childId, wxString* description);
++ virtual wxAccStatus GetDescription(int childId, wxString* const description);
+ #ifndef __WXMAC__
+- virtual wxAccStatus Navigate(wxNavDir navDir, int fromId, int* toId, wxAccessible** toObject);
+- virtual wxAccStatus GetDefaultAction(int childId, wxString* actionName);
+- virtual wxAccStatus GetRole(int childId, wxAccRole* role);
+- virtual wxAccStatus GetState(int childId, long* state);
+- virtual wxAccStatus Select(int childId, wxAccSelectionFlags selectFlags);
+- virtual wxAccStatus GetSelections(wxVariant* selections);
++ virtual wxAccStatus Navigate(wxNavDir navDir, int fromId, int* toId, wxAccessible** const toObject);
++ virtual wxAccStatus GetDefaultAction(int childId, wxString* const actionName);
++ virtual wxAccStatus GetRole(int childId, wxAccRole* const role) const;
++ virtual wxAccStatus GetState(int childId, long* const state) const;
++ virtual wxAccStatus Select(int childId, wxAccSelectionFlags selectFlags) const;
++ virtual wxAccStatus GetSelections(wxVariant* const selections) const;
+ #endif
+
+ #ifdef __WXMAC__
+@@ -166,14 +166,14 @@
+
+ /// Methods
+ bool Append(
+- wxString strURL,
+- wxString strTitle,
+- wxString strImage,
+- wxString strDescription,
+- bool bNvidiaGPUSupported,
+- bool bATIGPUSupported,
+- bool bMulticoreSupported,
+- bool bSupported
++ const wxString strURL,
++ const wxString strTitle,
++ const wxString strImage,
++ const wxString strDescription,
++ const bool bNvidiaGPUSupported,
++ const bool bATIGPUSupported,
++ const bool bMulticoreSupported,
++ const bool bSupported
+ );
+
+ CProjectListItem* GetItem(
+@@ -204,9 +204,9 @@
+ m_bSupported = bSupported;
+ }
+
+- wxString GetName() { return m_strName; };
+- wxString GetURL() { return m_strURL; };
+- bool IsSupported() { return m_bSupported; };
++ wxString GetName() const { return m_strName; };
++ wxString GetURL() const { return m_strURL; };
++ bool IsSupported() const { return m_bSupported; };
+
+ virtual wxNotifyEvent* Clone() const { return new ProjectListCtrlEvent(*this); }
+
+Index: boinc/clientgui/DlgSelectComputer.cpp
+===================================================================
+--- boinc.orig/clientgui/DlgSelectComputer.cpp 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/DlgSelectComputer.cpp 2011-11-13 23:45:15.000000000 +0100
+@@ -65,7 +65,7 @@
+ {
+ }
+
+-CDlgSelectComputer::CDlgSelectComputer( wxWindow* parent, bool required, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
++CDlgSelectComputer::CDlgSelectComputer( wxWindow* parent, const bool required, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
+ {
+ Create(parent, required, id, caption, pos, size, style);
+ }
+@@ -74,7 +74,7 @@
+ * CDlgSelectComputer creator
+ */
+
+-bool CDlgSelectComputer::Create( wxWindow* parent, bool required, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
++bool CDlgSelectComputer::Create( wxWindow* parent, const bool required, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
+ {
+ ////@begin CDlgSelectComputer member initialisation
+ m_ComputerNameCtrl = NULL;
+@@ -106,7 +106,7 @@
+ * Control creation for CDlgSelectComputer
+ */
+
+-void CDlgSelectComputer::CreateControls(bool required)
++void CDlgSelectComputer::CreateControls(const bool required)
+ {
+ ////@begin CDlgSelectComputer content construction
+ CDlgSelectComputer* itemDialog1 = this;
+Index: boinc/clientgui/DlgSelectComputer.h
+===================================================================
+--- boinc.orig/clientgui/DlgSelectComputer.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/DlgSelectComputer.h 2011-11-13 23:43:14.000000000 +0100
+@@ -75,13 +75,13 @@
+ public:
+ /// Constructors
+ CDlgSelectComputer( );
+- CDlgSelectComputer( wxWindow* parent, bool required = false, wxWindowID id = SYMBOL_CDLGSELECTCOMPUTER_IDNAME, const wxString& caption = SYMBOL_CDLGSELECTCOMPUTER_TITLE, const wxPoint& pos = SYMBOL_CDLGSELECTCOMPUTER_POSITION, const wxSize& size = SYMBOL_CDLGSELECTCOMPUTER_SIZE, long style = SYMBOL_CDLGSELECTCOMPUTER_STYLE );
++ CDlgSelectComputer( wxWindow* parent, const bool required = false, wxWindowID id = SYMBOL_CDLGSELECTCOMPUTER_IDNAME, const wxString& caption = SYMBOL_CDLGSELECTCOMPUTER_TITLE, const wxPoint& pos = SYMBOL_CDLGSELECTCOMPUTER_POSITION, const wxSize& size = SYMBOL_CDLGSELECTCOMPUTER_SIZE, long style = SYMBOL_CDLGSELECTCOMPUTER_STYLE );
+
+ /// Creation
+- bool Create( wxWindow* parent, bool required = false, wxWindowID id = SYMBOL_CDLGSELECTCOMPUTER_IDNAME, const wxString& caption = SYMBOL_CDLGSELECTCOMPUTER_TITLE, const wxPoint& pos = SYMBOL_CDLGSELECTCOMPUTER_POSITION, const wxSize& size = SYMBOL_CDLGSELECTCOMPUTER_SIZE, long style = SYMBOL_CDLGSELECTCOMPUTER_STYLE );
++ bool Create( wxWindow* parent, const bool required = false, wxWindowID id = SYMBOL_CDLGSELECTCOMPUTER_IDNAME, const wxString& caption = SYMBOL_CDLGSELECTCOMPUTER_TITLE, const wxPoint& pos = SYMBOL_CDLGSELECTCOMPUTER_POSITION, const wxSize& size = SYMBOL_CDLGSELECTCOMPUTER_SIZE, long style = SYMBOL_CDLGSELECTCOMPUTER_STYLE );
+
+ /// Creates the controls and sizers
+- void CreateControls(bool required);
++ void CreateControls(const bool required);
+
+ ////@begin CDlgSelectComputer event handler declarations
+
+@@ -93,10 +93,10 @@
+ ////@begin CDlgSelectComputer member function declarations
+
+ wxString GetComputerName() const { return m_strComputerName ; }
+- void SetComputerName(wxString value) { m_strComputerName = value ; }
++ void SetComputerName(const wxString value) { m_strComputerName = value ; }
+
+ wxString GetComputerPassword() const { return m_strComputerPassword ; }
+- void SetComputerPassword(wxString value) { m_strComputerPassword = value ; }
++ void SetComputerPassword(const wxString value) { m_strComputerPassword = value ; }
+
+ /// Retrieves bitmap resources
+ wxBitmap GetBitmapResource( const wxString& name );
+Index: boinc/clientgui/MainDocument.cpp
+===================================================================
+--- boinc.orig/clientgui/MainDocument.cpp 2011-11-13 23:58:43.000000000 +0100
++++ boinc/clientgui/MainDocument.cpp 2011-11-14 01:05:10.000000000 +0100
+@@ -92,7 +92,7 @@
+
+ using std::string;
+
+-CNetworkConnection::CNetworkConnection(CMainDocument* pDocument) :
++CNetworkConnection::CNetworkConnection(CMainDocument* const pDocument) :
+ wxObject() {
+ m_pDocument = pDocument;
+
+@@ -117,14 +117,19 @@
+ }
+
+
+-int CNetworkConnection::GetLocalPassword(wxString& strPassword){
++int CNetworkConnection::GetLocalPassword(wxString& strPassword) const {
+ char buf[256];
+ strcpy(buf, "");
+
+ FILE* f = fopen("gui_rpc_auth.cfg", "r");
+ if (!f) return errno;
+- fgets(buf, 256, f);
++ char *s = fgets(buf, 256, f);
+ fclose(f);
++ if ((char *) NULL == s) {
++ if (errno) return errno;
++ return EAGAIN;
++ }
++
+ int n = (int)strlen(buf);
+ if (n) {
+ n--;
+@@ -228,25 +233,25 @@
+ return 0;
+ }
+
+-int CNetworkConnection::GetConnectedComputerName(wxString& strMachine) {
++int CNetworkConnection::GetConnectedComputerName(wxString& strMachine) const {
+ strMachine = m_strConnectedComputerName;
+ return 0;
+ }
+
+
+-int CNetworkConnection::GetConnectedComputerVersion(wxString& strVersion) {
++int CNetworkConnection::GetConnectedComputerVersion(wxString& strVersion) const {
+ strVersion = m_strConnectedComputerVersion;
+ return 0;
+ }
+
+
+-int CNetworkConnection::GetConnectingComputerName(wxString& strMachine) {
++int CNetworkConnection::GetConnectingComputerName(wxString& strMachine) const {
+ strMachine = m_strNewComputerName;
+ return 0;
+ }
+
+
+-bool CNetworkConnection::IsComputerNameLocal(const wxString& strMachine) {
++bool CNetworkConnection::IsComputerNameLocal(const wxString& strMachine) const {
+ static wxString strHostName = wxEmptyString;
+ static wxString strFullHostName = wxEmptyString;
+
+@@ -336,7 +341,7 @@
+ }
+
+
+-void CNetworkConnection::SetStateSuccess(wxString& strComputer, wxString& strComputerPassword) {
++void CNetworkConnection::SetStateSuccess(const wxString& strComputer, const wxString& strComputerPassword) {
+ CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
+ if (pFrame && !m_bFrameShutdownDetected) {
+ wxASSERT(wxDynamicCast(pFrame, CBOINCBaseFrame));
+@@ -671,35 +676,35 @@
+ }
+
+
+-int CMainDocument::GetConnectedComputerName(wxString& strMachine) {
++int CMainDocument::GetConnectedComputerName(wxString& strMachine) const {
+ m_pNetworkConnection->GetConnectedComputerName(strMachine);
+ return 0;
+ }
+
+
+-int CMainDocument::GetConnectedComputerVersion(wxString& strVersion) {
++int CMainDocument::GetConnectedComputerVersion(wxString& strVersion) const {
+ m_pNetworkConnection->GetConnectedComputerVersion(strVersion);
+ return 0;
+ }
+
+
+-int CMainDocument::GetConnectingComputerName(wxString& strMachine) {
++int CMainDocument::GetConnectingComputerName(wxString& strMachine) const {
+ m_pNetworkConnection->GetConnectingComputerName(strMachine);
+ return 0;
+ }
+
+
+-bool CMainDocument::IsComputerNameLocal(const wxString strMachine) {
++bool CMainDocument::IsComputerNameLocal(const wxString strMachine) const {
+ return m_pNetworkConnection->IsComputerNameLocal(strMachine);
+ }
+
+
+-bool CMainDocument::IsConnected() {
++bool CMainDocument::IsConnected() const {
+ return m_pNetworkConnection->IsConnected();
+ }
+
+
+-bool CMainDocument::IsReconnecting() {
++bool CMainDocument::IsReconnecting() const {
+ return m_pNetworkConnection->IsReconnecting();
+ }
+
+@@ -1312,7 +1317,7 @@
+ }
+
+
+-int CMainDocument::GetProjectCount() {
++int CMainDocument::GetProjectCount() /* not const */ {
+ int iCount = -1;
+
+ CachedProjectStatusUpdate();
+@@ -1484,7 +1489,7 @@
+ return pResult;
+ }
+
+-int CMainDocument::GetWorkCount() {
++int CMainDocument::GetWorkCount() /* not const */ {
+ int iCount = -1;
+
+ CachedResultsStatusUpdate();
+@@ -1497,7 +1502,7 @@
+ }
+
+
+-int CMainDocument::WorkSuspend(char* url, char* name) {
++int CMainDocument::WorkSuspend(const char* const url, const char* const name) {
+ int iRetVal = 0;
+
+ RESULT* pStateResult = state.lookup_result(url, name);
+@@ -1511,7 +1516,7 @@
+ }
+
+
+-int CMainDocument::WorkResume(char* url, char* name) {
++int CMainDocument::WorkResume(const char* const url, const char* const name) {
+ int iRetVal = 0;
+
+ RESULT* pStateResult = state.lookup_result(url, name);
+@@ -1527,7 +1532,7 @@
+
+ // If the graphics application for the current task is already
+ // running, return a pointer to its RUNNING_GFX_APP struct.
+-RUNNING_GFX_APP* CMainDocument::GetRunningGraphicsApp(RESULT* result, int slot)
++RUNNING_GFX_APP* CMainDocument::GetRunningGraphicsApp(const RESULT* const result, int slot)
+ {
+ bool exited = false;
+ std::vector<RUNNING_GFX_APP>::iterator gfx_app_iter;
+@@ -1758,7 +1763,7 @@
+ }
+
+
+-int CMainDocument::WorkAbort(char* url, char* name) {
++int CMainDocument::WorkAbort(const char* const url, const char* const name) {
+ int iRetVal = 0;
+
+ RESULT* pStateResult = state.lookup_result(url, name);
+@@ -1884,7 +1889,7 @@
+ }
+
+
+-int CMainDocument::GetUnreadNoticeCount() {
++int CMainDocument::GetUnreadNoticeCount() const {
+ int iCount = 0;
+ if (!notices.notices.empty()) {
+ for (unsigned int i = 0; i < notices.notices.size(); i++) {
+@@ -2311,7 +2316,7 @@
+ }
+
+
+-int CMainDocument::GetSimpleProjectCount() {
++int CMainDocument::GetSimpleProjectCount() /* not const */ {
+ int iCount = -1;
+
+ CachedSimpleGUIUpdate();
+@@ -2324,7 +2329,7 @@
+ }
+
+
+-int CMainDocument::GetSimpleGUIWorkCount() {
++int CMainDocument::GetSimpleGUIWorkCount() /* not const */ {
+ int iCount = 0;
+ unsigned int i = 0;
+
+@@ -2357,7 +2362,7 @@
+ return _("unknown reason");
+ }
+
+-wxString result_description(RESULT* result, bool show_resources) {
++wxString result_description(const RESULT* const result, bool show_resources) {
+ CMainDocument* doc = wxGetApp().GetDocument();
+ PROJECT* project;
+ CC_STATUS status;
+Index: boinc/clientgui/MainDocument.h
+===================================================================
+--- boinc.orig/clientgui/MainDocument.h 2011-07-24 19:39:09.000000000 +0200
++++ boinc/clientgui/MainDocument.h 2011-11-14 01:21:54.000000000 +0100
+@@ -69,11 +69,11 @@
+ void ForceDisconnect() { m_bForceReconnect = false; m_bReconnectOnError = false; m_bConnectEvent = false; SetStateDisconnected(); };
+ void ForceReconnect() { m_bForceReconnect = true; SetStateDisconnected(); };
+ int FrameShutdownDetected();
+- int GetConnectedComputerName(wxString& strMachine);
+- int GetConnectedComputerVersion(wxString& strVersion);
+- int GetConnectingComputerName(wxString& strMachine);
+- bool IsComputerNameLocal(const wxString& strMachine);
+- int GetLocalPassword(wxString& strPassword);
++ int GetConnectedComputerName(wxString& strMachine) const;
++ int GetConnectedComputerVersion(wxString& strVersion) const;
++ int GetConnectingComputerName(wxString& strMachine) const;
++ bool IsComputerNameLocal(const wxString& strMachine) const;
++ int GetLocalPassword(wxString& strPassword) const;
+ int SetComputer(
+ const wxChar* szComputer, const int iPort, const wxChar* szPassword,
+ const bool bUseDefaultPassword
+@@ -81,7 +81,7 @@
+ void SetStateError();
+ void SetStateErrorAuthentication();
+ void SetStateReconnecting();
+- void SetStateSuccess(wxString& strComputer, wxString& strComputerPassword);
++ void SetStateSuccess(const wxString& strComputer, const wxString& strComputerPassword);
+ void SetStateDisconnected();
+ bool IsConnectEventSignaled() { return m_bConnectEvent; };
+ bool IsConnected() { return m_bConnected; };
+@@ -149,14 +149,14 @@
+ int FrameShutdownDetected();
+ int CoreClientQuit();
+
+- int GetConnectedComputerName(wxString& strMachine);
+- int GetConnectedComputerVersion(wxString& strVersion);
+- int GetConnectingComputerName(wxString& strMachine);
+- bool IsComputerNameLocal(const wxString strMachine);
+- bool IsConnected();
+- bool IsReconnecting();
++ int GetConnectedComputerName(wxString& strMachine) const;
++ int GetConnectedComputerVersion(wxString& strVersion) const;
++ int GetConnectingComputerName(wxString& strMachine) const;
++ bool IsComputerNameLocal(const wxString strMachine) const;
++ bool IsConnected() const;
++ bool IsReconnecting() const;
+
+- int GetCoreClientStatus(CC_STATUS&, bool bForce = false);
++ int GetCoreClientStatus(CC_STATUS&, bool bForce = false) /* not const */;
+ int SetActivityRunMode(int iMode, int iTimeout);
+ int SetGPURunMode(int iMode, int iTimeout);
+ int SetNetworkRunMode(int iMode, int iTimeout);
+@@ -227,7 +227,7 @@
+ PROJECT* project(char* url);
+ float m_fProjectTotalResourceShare;
+
+- int GetProjectCount();
++ int GetProjectCount() /* not const */;
+
+ int ProjectNoMoreWork(int iIndex);
+ int ProjectAllowMoreWork(int iIndex);
+@@ -247,7 +247,7 @@
+ double m_fResultsRPCExecutionTime;
+ wxDateTime m_dtKillInactiveGfxTimestamp;
+ std::vector<RUNNING_GFX_APP> m_running_gfx_apps;
+- RUNNING_GFX_APP* GetRunningGraphicsApp(RESULT* result, int slot);
++ RUNNING_GFX_APP* GetRunningGraphicsApp(const RESULT* const result, int slot);
+ void KillAllRunningGraphicsApps();
+ void KillInactiveGraphicsApps();
+ #ifdef _WIN32
+@@ -265,13 +265,13 @@
+ RESULT* result(unsigned int);
+ RESULT* result(const wxString& name, const wxString& project_url);
+
+- int GetWorkCount();
++ int GetWorkCount() /* not const */;
+
+- int WorkSuspend(char* url, char* name);
+- int WorkResume(char* url, char* name);
+- int WorkShowGraphics(RESULT* result);
+- int WorkAbort(char* url, char* name);
+- CC_STATE* GetState() { return &state; };
++ int WorkSuspend(const char* const url, const char* const name);
++ int WorkResume(const char* const url, const char* const name);
++ int WorkShowGraphics(RESULT* const result);
++ int WorkAbort(const char* const url, const char* const name);
++ CC_STATE* GetState() { return &state; } ;
+
+
+ //
+@@ -291,8 +291,8 @@
+ NOTICE* notice(unsigned int);
+ int CachedNoticeUpdate();
+
+- int GetNoticeCount();
+- int GetUnreadNoticeCount();
++ int GetNoticeCount() /* not const */;
++ int GetUnreadNoticeCount() const;
+
+ void SaveUnreadNoticeInfo();
+ void RestoreUnreadNoticeInfo();
+@@ -315,7 +315,7 @@
+ MESSAGE* message(unsigned int);
+ int CachedMessageUpdate();
+
+- int GetMessageCount();
++ int GetMessageCount() /* not const */;
+
+ int ResetMessageState();
+
+@@ -337,7 +337,7 @@
+ FILE_TRANSFER* file_transfer(unsigned int);
+ FILE_TRANSFER* file_transfer(const wxString& fileName, const wxString& project_url);
+
+- int GetTransferCount();
++ int GetTransferCount() /* not const */;
+
+ int TransferRetryNow(int iIndex);
+ int TransferRetryNow(const wxString& fileName, const wxString& project_url);
+@@ -372,7 +372,7 @@
+ PROJECT* statistic(unsigned int);
+ int m_iGet_statistics_rpc_result;
+
+- int GetStatisticsCount();
++ int GetStatisticsCount() /* not const */;
+
+
+ //
+@@ -399,13 +399,13 @@
+ public:
+ ACCT_MGR_INFO ami;
+ ACCT_MGR_INFO async_ami_buf;
+- int GetSimpleProjectCount();
+- int GetSimpleGUIWorkCount();
++ int GetSimpleProjectCount() /* not const */;
++ int GetSimpleGUIWorkCount() /* not const */;
+
+ };
+
+ extern wxString suspend_reason_wxstring(int reason);
+-extern wxString result_description(RESULT*, bool show_resources=true);
++extern wxString result_description(const RESULT *const, bool show_resources=true);
+ extern wxString process_client_message(const char*);
+
+ #ifdef SANDBOX
+Index: boinc/clientgui/sg_TaskCommandPopup.cpp
+===================================================================
+--- boinc.orig/clientgui/sg_TaskCommandPopup.cpp 2011-07-24 19:39:09.000000000 +0200
++++ boinc/clientgui/sg_TaskCommandPopup.cpp 2011-11-14 01:08:13.000000000 +0100
+@@ -284,7 +284,7 @@
+
+ // CMainDocument::state.lookup_result() does not yield current scheduler_state;
+ // we must use CMainDocument::result() for that.
+-RESULT* CSimpleTaskPopupButton::lookup_result(char* url, char* name) {
++RESULT* CSimpleTaskPopupButton::lookup_result(const char* const url, const char* const name) {
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+ wxASSERT(pDoc);
+Index: boinc/clientgui/sg_TaskCommandPopup.h
+===================================================================
+--- boinc.orig/clientgui/sg_TaskCommandPopup.h 2011-07-24 19:39:09.000000000 +0200
++++ boinc/clientgui/sg_TaskCommandPopup.h 2011-11-14 01:07:28.000000000 +0100
+@@ -44,7 +44,7 @@
+ void OnTaskSuspendResume(wxCommandEvent& event);
+ void OnTaskAbort(wxCommandEvent& event);
+ void OnTaskShowProperties(wxCommandEvent& event);
+- RESULT* lookup_result(char* url, char* name);
++ RESULT* lookup_result(const char* const url, const char* const name);
+
+ protected:
+ wxMenu* m_TaskCommandPopUpMenu;
+Index: boinc/lib/gui_rpc_client.h
+===================================================================
+--- boinc.orig/lib/gui_rpc_client.h 2011-10-30 00:27:06.000000000 +0200
++++ boinc/lib/gui_rpc_client.h 2011-11-14 01:15:55.000000000 +0100
+@@ -385,13 +385,13 @@
+ CC_STATE();
+ ~CC_STATE();
+
+- PROJECT* lookup_project(char* url);
+- APP* lookup_app(PROJECT*, char* name);
+- APP_VERSION* lookup_app_version(PROJECT*, APP*, int, char* plan_class);
+- APP_VERSION* lookup_app_version_old(PROJECT*, APP*, int);
+- WORKUNIT* lookup_wu(PROJECT*, char* name);
+- RESULT* lookup_result(PROJECT*, char* name);
+- RESULT* lookup_result(char* url, char* name);
++ PROJECT* lookup_project(const char* const url);
++ APP* lookup_app(const PROJECT* const, const char* const name);
++ APP_VERSION* lookup_app_version(const PROJECT* const, const APP* const, int, const char* const plan_class);
++ APP_VERSION* lookup_app_version_old(const PROJECT* const, const APP* const, int);
++ WORKUNIT* lookup_wu(const PROJECT* const, const char* const name);
++ RESULT* lookup_result(const PROJECT* const, const char* const name);
++ RESULT* lookup_result(const char* const url, const char* const name);
+
+ void print();
+ void clear();
+Index: boinc/lib/gui_rpc_client_ops.cpp
+===================================================================
+--- boinc.orig/lib/gui_rpc_client_ops.cpp 2011-11-13 17:47:09.000000000 +0100
++++ boinc/lib/gui_rpc_client_ops.cpp 2011-11-14 01:14:41.000000000 +0100
+@@ -908,7 +908,7 @@
+ have_ati = false;
+ }
+
+-PROJECT* CC_STATE::lookup_project(char* url) {
++PROJECT* CC_STATE::lookup_project(const char* const url) {
+ unsigned int i;
+ for (i=0; i<projects.size(); i++) {
+ if (!strcmp(projects[i]->master_url, url)) return projects[i];
+@@ -916,7 +916,7 @@
+ return 0;
+ }
+
+-APP* CC_STATE::lookup_app(PROJECT* project, char* name) {
++APP* CC_STATE::lookup_app(const PROJECT* const project, const char* const name) {
+ unsigned int i;
+ for (i=0; i<apps.size(); i++) {
+ if (apps[i]->project != project) continue;
+@@ -926,7 +926,7 @@
+ }
+
+ APP_VERSION* CC_STATE::lookup_app_version(
+- PROJECT* project, APP* app, int version_num, char* plan_class
++ const PROJECT* const project, const APP* const app, const int version_num, const char* const plan_class
+ ) {
+ unsigned int i;
+ for (i=0; i<app_versions.size(); i++) {
+@@ -940,7 +940,7 @@
+ }
+
+ APP_VERSION* CC_STATE::lookup_app_version_old(
+- PROJECT* project, APP* app, int version_num
++ const PROJECT* const project, const APP* const app, const int version_num
+ ) {
+ unsigned int i;
+ for (i=0; i<app_versions.size(); i++) {
+@@ -952,7 +952,7 @@
+ return 0;
+ }
+
+-WORKUNIT* CC_STATE::lookup_wu(PROJECT* project, char* name) {
++WORKUNIT* CC_STATE::lookup_wu(const PROJECT* const project, const char* const name) {
+ unsigned int i;
+ for (i=0; i<wus.size(); i++) {
+ if (wus[i]->project != project) continue;
+@@ -961,7 +961,7 @@
+ return 0;
+ }
+
+-RESULT* CC_STATE::lookup_result(PROJECT* project, char* name) {
++RESULT* CC_STATE::lookup_result(const PROJECT* const project, const char* const name) {
+ unsigned int i;
+ for (i=0; i<results.size(); i++) {
+ if (results[i]->project != project) continue;
+@@ -970,7 +970,7 @@
+ return 0;
+ }
+
+-RESULT* CC_STATE::lookup_result(char* url, char* name) {
++RESULT* CC_STATE::lookup_result(const char* const url, const char* const name) {
+ unsigned int i;
+ for (i=0; i<results.size(); i++) {
+ if (strcmp(results[i]->project->master_url, url)) continue;
diff --git a/debian/patches/AddingMoreConst.patch b/debian/patches/AddingMoreConst.patch
new file mode 100644
index 0000000..cf1daf1
--- /dev/null
+++ b/debian/patches/AddingMoreConst.patch
@@ -0,0 +1,2809 @@
+Index: boinc/clientgui/ViewWork.cpp
+===================================================================
+--- boinc.orig/clientgui/ViewWork.cpp 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewWork.cpp 2011-11-25 22:37:25.000000000 +0100
+@@ -96,7 +96,7 @@
+
+ static CViewWork* myCViewWork;
+
+-static bool CompareViewWorkItems(int iRowIndex1, int iRowIndex2) {
++static bool CompareViewWorkItems(const int iRowIndex1, const int iRowIndex2) {
+ CWork* work1;
+ CWork* work2;
+ int result = false;
+@@ -165,7 +165,7 @@
+ {}
+
+
+-CViewWork::CViewWork(wxNotebook* pNotebook) :
++CViewWork::CViewWork(wxNotebook* const pNotebook) :
+ CBOINCBaseView(pNotebook, ID_TASK_WORKVIEW, DEFAULT_TASK_FLAGS, ID_LIST_WORKVIEW, DEFAULT_LIST_MULTI_SEL_FLAGS)
+ {
+ CTaskItemGroup* pGroup = NULL;
+@@ -244,29 +244,29 @@
+ }
+
+
+-wxString& CViewWork::GetViewName() {
++wxString& CViewWork::GetViewName() const {
+ static wxString strViewName(wxT("Tasks"));
+ return strViewName;
+ }
+
+
+-wxString& CViewWork::GetViewDisplayName() {
++wxString& CViewWork::GetViewDisplayName() const {
+ static wxString strViewName(_("Tasks"));
+ return strViewName;
+ }
+
+
+-const char** CViewWork::GetViewIcon() {
++const char** CViewWork::GetViewIcon() const {
+ return result_xpm;
+ }
+
+
+-const int CViewWork::GetViewCurrentViewPage() {
++int CViewWork::GetViewCurrentViewPage() const {
+ return VW_TASK;
+ }
+
+
+-wxString CViewWork::GetKeyValue1(int iRowIndex) {
++wxString CViewWork::GetKeyValue1(const int iRowIndex) const {
+ CWork* work;
+
+ if (GetWorkCacheAtIndex(work, m_iSortedIndexes[iRowIndex])) {
+@@ -277,7 +277,7 @@
+ }
+
+
+-wxString CViewWork::GetKeyValue2(int iRowIndex) {
++wxString CViewWork::GetKeyValue2(const int iRowIndex) const {
+ CWork* work;
+
+ if (GetWorkCacheAtIndex(work, m_iSortedIndexes[iRowIndex])) {
+@@ -288,7 +288,7 @@
+ }
+
+
+-int CViewWork::FindRowIndexByKeyValues(wxString& key1, wxString& key2) {
++int CViewWork::FindRowIndexByKeyValues(const wxString& key1, const wxString& key2) const {
+ CWork* work;
+ unsigned int iRowIndex, n = GetCacheCount();
+ for(iRowIndex=0; iRowIndex < n; iRowIndex++) {
+@@ -485,7 +485,7 @@
+ }
+
+
+-bool CViewWork::OnSaveState(wxConfigBase* pConfig) {
++bool CViewWork::OnSaveState(wxConfigBase* const pConfig) {
+ bool bReturnValue = true;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+@@ -511,7 +511,7 @@
+ }
+
+
+-bool CViewWork::OnRestoreState(wxConfigBase* pConfig) {
++bool CViewWork::OnRestoreState(wxConfigBase* const pConfig) {
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+ wxASSERT(pDoc);
+@@ -564,7 +564,7 @@
+ }
+
+
+-wxInt32 CViewWork::GetDocCount() {
++wxInt32 CViewWork::GetDocCount() const {
+ return wxGetApp().GetDocument()->GetWorkCount();
+ }
+
+@@ -640,7 +640,7 @@
+ }
+
+
+-wxInt32 CViewWork::GetCacheCount() {
++wxInt32 CViewWork::GetCacheCount() const {
+ return (wxInt32)m_WorkCache.size();
+ }
+
+@@ -657,7 +657,7 @@
+ }
+
+
+-bool CViewWork::IsSelectionManagementNeeded() {
++bool CViewWork::IsSelectionManagementNeeded() const {
+ return true;
+ }
+
+@@ -807,7 +807,7 @@
+ }
+
+
+-bool CViewWork::SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex) {
++bool CViewWork::SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex) {
+ wxString strDocumentText = wxEmptyString;
+ wxString strDocumentText2 = wxEmptyString;
+ float fDocumentFloat = 0.0;
+@@ -891,7 +891,7 @@
+ }
+
+
+-void CViewWork::GetDocProjectName(wxInt32 item, wxString& strBuffer) const {
++int CViewWork::GetDocProjectName(const wxInt32 item, wxString& strBuffer) const {
+ CMainDocument* doc = wxGetApp().GetDocument();
+ RESULT* result = wxGetApp().GetDocument()->result(item);
+ PROJECT* state_project = NULL;
+@@ -909,11 +909,13 @@
+ } else {
+ doc->ForceCacheUpdate();
+ }
++ return 0;
+ }
++ return -1;
+ }
+
+
+-void CViewWork::GetDocApplicationName(wxInt32 item, wxString& strBuffer) const {
++int CViewWork::GetDocApplicationName(const wxInt32 item, wxString& strBuffer) const {
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+ RESULT* result = wxGetApp().GetDocument()->result(item);
+ RESULT* state_result = NULL;
+@@ -930,13 +932,13 @@
+ state_result = pDoc->state.lookup_result(result->project_url, result->name);
+ }
+
+- if (!state_result) return;
++ if (!state_result) return -1;
+ WORKUNIT* wup = state_result->wup;
+- if (!wup) return;
++ if (!wup) return -1;
+ APP* app = wup->app;
+- if (!app) return;
++ if (!app) return -1;
+ APP_VERSION* avp = state_result->avp;
+- if (!avp) return;
++ if (!avp) return -1;
+
+ if (strlen(app->user_friendly_name)) {
+ strAppBuffer = HtmlEntityDecode(wxString(state_result->app->user_friendly_name, wxConvUTF8));
+@@ -959,21 +961,33 @@
+ state_result->avp->version_num % 100,
+ strClassBuffer.c_str()
+ );
++ return 0;
+ }
++ return -1;
+ }
+
+
+-void CViewWork::GetDocName(wxInt32 item, wxString& strBuffer) const {
+- RESULT* result = wxGetApp().GetDocument()->result(item);
++int CViewWork::GetDocName(const wxInt32 item, wxString& strBuffer) const {
++
++ CMainDocument* pDoc = wxGetApp().GetDocument();
++ if (!pDoc) return -1;
++
++ RESULT* result = pDoc->result(item);
+
+ if (result) {
+ strBuffer = wxString(result->name, wxConvUTF8);
++ return 0;
+ }
++ return -1;
+ }
+
+
+-void CViewWork::GetDocCPUTime(wxInt32 item, float& fBuffer) const {
+- RESULT* result = wxGetApp().GetDocument()->result(item);
++int CViewWork::GetDocCPUTime(wxInt32 item, float& fBuffer) const {
++
++ CMainDocument* pDoc = wxGetApp().GetDocument();
++ if (!pDoc) return -1;
++
++ RESULT* result = pDoc->result(item);
+
+ fBuffer = 0;
+ if (result) {
+@@ -988,11 +1002,14 @@
+ if (!fBuffer) fBuffer = result->final_cpu_time;
+ }
+ }
++ return 0;
+ }
++
++ return -1;
+ }
+
+
+-wxInt32 CViewWork::FormatCPUTime(float fBuffer, wxString& strBuffer) const {
++wxInt32 CViewWork::FormatCPUTime(const float fBuffer, wxString& strBuffer) const {
+ wxInt32 iHour = 0;
+ wxInt32 iMin = 0;
+ wxInt32 iSec = 0;
+@@ -1014,7 +1031,7 @@
+ }
+
+
+-void CViewWork::GetDocProgress(wxInt32 item, float& fBuffer) const {
++int CViewWork::GetDocProgress(const wxInt32 item, float& fBuffer) const {
+ RESULT* result = wxGetApp().GetDocument()->result(item);
+
+ fBuffer = 0;
+@@ -1028,7 +1045,9 @@
+ fBuffer = 100.0;
+ }
+ }
++ return 0;
+ }
++ return -1;
+ }
+
+
+@@ -1039,17 +1058,19 @@
+ }
+
+
+-void CViewWork::GetDocTimeToCompletion(wxInt32 item, float& fBuffer) const {
++int CViewWork::GetDocTimeToCompletion(const wxInt32 item, float& fBuffer) const {
+ RESULT* result = wxGetApp().GetDocument()->result(item);
+
+ fBuffer = 0;
+ if (result) {
+ fBuffer = result->estimated_cpu_time_remaining;
++ return 0;
+ }
++ return -1;
+ }
+
+
+-wxInt32 CViewWork::FormatTimeToCompletion(float fBuffer, wxString& strBuffer) const {
++wxInt32 CViewWork::FormatTimeToCompletion(const float fBuffer, wxString& strBuffer) const {
+ double est = fBuffer;
+ wxInt32 iHour = 0;
+ wxInt32 iMin = 0;
+@@ -1075,18 +1096,20 @@
+ }
+
+
+-void CViewWork::GetDocReportDeadline(wxInt32 item, time_t& time) const {
++int CViewWork::GetDocReportDeadline(const wxInt32 item, time_t& time) const {
+ RESULT* result = wxGetApp().GetDocument()->result(item);
+
+ if (result) {
+ time = (time_t)result->report_deadline;
++ return 0;
+ } else {
+ time = (time_t)0;
++ return -1;
+ }
+ }
+
+
+-wxInt32 CViewWork::FormatReportDeadline(time_t deadline, wxString& strBuffer) const {
++wxInt32 CViewWork::FormatReportDeadline(const time_t deadline, wxString& strBuffer) const {
+ wxDateTime dtTemp;
+
+ dtTemp.Set(deadline);
+@@ -1098,7 +1121,7 @@
+
+
+
+-wxInt32 CViewWork::FormatStatus(wxInt32 item, wxString& strBuffer) const {
++wxInt32 CViewWork::FormatStatus(const wxInt32 item, wxString& strBuffer) const {
+ CWork* work;
+
+ try {
+@@ -1116,16 +1139,18 @@
+ }
+
+
+-void CViewWork::GetDocProjectURL(wxInt32 item, wxString& strBuffer) const {
++int CViewWork::GetDocProjectURL(const wxInt32 item, wxString& strBuffer) const {
+ RESULT* result = wxGetApp().GetDocument()->result(item);
+
+ if (result) {
+ strBuffer = wxString(result->project_url, wxConvUTF8);
++ return 0;
+ }
++ return -1;
+ }
+
+
+-double CViewWork::GetProgressValue(long item) {
++double CViewWork::GetProgressValue(const long item) const {
+ float fBuffer = 0;
+ RESULT* result = wxGetApp().GetDocument()->result(m_iSortedIndexes[item]);
+
+@@ -1146,7 +1171,7 @@
+ }
+
+
+-wxString CViewWork::GetProgressText( long item) {
++wxString CViewWork::GetProgressText( const long item) const {
+ CWork* work = NULL;
+ wxString strBuffer = wxEmptyString;
+
+@@ -1160,7 +1185,7 @@
+ }
+
+
+-int CViewWork::GetWorkCacheAtIndex(CWork*& workPtr, int index) {
++int CViewWork::GetWorkCacheAtIndex(CWork*& workPtr, const int index) const {
+ try {
+ workPtr = m_WorkCache.at(index);
+ } catch ( std::out_of_range ) {
+Index: boinc/clientgui/ViewWork.h
+===================================================================
+--- boinc.orig/clientgui/ViewWork.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewWork.h 2011-11-25 22:36:25.000000000 +0100
+@@ -58,14 +58,14 @@
+
+ ~CViewWork();
+
+- virtual wxString& GetViewName();
+- virtual wxString& GetViewDisplayName();
+- virtual const char** GetViewIcon();
+- virtual const int GetViewCurrentViewPage();
+-
+- virtual wxString GetKeyValue1(int iRowIndex);
+- virtual wxString GetKeyValue2(int iRowIndex);
+- virtual int FindRowIndexByKeyValues(wxString& key1, wxString& key2);
++ virtual wxString& GetViewName() const;
++ virtual wxString& GetViewDisplayName() const;
++ virtual const char** GetViewIcon() const;
++ virtual int GetViewCurrentViewPage() const;
++
++ virtual wxString GetKeyValue1(const int iRowIndex) const;
++ virtual wxString GetKeyValue2(const int iRowIndex) const;
++ virtual int FindRowIndexByKeyValues(const wxString& key1, const wxString& key2) const;
+
+ void OnWorkSuspend( wxCommandEvent& event );
+ void OnWorkShowGraphics( wxCommandEvent& event );
+@@ -79,40 +79,40 @@
+
+ protected:
+
+- virtual wxInt32 GetDocCount();
++ virtual wxInt32 GetDocCount() const;
+
+ virtual wxString OnListGetItemText( long item, long column ) const;
+
+- virtual bool OnSaveState( wxConfigBase* pConfig );
+- virtual bool OnRestoreState( wxConfigBase* pConfig );
++ virtual bool OnSaveState( wxConfigBase* const pConfig );
++ virtual bool OnRestoreState( wxConfigBase* const pConfig );
+
+ virtual wxInt32 AddCacheElement();
+ virtual wxInt32 EmptyCache();
+- virtual wxInt32 GetCacheCount();
++ virtual wxInt32 GetCacheCount() const;
+ virtual wxInt32 RemoveCacheElement();
+- virtual bool SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex);
++ virtual bool SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex);
+
+- virtual bool IsSelectionManagementNeeded();
++ virtual bool IsSelectionManagementNeeded() const;
+
+ virtual void UpdateSelection();
+
+- void GetDocProjectName(wxInt32 item, wxString& strBuffer) const;
+- void GetDocApplicationName(wxInt32 item, wxString& strBuffer) const;
+- void GetDocName(wxInt32 item, wxString& strBuffer) const;
+- void GetDocCPUTime(wxInt32 item, float& fBuffer) const;
++ int GetDocProjectName(const wxInt32 item, wxString& strBuffer) const;
++ int GetDocApplicationName(const wxInt32 item, wxString& strBuffer) const;
++ int GetDocName(const wxInt32 item, wxString& strBuffer) const;
++ int GetDocCPUTime(const wxInt32 item, float& fBuffer) const;
+ wxInt32 FormatCPUTime( float fBuffer, wxString& strBuffer ) const;
+- void GetDocProgress(wxInt32 item, float& fBuffer) const;
++ int GetDocProgress(const wxInt32 item, float& fBuffer) const;
+ wxInt32 FormatProgress( float fBuffer, wxString& strBuffer ) const;
+- void GetDocTimeToCompletion(wxInt32 item, float& fBuffer) const;
++ int GetDocTimeToCompletion(const wxInt32 item, float& fBuffer) const;
+ wxInt32 FormatTimeToCompletion( float fBuffer, wxString& strBuffer ) const;
+- void GetDocReportDeadline(wxInt32 item, time_t& time) const;
+- wxInt32 FormatReportDeadline( time_t deadline, wxString& strBuffer ) const;
+- wxInt32 FormatStatus( wxInt32 item, wxString& strBuffer ) const;
+- void GetDocProjectURL(wxInt32 item, wxString& strBuffer) const;
+- virtual double GetProgressValue(long item);
+- virtual wxString GetProgressText( long item);
++ int GetDocReportDeadline(wxInt32 item, time_t& time) const;
++ wxInt32 FormatReportDeadline( const time_t deadline, wxString& strBuffer ) const;
++ wxInt32 FormatStatus(const wxInt32 item, wxString& strBuffer ) const;
++ int GetDocProjectURL(const wxInt32 item, wxString& strBuffer) const;
++ virtual double GetProgressValue(const long item) const;
++ virtual wxString GetProgressText( const long item) const;
+
+- int GetWorkCacheAtIndex(CWork*& workPtr, int index);
++ int GetWorkCacheAtIndex(CWork*& workPtr, const int index) const;
+
+ DECLARE_EVENT_TABLE()
+ };
+Index: boinc/clientgui/BOINCBaseView.cpp
+===================================================================
+--- boinc.orig/clientgui/BOINCBaseView.cpp 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/BOINCBaseView.cpp 2011-11-25 22:39:03.000000000 +0100
+@@ -37,7 +37,7 @@
+
+ CBOINCBaseView::CBOINCBaseView() {}
+
+-CBOINCBaseView::CBOINCBaseView(wxNotebook* pNotebook) :
++CBOINCBaseView::CBOINCBaseView(wxNotebook* const pNotebook) :
+ wxPanel(pNotebook, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
+ {
+ wxASSERT(pNotebook);
+@@ -70,7 +70,7 @@
+
+
+ CBOINCBaseView::CBOINCBaseView(
+- wxNotebook* pNotebook, wxWindowID iTaskWindowID, int iTaskWindowFlags, wxWindowID iListWindowID, int iListWindowFlags) :
++ wxNotebook* const pNotebook, const wxWindowID iTaskWindowID, const int iTaskWindowFlags, const wxWindowID iListWindowID, const int iListWindowFlags) :
+ wxPanel(pNotebook, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
+ {
+ wxASSERT(pNotebook);
+@@ -172,7 +172,7 @@
+ // The name of the view.
+ // If it has not been defined by the view "Undefined" is returned.
+ //
+-wxString& CBOINCBaseView::GetViewName() {
++wxString& CBOINCBaseView::GetViewName() const {
+ static wxString strViewName(wxT("Undefined"));
+ return strViewName;
+ }
+@@ -181,7 +181,7 @@
+ // The user friendly name of the view.
+ // If it has not been defined by the view "Undefined" is returned.
+ //
+-wxString& CBOINCBaseView::GetViewDisplayName() {
++wxString& CBOINCBaseView::GetViewDisplayName() const {
+ static wxString strViewName(wxT("Undefined"));
+ return strViewName;
+ }
+@@ -190,7 +190,7 @@
+ // The user friendly icon of the view.
+ // If it has not been defined by the view the BOINC icon is returned.
+ //
+-const char** CBOINCBaseView::GetViewIcon() {
++const char** CBOINCBaseView::GetViewIcon() const {
+ wxASSERT(boinc_xpm);
+ return boinc_xpm;
+ }
+@@ -199,44 +199,44 @@
+ // The rate at which the view is refreshed.
+ // If it has not been defined by the view 1 second is retrned.
+ //
+-const int CBOINCBaseView::GetViewRefreshRate() {
++int CBOINCBaseView::GetViewRefreshRate() const {
+ return 1;
+ }
+
+
+ // Get bit mask of current view(s).
+ //
+-const int CBOINCBaseView::GetViewCurrentViewPage() {
++int CBOINCBaseView::GetViewCurrentViewPage() const {
+ return 0;
+ }
+
+
+-wxString CBOINCBaseView::GetKeyValue1(int) {
++wxString CBOINCBaseView::GetKeyValue1(const int) const {
+ return wxEmptyString;
+ }
+
+
+-wxString CBOINCBaseView::GetKeyValue2(int) {
++wxString CBOINCBaseView::GetKeyValue2(const int) const {
+ return wxEmptyString;
+ }
+
+
+-int CBOINCBaseView::FindRowIndexByKeyValues(wxString&, wxString&) {
++int CBOINCBaseView::FindRowIndexByKeyValues(const wxString&, const wxString&) const {
+ return -1;
+ }
+
+
+-bool CBOINCBaseView::FireOnSaveState(wxConfigBase* pConfig) {
++bool CBOINCBaseView::FireOnSaveState(wxConfigBase* const pConfig) {
+ return OnSaveState(pConfig);
+ }
+
+
+-bool CBOINCBaseView::FireOnRestoreState(wxConfigBase* pConfig) {
++bool CBOINCBaseView::FireOnRestoreState(wxConfigBase* const pConfig) {
+ return OnRestoreState(pConfig);
+ }
+
+
+-int CBOINCBaseView::GetListRowCount() {
++int CBOINCBaseView::GetListRowCount() const {
+ wxASSERT(m_pListPane);
+ return m_pListPane->GetItemCount();
+ }
+@@ -257,12 +257,12 @@
+ }
+
+
+-wxString CBOINCBaseView::FireOnListGetItemText(long item, long column) const {
++wxString CBOINCBaseView::FireOnListGetItemText(const long item, const long column) const {
+ return OnListGetItemText(item, column);
+ }
+
+
+-int CBOINCBaseView::FireOnListGetItemImage(long item) const {
++int CBOINCBaseView::FireOnListGetItemImage(const long item) const {
+ return OnListGetItemImage(item);
+ }
+
+@@ -273,7 +273,7 @@
+ }
+
+
+-wxListItemAttr* CBOINCBaseView::OnListGetItemAttr(long item) const {
++wxListItemAttr* CBOINCBaseView::OnListGetItemAttr(const long item) const {
+
+ // If we are using some theme where the default background color isn't
+ // white, then our whole system is boned. Use defaults instead.
+@@ -366,7 +366,7 @@
+ }
+
+
+-bool CBOINCBaseView::OnSaveState(wxConfigBase* pConfig) {
++bool CBOINCBaseView::OnSaveState(wxConfigBase* const pConfig) {
+ bool bReturnValue = true;
+
+ wxASSERT(pConfig);
+@@ -385,7 +385,7 @@
+ }
+
+
+-bool CBOINCBaseView::OnRestoreState(wxConfigBase* pConfig) {
++bool CBOINCBaseView::OnRestoreState(wxConfigBase* const pConfig) {
+ wxASSERT(pConfig);
+ wxASSERT(m_pTaskPane);
+ wxASSERT(m_pListPane);
+@@ -443,12 +443,12 @@
+ }
+
+
+-wxString CBOINCBaseView::OnListGetItemText(long WXUNUSED(item), long WXUNUSED(column)) const {
++wxString CBOINCBaseView::OnListGetItemText(const long WXUNUSED(item), const long WXUNUSED(column)) const {
+ return wxString(wxT("Undefined"));
+ }
+
+
+-int CBOINCBaseView::OnListGetItemImage(long WXUNUSED(item)) const {
++int CBOINCBaseView::OnListGetItemImage(const long WXUNUSED(item)) const {
+ return -1;
+ }
+
+@@ -458,12 +458,12 @@
+ }
+
+
+-wxString CBOINCBaseView::OnDocGetItemImage(long WXUNUSED(item)) const {
++wxString CBOINCBaseView::OnDocGetItemImage(const long WXUNUSED(item)) const {
+ return wxString(wxT("Undefined"));
+ }
+
+
+-wxString CBOINCBaseView::OnDocGetItemAttr(long WXUNUSED(item)) const {
++wxString CBOINCBaseView::OnDocGetItemAttr(const long WXUNUSED(item)) const {
+ return wxString(wxT("Undefined"));
+ }
+
+@@ -478,7 +478,7 @@
+ }
+
+
+-int CBOINCBaseView::GetCacheCount() {
++int CBOINCBaseView::GetCacheCount() const {
+ return -1;
+ }
+
+@@ -743,7 +743,7 @@
+ }
+
+
+-void CBOINCBaseView::UpdateWebsiteSelection(long lControlGroup, PROJECT* project){
++void CBOINCBaseView::UpdateWebsiteSelection(const long lControlGroup, const PROJECT* const project){
+ unsigned int i;
+ CTaskItemGroup* pGroup = NULL;
+ CTaskItem* pItem = NULL;
+@@ -818,7 +818,7 @@
+ }
+
+
+-bool CBOINCBaseView::IsSelectionManagementNeeded() {
++bool CBOINCBaseView::IsSelectionManagementNeeded() const {
+ return false;
+ }
+
+@@ -833,17 +833,17 @@
+ }
+
+
+-double CBOINCBaseView::GetProgressValue(long) {
++double CBOINCBaseView::GetProgressValue(const long) const {
+ return 0.0;
+ }
+
+
+-wxString CBOINCBaseView::GetProgressText( long ) {
++wxString CBOINCBaseView::GetProgressText(const long) const {
+ return wxEmptyString;
+ }
+
+
+-void CBOINCBaseView::append_to_status(wxString& existing, const wxChar* additional) {
++void CBOINCBaseView::append_to_status(wxString& existing, const wxChar* const additional) {
+ if (existing.size() == 0) {
+ existing = additional;
+ } else {
+@@ -856,7 +856,7 @@
+ // http://www.webreference.com/html/reference/character/
+ // Completed: The ISO Latin 1 Character Set
+ //
+-wxString CBOINCBaseView::HtmlEntityEncode(wxString strRaw) {
++wxString CBOINCBaseView::HtmlEntityEncode(const wxString strRaw) {
+ wxString strEncodedHtml(strRaw);
+
+ #ifdef __WXMSW__
+@@ -983,7 +983,7 @@
+ return strEncodedHtml;
+ }
+
+-wxString CBOINCBaseView::HtmlEntityDecode(wxString strRaw) {
++wxString CBOINCBaseView::HtmlEntityDecode(const wxString strRaw) {
+ wxString strDecodedHtml(strRaw);
+
+ if (0 <= strDecodedHtml.Find(wxT("&"))) {
+Index: boinc/clientgui/BOINCBaseView.h
+===================================================================
+--- boinc.orig/clientgui/BOINCBaseView.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/BOINCBaseView.h 2011-11-25 22:29:07.000000000 +0100
+@@ -44,10 +44,10 @@
+ class CTaskItem : wxObject {
+ public:
+ CTaskItem();
+- CTaskItem( wxString strName, wxString strDescription, wxInt32 iEventID ) :
++ CTaskItem( const wxString strName, const wxString strDescription, const wxInt32 iEventID ) :
+ m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID),
+ m_pButton(NULL), m_strWebSiteLink(wxT("")) {};
+- CTaskItem( wxString strName, wxString strDescription, wxString strWebSiteLink, wxInt32 iEventID ) :
++ CTaskItem( const wxString strName, const wxString strDescription, const wxString strWebSiteLink, const wxInt32 iEventID ) :
+ m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID),
+ m_pButton(NULL), m_strWebSiteLink(strWebSiteLink) {};
+ ~CTaskItem() {};
+@@ -64,7 +64,7 @@
+ class CTaskItemGroup : wxObject {
+ public:
+ CTaskItemGroup();
+- CTaskItemGroup( wxString strName ) :
++ CTaskItemGroup( const wxString strName ) :
+ m_strName(strName), m_pStaticBox(NULL), m_pStaticBoxSizer(NULL) {
+ m_Tasks.clear();
+ #ifdef __WXMAC__
+@@ -76,7 +76,7 @@
+ RemoveMacAccessibilitySupport();
+ #endif
+ };
+- wxButton* button(int i) {return m_Tasks[i]->m_pButton;}
++ wxButton* button(const int i) {return m_Tasks[i]->m_pButton;}
+
+ wxString m_strName;
+
+@@ -94,7 +94,7 @@
+ #endif
+ };
+
+-typedef bool (*ListSortCompareFunc)(int, int);
++typedef bool (*ListSortCompareFunc)(const int, const int);
+
+
+ class CBOINCBaseView : public wxPanel {
+@@ -104,44 +104,44 @@
+
+ CBOINCBaseView();
+ CBOINCBaseView(
+- wxNotebook* pNotebook
++ wxNotebook* const pNotebook
+ );
+ CBOINCBaseView(
+- wxNotebook* pNotebook,
+- wxWindowID iTaskWindowID,
+- int iTaskWindowFlags,
+- wxWindowID iListWindowID,
+- int iListWindowFlags
++ wxNotebook* const pNotebook,
++ const wxWindowID iTaskWindowID,
++ const int iTaskWindowFlags,
++ const wxWindowID iListWindowID,
++ const int iListWindowFlags
+ );
+
+ ~CBOINCBaseView();
+
+- virtual wxString& GetViewName();
+- virtual wxString& GetViewDisplayName();
+- virtual const char** GetViewIcon();
+- virtual const int GetViewRefreshRate();
+- virtual const int GetViewCurrentViewPage();
+-
+- virtual wxString GetKeyValue1(int iRowIndex);
+- virtual wxString GetKeyValue2(int iRowIndex);
+- virtual int FindRowIndexByKeyValues(wxString& key1, wxString& key2);
++ virtual wxString& GetViewName() const;
++ virtual wxString& GetViewDisplayName() const;
++ virtual const char** GetViewIcon() const;
++ virtual int GetViewRefreshRate() const;
++ virtual int GetViewCurrentViewPage() const;
++
++ virtual wxString GetKeyValue1(const int iRowIndex) const;
++ virtual wxString GetKeyValue2(const int iRowIndex) const;
++ virtual int FindRowIndexByKeyValues(const wxString& key1, const wxString& key2) const;
+
+- bool FireOnSaveState( wxConfigBase* pConfig );
+- bool FireOnRestoreState( wxConfigBase* pConfig );
++ bool FireOnSaveState( wxConfigBase* const pConfig );
++ bool FireOnRestoreState( wxConfigBase* const pConfig );
+
+- virtual int GetListRowCount();
++ virtual int GetListRowCount() const;
+ void FireOnListRender( wxTimerEvent& event );
+ void FireOnListSelected( wxListEvent& event );
+ void FireOnListDeselected( wxListEvent& event );
+- wxString FireOnListGetItemText( long item, long column ) const;
+- int FireOnListGetItemImage( long item ) const;
++ wxString FireOnListGetItemText( const long item, long column ) const;
++ int FireOnListGetItemImage( const long item ) const;
+ #if BASEVIEW_STRIPES
+- wxListItemAttr* FireOnListGetItemAttr( long item ) const;
++ wxListItemAttr* FireOnListGetItemAttr( const long item ) const;
+ #endif
+
+- int GetProgressColumn() { return m_iProgressColumn; }
+- virtual double GetProgressValue(long item);
+- virtual wxString GetProgressText( long item);
++ int GetProgressColumn() const { return m_iProgressColumn; }
++ virtual double GetProgressValue(const long item) const;
++ virtual wxString GetProgressText( const long item) const;
+
+ void InitSort();
+
+@@ -152,7 +152,7 @@
+ void RefreshTaskPane();
+
+ #ifdef __WXMAC__
+- CBOINCListCtrl* GetListCtrl() { return m_pListPane; }
++ CBOINCListCtrl* GetListCtrl() const { return m_pListPane; }
+ #endif
+
+ std::vector<CTaskItemGroup*> m_TaskGroups;
+@@ -167,28 +167,28 @@
+
+ protected:
+
+- virtual bool OnSaveState( wxConfigBase* pConfig );
+- virtual bool OnRestoreState( wxConfigBase* pConfig );
++ virtual bool OnSaveState( wxConfigBase* const pConfig );
++ virtual bool OnRestoreState( wxConfigBase* const pConfig );
+
+ virtual void OnListRender( wxTimerEvent& event );
+ virtual void OnListSelected( wxListEvent& event );
+ virtual void OnListDeselected( wxListEvent& event );
+ virtual void OnCacheHint(wxListEvent& event);
+- virtual wxString OnListGetItemText( long item, long column ) const;
+- virtual int OnListGetItemImage( long item ) const;
++ virtual wxString OnListGetItemText( const long item, const long column ) const;
++ virtual int OnListGetItemImage( const long item ) const;
+
+ void OnColClick(wxListEvent& event);
+
+ virtual int GetDocCount();
+- virtual wxString OnDocGetItemImage( long item ) const;
+- virtual wxString OnDocGetItemAttr( long item ) const;
++ virtual wxString OnDocGetItemImage( const long item ) const;
++ virtual wxString OnDocGetItemAttr( const long item ) const;
+
+ virtual int AddCacheElement();
+ virtual int EmptyCache();
+- virtual int GetCacheCount();
++ virtual int GetCacheCount() const;
+ virtual int RemoveCacheElement();
+ virtual int SynchronizeCache();
+- virtual bool SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex);
++ virtual bool SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex);
+ void sortData();
+
+ virtual void EmptyTasks();
+@@ -197,21 +197,21 @@
+ virtual void UpdateSelection();
+ virtual void PostUpdateSelection();
+
+- virtual void UpdateWebsiteSelection(long lControlGroup, PROJECT* project);
++ virtual void UpdateWebsiteSelection(const long lControlGroup, const PROJECT* const project);
+
+
+ bool _IsSelectionManagementNeeded();
+- virtual bool IsSelectionManagementNeeded();
++ virtual bool IsSelectionManagementNeeded() const;
+
+ bool _EnsureLastItemVisible();
+ virtual bool EnsureLastItemVisible();
+
+- static void append_to_status(wxString& existing, const wxChar* additional);
+- static wxString HtmlEntityEncode(wxString strRaw);
+- static wxString HtmlEntityDecode(wxString strRaw);
++ static void append_to_status(wxString& existing, const wxChar* const additional);
++ static wxString HtmlEntityEncode(const wxString strRaw);
++ static wxString HtmlEntityDecode(const wxString strRaw);
+
+ #if BASEVIEW_STRIPES
+- virtual wxListItemAttr* OnListGetItemAttr( long item ) const;
++ virtual wxListItemAttr* OnListGetItemAttr( const long item ) const;
+
+ wxListItemAttr* m_pWhiteBackgroundAttr;
+ wxListItemAttr* m_pGrayBackgroundAttr;
+Index: boinc/clientgui/MainDocument.cpp
+===================================================================
+--- boinc.orig/clientgui/MainDocument.cpp 2011-11-14 01:05:10.000000000 +0100
++++ boinc/clientgui/MainDocument.cpp 2011-11-25 22:18:02.000000000 +0100
+@@ -1448,7 +1448,7 @@
+ }
+
+
+-RESULT* CMainDocument::result(unsigned int i) {
++RESULT* CMainDocument::result(const unsigned int i) const {
+ RESULT* pResult = NULL;
+
+ try {
+@@ -1463,7 +1463,7 @@
+ }
+
+ /* get the result not by index, but by name */
+-RESULT* CMainDocument::result(const wxString& name, const wxString& project_url) {
++RESULT* CMainDocument::result(const wxString& name, const wxString& project_url) const {
+ RESULT* pResult = NULL;
+
+ try {
+@@ -1636,7 +1636,7 @@
+ kill_program(pid);
+ }
+ #else
+-void CMainDocument::KillGraphicsApp(int pid) {
++void CMainDocument::KillGraphicsApp(const int pid) {
+ char* argv[6];
+ char currentDir[1024];
+ char thePIDbuf[10];
+@@ -1668,6 +1668,8 @@
+
+ int CMainDocument::WorkShowGraphics(RESULT* result)
+ {
++ if (!result || !result->graphics_exec_path) return -1;
++
+ int iRetVal = 0;
+
+ if (strlen(result->graphics_exec_path)) {
+Index: boinc/clientgui/MainDocument.h
+===================================================================
+--- boinc.orig/clientgui/MainDocument.h 2011-11-14 01:21:54.000000000 +0100
++++ boinc/clientgui/MainDocument.h 2011-11-25 22:17:45.000000000 +0100
+@@ -253,7 +253,7 @@
+ #ifdef _WIN32
+ void KillGraphicsApp(HANDLE pid);
+ #else
+- void KillGraphicsApp(int tpid);
++ void KillGraphicsApp(const int tpid);
+ #endif
+
+ public:
+@@ -262,8 +262,8 @@
+ int m_iGet_results_rpc_result;
+ bool m_ActiveTasksOnly;
+
+- RESULT* result(unsigned int);
+- RESULT* result(const wxString& name, const wxString& project_url);
++ RESULT* result(const unsigned int) const;
++ RESULT* result(const wxString& name, const wxString& project_url) const;
+
+ int GetWorkCount() /* not const */;
+
+Index: boinc/clientgui/TermsOfUsePage.cpp
+===================================================================
+--- boinc.orig/clientgui/TermsOfUsePage.cpp 2011-04-25 18:41:15.000000000 +0200
++++ boinc/clientgui/TermsOfUsePage.cpp 2011-11-25 21:45:21.000000000 +0100
+@@ -66,7 +66,7 @@
+ {
+ }
+
+-CTermsOfUsePage::CTermsOfUsePage( CBOINCBaseWizard* parent )
++CTermsOfUsePage::CTermsOfUsePage( CBOINCBaseWizard* const parent )
+ {
+ Create( parent );
+ }
+@@ -75,7 +75,7 @@
+ * CTermsOfUsePage creator
+ */
+
+-bool CTermsOfUsePage::Create( CBOINCBaseWizard* parent )
++bool CTermsOfUsePage::Create( CBOINCBaseWizard* const parent )
+ {
+ ////@begin CTermsOfUsePage member initialisation
+ m_pTitleStaticCtrl = NULL;
+@@ -180,7 +180,7 @@
+ * Get bitmap resources
+ */
+
+-wxBitmap CTermsOfUsePage::GetBitmapResource( const wxString& WXUNUSED(name) )
++wxBitmap CTermsOfUsePage::GetBitmapResource( const wxString& WXUNUSED(name) ) const
+ {
+ // Bitmap retrieval
+
+@@ -193,7 +193,7 @@
+ * Get icon resources
+ */
+
+-wxIcon CTermsOfUsePage::GetIconResource( const wxString& WXUNUSED(name) )
++wxIcon CTermsOfUsePage::GetIconResource( const wxString& WXUNUSED(name) ) const
+ {
+ // Icon retrieval
+
+Index: boinc/clientgui/TermsOfUsePage.h
+===================================================================
+--- boinc.orig/clientgui/TermsOfUsePage.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/TermsOfUsePage.h 2011-11-25 21:45:40.000000000 +0100
+@@ -35,10 +35,10 @@
+ /// Constructors
+ CTermsOfUsePage( );
+
+- CTermsOfUsePage( CBOINCBaseWizard* parent );
++ CTermsOfUsePage( CBOINCBaseWizard* const parent );
+
+ /// Creation
+- bool Create( CBOINCBaseWizard* parent );
++ bool Create( CBOINCBaseWizard* const parent );
+
+ /// Creates the controls and sizers
+ void CreateControls();
+@@ -69,17 +69,17 @@
+ virtual wxWizardPageEx* GetNext() const;
+
+ /// Retrieves bitmap resources
+- wxBitmap GetBitmapResource( const wxString& name );
++ wxBitmap GetBitmapResource( const wxString& name ) const;
+
+ /// Retrieves icon resources
+- wxIcon GetIconResource( const wxString& name );
++ wxIcon GetIconResource( const wxString& name ) const;
+ ////@end CTermsOfUsePage member function declarations
+
+ bool GetUserAgrees() const { return m_bUserAgrees ; }
+- void SetUserAgrees(bool value) { m_bUserAgrees = value ; }
++ void SetUserAgrees(const bool value) { m_bUserAgrees = value ; }
+
+ bool GetCredentialsAlreadyAvailable() const { return m_bCredentialsAlreadyAvailable ; }
+- void SetCredentialsAlreadyAvailable(bool value) { m_bCredentialsAlreadyAvailable = value ; }
++ void SetCredentialsAlreadyAvailable(const bool value) { m_bCredentialsAlreadyAvailable = value ; }
+
+ /// Should we show tooltips?
+ static bool ShowToolTips();
+Index: boinc/clientgui/UnavailablePage.cpp
+===================================================================
+--- boinc.orig/clientgui/UnavailablePage.cpp 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/UnavailablePage.cpp 2011-11-25 21:47:17.000000000 +0100
+@@ -64,7 +64,7 @@
+ {
+ }
+
+-CErrUnavailablePage::CErrUnavailablePage( CBOINCBaseWizard* parent )
++CErrUnavailablePage::CErrUnavailablePage( CBOINCBaseWizard* const parent )
+ {
+ Create( parent );
+ }
+@@ -73,7 +73,7 @@
+ * CErrUnavailablePage creator
+ */
+
+-bool CErrUnavailablePage::Create( CBOINCBaseWizard* parent )
++bool CErrUnavailablePage::Create( CBOINCBaseWizard* const parent )
+ {
+ ////@begin CErrUnavailablePage member initialisation
+ m_pTitleStaticCtrl = NULL;
+@@ -146,7 +146,7 @@
+ * Get bitmap resources
+ */
+
+-wxBitmap CErrUnavailablePage::GetBitmapResource( const wxString& WXUNUSED(name) )
++wxBitmap CErrUnavailablePage::GetBitmapResource( const wxString& WXUNUSED(name) ) const
+ {
+ // Bitmap retrieval
+
+@@ -159,7 +159,7 @@
+ * Get icon resources
+ */
+
+-wxIcon CErrUnavailablePage::GetIconResource( const wxString& WXUNUSED(name) )
++wxIcon CErrUnavailablePage::GetIconResource( const wxString& WXUNUSED(name) ) const
+ {
+ // Icon retrieval
+
+Index: boinc/clientgui/UnavailablePage.h
+===================================================================
+--- boinc.orig/clientgui/UnavailablePage.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/UnavailablePage.h 2011-11-25 21:47:04.000000000 +0100
+@@ -35,10 +35,10 @@
+ /// Constructors
+ CErrUnavailablePage( );
+
+- CErrUnavailablePage( CBOINCBaseWizard* parent );
++ CErrUnavailablePage( CBOINCBaseWizard* const parent );
+
+ /// Creation
+- bool Create( CBOINCBaseWizard* parent );
++ bool Create( CBOINCBaseWizard* const parent );
+
+ /// Creates the controls and sizers
+ void CreateControls();
+@@ -62,10 +62,10 @@
+ virtual wxWizardPageEx* GetNext() const;
+
+ /// Retrieves bitmap resources
+- wxBitmap GetBitmapResource( const wxString& name );
++ wxBitmap GetBitmapResource( const wxString& name ) const;
+
+ /// Retrieves icon resources
+- wxIcon GetIconResource( const wxString& name );
++ wxIcon GetIconResource( const wxString& name ) const;
+ ////@end CErrUnavailablePage member function declarations
+
+ /// Should we show tooltips?
+Index: boinc/clientgui/ValidateAccountKey.cpp
+===================================================================
+--- boinc.orig/clientgui/ValidateAccountKey.cpp 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ValidateAccountKey.cpp 2011-11-24 23:38:38.000000000 +0100
+@@ -27,7 +27,7 @@
+ IMPLEMENT_DYNAMIC_CLASS(CValidateAccountKey, wxValidator)
+
+
+-CValidateAccountKey::CValidateAccountKey(wxString *val) {
++CValidateAccountKey::CValidateAccountKey(wxString *const val) {
+ m_stringValue = val ;
+ }
+
+@@ -51,7 +51,7 @@
+ }
+
+
+-bool CValidateAccountKey::Validate(wxWindow *parent) {
++bool CValidateAccountKey::Validate(wxWindow *const parent) {
+ if(!CheckValidator())
+ return FALSE;
+
+Index: boinc/clientgui/ValidateAccountKey.h
+===================================================================
+--- boinc.orig/clientgui/ValidateAccountKey.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ValidateAccountKey.h 2011-11-24 23:39:21.000000000 +0100
+@@ -29,7 +29,7 @@
+
+ public:
+
+- CValidateAccountKey( wxString *val = 0 );
++ CValidateAccountKey( wxString * const val = 0 );
+ CValidateAccountKey( const CValidateAccountKey& val );
+
+ ~CValidateAccountKey();
+@@ -37,7 +37,7 @@
+ virtual wxObject* Clone() const { return new CValidateAccountKey(*this); }
+ virtual bool Copy( const CValidateAccountKey& val );
+
+- virtual bool Validate(wxWindow *parent);
++ virtual bool Validate(wxWindow *const parent);
+ virtual bool TransferToWindow();
+ virtual bool TransferFromWindow();
+
+Index: boinc/clientgui/ViewMessages.cpp
+===================================================================
+--- boinc.orig/clientgui/ViewMessages.cpp 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewMessages.cpp 2011-11-24 23:47:18.000000000 +0100
+@@ -59,7 +59,7 @@
+ {}
+
+
+-CViewMessages::CViewMessages(wxNotebook* pNotebook) :
++CViewMessages::CViewMessages(wxNotebook* const pNotebook) :
+ CBOINCBaseView(pNotebook, ID_TASK_MESSAGESVIEW, DEFAULT_TASK_FLAGS, ID_LIST_MESSAGESVIEW, DEFAULT_LIST_MULTI_SEL_FLAGS)
+ {
+ CTaskItemGroup* pGroup = NULL;
+@@ -154,19 +154,19 @@
+ }
+
+
+-wxString& CViewMessages::GetViewName() {
++wxString& CViewMessages::GetViewName() const {
+ static wxString strViewName(wxT("Messages"));
+ return strViewName;
+ }
+
+
+-wxString& CViewMessages::GetViewDisplayName() {
++wxString& CViewMessages::GetViewDisplayName() const {
+ static wxString strViewName(_("Messages"));
+ return strViewName;
+ }
+
+
+-const char** CViewMessages::GetViewIcon() {
++const char** CViewMessages::GetViewIcon() const {
+ return mess_xpm;
+ }
+
+@@ -310,7 +310,7 @@
+ }
+
+
+-wxInt32 CViewMessages::GetFilteredMessageIndex( wxInt32 iRow) const {
++wxInt32 CViewMessages::GetFilteredMessageIndex( const wxInt32 iRow) const {
+ if (m_bIsFiltered) return m_iFilteredIndexes[iRow];
+ return iRow;
+ }
+@@ -418,7 +418,7 @@
+ }
+
+
+-wxString CViewMessages::OnListGetItemText(long item, long column) const {
++wxString CViewMessages::OnListGetItemText(const long item, const long column) const {
+ wxString strBuffer = wxEmptyString;
+ wxInt32 index = GetFilteredMessageIndex(item);
+
+@@ -438,7 +438,7 @@
+ }
+
+
+-wxListItemAttr* CViewMessages::OnListGetItemAttr(long item) const {
++wxListItemAttr* CViewMessages::OnListGetItemAttr(const long item) const {
+ wxListItemAttr* pAttribute = NULL;
+ wxInt32 index = GetFilteredMessageIndex(item);
+ MESSAGE* message = wxGetApp().GetDocument()->message(index);
+@@ -516,42 +516,45 @@
+ }
+
+
+-wxInt32 CViewMessages::FormatProjectName(wxInt32 item, wxString& strBuffer) const {
++wxInt32 CViewMessages::FormatProjectName(const wxInt32 item, wxString& strBuffer) const {
+ MESSAGE* message = wxGetApp().GetDocument()->message(item);
+
+ if (message) {
+ strBuffer = HtmlEntityDecode(wxString(message->project.c_str(), wxConvUTF8));
++ return 0;
+ }
+-
+- return 0;
++ return -1;
+ }
+
+
+-wxInt32 CViewMessages::FormatTime(wxInt32 item, wxString& strBuffer) const {
++wxInt32 CViewMessages::FormatTime(const wxInt32 item, wxString& strBuffer) const {
+ wxDateTime dtBuffer;
+ MESSAGE* message = wxGetApp().GetDocument()->message(item);
+
+ if (message) {
+ dtBuffer.Set((time_t)message->timestamp);
+ strBuffer = dtBuffer.Format();
++ return 0;
+ }
+
+- return 0;
++ return -1;
+ }
+
+
+-wxInt32 CViewMessages::FormatMessage(wxInt32 item, wxString& strBuffer) const {
++wxInt32 CViewMessages::FormatMessage(const wxInt32 item, wxString& strBuffer) const {
+ MESSAGE* message = wxGetApp().GetDocument()->message(item);
+
+ if (message) {
+ strBuffer = process_client_message(message->body.c_str());
++ return 0;
+ }
+- return 0;
++
++ return -1;
+ }
+
+
+ #ifdef wxUSE_CLIPBOARD
+-bool CViewMessages::OpenClipboard( wxInt32 size ) {
++bool CViewMessages::OpenClipboard( const wxInt32 size ) {
+ bool bRetVal = false;
+
+ bRetVal = wxTheClipboard->Open();
+@@ -568,7 +571,7 @@
+ }
+
+
+-wxInt32 CViewMessages::CopyToClipboard(wxInt32 item) {
++wxInt32 CViewMessages::CopyToClipboard(const wxInt32 item) {
+ wxInt32 iRetVal = -1;
+ wxInt32 index = GetFilteredMessageIndex(item);
+
+Index: boinc/clientgui/ViewMessages.h
+===================================================================
+--- boinc.orig/clientgui/ViewMessages.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewMessages.h 2011-11-24 23:48:05.000000000 +0100
+@@ -34,13 +34,13 @@
+
+ public:
+ CViewMessages();
+- CViewMessages(wxNotebook* pNotebook);
++ CViewMessages(wxNotebook* const pNotebook);
+
+ ~CViewMessages();
+
+- virtual wxString& GetViewName();
+- virtual wxString& GetViewDisplayName();
+- virtual const char** GetViewIcon();
++ virtual wxString& GetViewName() const;
++ virtual wxString& GetViewDisplayName() const;
++ virtual const char** GetViewIcon() const;
+
+ void OnMessagesCopyAll( wxCommandEvent& event );
+ void OnMessagesCopySelected( wxCommandEvent& event );
+@@ -63,25 +63,25 @@
+
+ virtual void OnListRender( wxTimerEvent& event );
+
+- virtual wxInt32 GetFilteredMessageIndex( wxInt32 iRow) const;
++ virtual wxInt32 GetFilteredMessageIndex( const wxInt32 iRow) const;
+ virtual wxInt32 GetDocCount();
+
+- virtual wxString OnListGetItemText( long item, long column ) const;
+- virtual wxListItemAttr* OnListGetItemAttr( long item ) const;
++ virtual wxString OnListGetItemText( const long item, const long column ) const;
++ virtual wxListItemAttr* OnListGetItemAttr( const long item ) const;
+
+ virtual bool EnsureLastItemVisible();
+
+ virtual void UpdateSelection();
+
+- wxInt32 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
+- wxInt32 FormatTime( wxInt32 item, wxString& strBuffer ) const;
+- wxInt32 FormatMessage( wxInt32 item, wxString& strBuffer ) const;
++ wxInt32 FormatProjectName( const wxInt32 item, wxString& strBuffer ) const;
++ wxInt32 FormatTime( const wxInt32 item, wxString& strBuffer ) const;
++ wxInt32 FormatMessage( const wxInt32 item, wxString& strBuffer ) const;
+
+ #ifdef wxUSE_CLIPBOARD
+ bool m_bClipboardOpen;
+ wxString m_strClipboardData;
+- bool OpenClipboard( wxInt32 size );
+- wxInt32 CopyToClipboard( wxInt32 item );
++ bool OpenClipboard( const wxInt32 size );
++ wxInt32 CopyToClipboard( const wxInt32 item );
+ bool CloseClipboard();
+ #endif
+ };
+Index: boinc/clientgui/ViewNotices.cpp
+===================================================================
+--- boinc.orig/clientgui/ViewNotices.cpp 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewNotices.cpp 2011-11-25 21:48:31.000000000 +0100
+@@ -45,7 +45,7 @@
+ {}
+
+
+-CViewNotices::CViewNotices(wxNotebook* pNotebook) :
++CViewNotices::CViewNotices(wxNotebook* const pNotebook) :
+ CBOINCBaseView(pNotebook)
+ {
+ //
+@@ -72,38 +72,38 @@
+ }
+
+
+-wxString& CViewNotices::GetViewName() {
++wxString& CViewNotices::GetViewName() const {
+ static wxString strViewName(wxT("Notices"));
+ return strViewName;
+ }
+
+
+-wxString& CViewNotices::GetViewDisplayName() {
++wxString& CViewNotices::GetViewDisplayName() const {
+ static wxString strViewName(_("Notices"));
+ return strViewName;
+ }
+
+
+-const char** CViewNotices::GetViewIcon() {
++const char** CViewNotices::GetViewIcon() const {
+ return mess_xpm;
+ }
+
+
+-const int CViewNotices::GetViewRefreshRate() {
++int CViewNotices::GetViewRefreshRate() const {
+ return 10;
+ }
+
+-const int CViewNotices::GetViewCurrentViewPage() {
++int CViewNotices::GetViewCurrentViewPage() const {
+ return VW_NOTIF;
+ }
+
+
+-bool CViewNotices::OnSaveState(wxConfigBase* WXUNUSED(pConfig)) {
++bool CViewNotices::OnSaveState(wxConfigBase* const WXUNUSED(pConfig)) {
+ return true;
+ }
+
+
+-bool CViewNotices::OnRestoreState(wxConfigBase* WXUNUSED(pConfig)) {
++bool CViewNotices::OnRestoreState(wxConfigBase* const WXUNUSED(pConfig)) {
+ return true;
+ }
+
+Index: boinc/clientgui/ViewNotices.h
+===================================================================
+--- boinc.orig/clientgui/ViewNotices.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewNotices.h 2011-11-25 00:46:49.000000000 +0100
+@@ -35,21 +35,21 @@
+
+ public:
+ CViewNotices();
+- CViewNotices(wxNotebook* pNotebook);
++ CViewNotices(wxNotebook* const pNotebook);
+
+ ~CViewNotices();
+
+- virtual wxString& GetViewName();
+- virtual wxString& GetViewDisplayName();
+- virtual const char** GetViewIcon();
+- virtual const int GetViewRefreshRate();
+- virtual const int GetViewCurrentViewPage();
++ virtual wxString& GetViewName() const;
++ virtual wxString& GetViewDisplayName() const;
++ virtual const char** GetViewIcon() const;
++ virtual int GetViewRefreshRate() const;
++ virtual int GetViewCurrentViewPage() const;
+
+ protected:
+ CNoticeListCtrl* m_pHtmlListPane;
+
+- virtual bool OnSaveState( wxConfigBase* pConfig );
+- virtual bool OnRestoreState( wxConfigBase* pConfig );
++ virtual bool OnSaveState( wxConfigBase* const pConfig );
++ virtual bool OnRestoreState( wxConfigBase* const pConfig );
+
+ virtual void OnListRender( wxTimerEvent& event );
+ void OnLinkClicked( NoticeListCtrlEvent& event );
+Index: boinc/clientgui/ViewProjects.cpp
+===================================================================
+--- boinc.orig/clientgui/ViewProjects.cpp 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewProjects.cpp 2011-11-25 22:40:47.000000000 +0100
+@@ -91,7 +91,7 @@
+
+ static CViewProjects* myCViewProjects;
+
+-static bool CompareViewProjectsItems(int iRowIndex1, int iRowIndex2) {
++static bool CompareViewProjectsItems(const int iRowIndex1, const int iRowIndex2) {
+ CProject* project1;
+ CProject* project2;
+ int result = 0;
+@@ -153,7 +153,7 @@
+ {}
+
+
+-CViewProjects::CViewProjects(wxNotebook* pNotebook) :
++CViewProjects::CViewProjects(wxNotebook* const pNotebook) :
+ CBOINCBaseView(pNotebook, ID_TASK_PROJECTSVIEW, DEFAULT_TASK_FLAGS, ID_LIST_PROJECTSVIEW, DEFAULT_LIST_MULTI_SEL_FLAGS)
+ {
+ CTaskItemGroup* pGroup = NULL;
+@@ -239,29 +239,29 @@
+ }
+
+
+-wxString& CViewProjects::GetViewName() {
++wxString& CViewProjects::GetViewName() const {
+ static wxString strViewName(wxT("Projects"));
+ return strViewName;
+ }
+
+
+-wxString& CViewProjects::GetViewDisplayName() {
++wxString& CViewProjects::GetViewDisplayName() const {
+ static wxString strViewName(_("Projects"));
+ return strViewName;
+ }
+
+
+-const char** CViewProjects::GetViewIcon() {
++const char** CViewProjects::GetViewIcon() const {
+ return proj_xpm;
+ }
+
+
+-const int CViewProjects::GetViewCurrentViewPage() {
++int CViewProjects::GetViewCurrentViewPage() const {
+ return VW_PROJ;
+ }
+
+
+-wxString CViewProjects::GetKeyValue1(int iRowIndex) {
++wxString CViewProjects::GetKeyValue1(const int iRowIndex) const {
+ CProject* project;
+
+ if (GetProjectCacheAtIndex(project, m_iSortedIndexes[iRowIndex])) {
+@@ -272,7 +272,7 @@
+ }
+
+
+-int CViewProjects::FindRowIndexByKeyValues(wxString& key1, wxString&) {
++int CViewProjects::FindRowIndexByKeyValues(const wxString& key1, const wxString&) const {
+ CProject* project;
+ unsigned int iRowIndex, n = GetCacheCount();
+ for(iRowIndex=0; iRowIndex < n; iRowIndex++) {
+@@ -564,7 +564,7 @@
+ }
+
+
+-wxString CViewProjects::OnListGetItemText(long item, long column) const {
++wxString CViewProjects::OnListGetItemText(const long item, const long column) const {
+ CProject* project = NULL;
+ wxString strBuffer = wxEmptyString;
+
+@@ -632,7 +632,7 @@
+ }
+
+
+-wxInt32 CViewProjects::GetCacheCount() {
++wxInt32 CViewProjects::GetCacheCount() const {
+ return (wxInt32)m_ProjectCache.size();
+ }
+
+@@ -649,7 +649,7 @@
+ }
+
+
+-bool CViewProjects::IsSelectionManagementNeeded() {
++bool CViewProjects::IsSelectionManagementNeeded() const {
+ return true;
+ }
+
+@@ -770,7 +770,7 @@
+ }
+
+
+-bool CViewProjects::SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex) {
++bool CViewProjects::SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex) {
+ wxString strDocumentText = wxEmptyString;
+ wxString strDocumentText2 = wxEmptyString;
+ float fDocumentFloat = 0.0;
+@@ -853,7 +853,7 @@
+ }
+
+
+-void CViewProjects::GetDocProjectName(wxInt32 item, wxString& strBuffer) const {
++void CViewProjects::GetDocProjectName(const wxInt32 item, wxString& strBuffer) const {
+ PROJECT* project = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+ std::string project_name;
+@@ -871,7 +871,7 @@
+ }
+
+
+-wxInt32 CViewProjects::FormatProjectName(wxInt32 item, wxString& strBuffer) const {
++wxInt32 CViewProjects::FormatProjectName(const wxInt32 item, wxString& strBuffer) const {
+ CProject* project;
+
+ try {
+@@ -890,7 +890,7 @@
+ }
+
+
+-void CViewProjects::GetDocAccountName(wxInt32 item, wxString& strBuffer) const {
++void CViewProjects::GetDocAccountName(const wxInt32 item, wxString& strBuffer) const {
+ PROJECT* project = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+@@ -906,7 +906,7 @@
+ }
+
+
+-wxInt32 CViewProjects::FormatAccountName(wxInt32 item, wxString& strBuffer) const {
++wxInt32 CViewProjects::FormatAccountName(const wxInt32 item, wxString& strBuffer) const {
+ CProject* project;
+
+ try {
+@@ -924,7 +924,7 @@
+ }
+
+
+-void CViewProjects::GetDocTeamName(wxInt32 item, wxString& strBuffer) const {
++void CViewProjects::GetDocTeamName(const wxInt32 item, wxString& strBuffer) const {
+ PROJECT* project = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+@@ -940,7 +940,7 @@
+ }
+
+
+-wxInt32 CViewProjects::FormatTeamName(wxInt32 item, wxString& strBuffer) const {
++wxInt32 CViewProjects::FormatTeamName(const wxInt32 item, wxString& strBuffer) const {
+ CProject* project;
+
+ try {
+@@ -959,7 +959,7 @@
+ }
+
+
+-void CViewProjects::GetDocTotalCredit(wxInt32 item, float& fBuffer) const {
++void CViewProjects::GetDocTotalCredit(const wxInt32 item, float& fBuffer) const {
+ PROJECT* project = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+@@ -975,14 +975,14 @@
+ }
+
+
+-wxInt32 CViewProjects::FormatTotalCredit(float fBuffer, wxString& strBuffer) const {
++wxInt32 CViewProjects::FormatTotalCredit(const float fBuffer, wxString& strBuffer) const {
+ strBuffer.Printf(wxT("%0.2f"), fBuffer);
+
+ return 0;
+ }
+
+
+-void CViewProjects::GetDocAVGCredit(wxInt32 item, float& fBuffer) const {
++void CViewProjects::GetDocAVGCredit(const wxInt32 item, float& fBuffer) const {
+ PROJECT* project = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+@@ -998,14 +998,14 @@
+ }
+
+
+-wxInt32 CViewProjects::FormatAVGCredit(float fBuffer, wxString& strBuffer) const {
++wxInt32 CViewProjects::FormatAVGCredit(const float fBuffer, wxString& strBuffer) const {
+ strBuffer.Printf(wxT("%0.2f"), fBuffer);
+
+ return 0;
+ }
+
+
+-void CViewProjects::GetDocResourceShare(wxInt32 item, float& fBuffer) const {
++void CViewProjects::GetDocResourceShare(const wxInt32 item, float& fBuffer) const {
+ PROJECT* project = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+@@ -1021,7 +1021,7 @@
+ }
+
+
+-void CViewProjects::GetDocResourcePercent(wxInt32 item, float& fBuffer) const {
++void CViewProjects::GetDocResourcePercent(const wxInt32 item, float& fBuffer) const {
+ PROJECT* project = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+@@ -1037,13 +1037,13 @@
+ }
+
+
+-wxInt32 CViewProjects::FormatResourceShare(float fBuffer, float fBufferPercent, wxString& strBuffer) const {
++wxInt32 CViewProjects::FormatResourceShare(const float fBuffer, const float fBufferPercent, wxString& strBuffer) const {
+ strBuffer.Printf(wxT("%0.0f (%0.2f%%)"), fBuffer, fBufferPercent);
+
+ return 0;
+ }
+
+-wxString rpc_reason_string_translated(int reason) {
++wxString rpc_reason_string_translated(const int reason) {
+ switch (reason) {
+ case RPC_REASON_USER_REQ: return _("Requested by user");
+ case RPC_REASON_NEED_WORK: return _("To fetch work");
+@@ -1056,7 +1056,7 @@
+ }
+ }
+
+-void CViewProjects::GetDocStatus(wxInt32 item, wxString& strBuffer) const {
++void CViewProjects::GetDocStatus(const wxInt32 item, wxString& strBuffer) const {
+ PROJECT* project = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+@@ -1099,7 +1099,7 @@
+ }
+
+
+-wxInt32 CViewProjects::FormatStatus(wxInt32 item, wxString& strBuffer) const {
++wxInt32 CViewProjects::FormatStatus(const wxInt32 item, wxString& strBuffer) const {
+ CProject* project;
+
+ try {
+@@ -1118,7 +1118,7 @@
+ }
+
+
+-void CViewProjects::GetDocProjectURL(wxInt32 item, wxString& strBuffer) const {
++void CViewProjects::GetDocProjectURL(const wxInt32 item, wxString& strBuffer) const {
+ PROJECT* project = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+@@ -1134,7 +1134,7 @@
+ }
+
+
+-double CViewProjects::GetProgressValue(long item) {
++double CViewProjects::GetProgressValue(const long item) const {
+ CProject* project;
+
+ try {
+@@ -1151,7 +1151,7 @@
+ }
+
+
+-wxString CViewProjects::GetProgressText( long item) {
++wxString CViewProjects::GetProgressText(const long item) const {
+ CProject* project = NULL;
+ wxString strBuffer = wxEmptyString;
+
+@@ -1178,7 +1178,7 @@
+ }
+
+
+-wxInt32 CViewProjects::ConvertWebsiteIndexToLink(wxInt32 iProjectIndex, wxInt32 iWebsiteIndex, wxString& strLink) {
++wxInt32 CViewProjects::ConvertWebsiteIndexToLink(const wxInt32 iProjectIndex, const wxInt32 iWebsiteIndex, wxString& strLink) {
+ strLink.Printf(wxT("web:%d:%d"), iProjectIndex, iWebsiteIndex);
+ return 0;
+ }
+@@ -1202,7 +1202,7 @@
+ }
+
+
+-int CViewProjects::GetProjectCacheAtIndex(CProject*& projectPtr, int index) {
++int CViewProjects::GetProjectCacheAtIndex(CProject*& projectPtr, const int index) const {
+ try {
+ projectPtr = m_ProjectCache.at(index);
+ } catch ( std::out_of_range ) {
+Index: boinc/clientgui/ViewProjects.h
+===================================================================
+--- boinc.orig/clientgui/ViewProjects.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewProjects.h 2011-11-25 22:29:20.000000000 +0100
+@@ -57,13 +57,13 @@
+
+ ~CViewProjects();
+
+- virtual wxString& GetViewName();
+- virtual wxString& GetViewDisplayName();
+- virtual const char** GetViewIcon();
+- virtual const int GetViewCurrentViewPage();
++ virtual wxString& GetViewName() const;
++ virtual wxString& GetViewDisplayName() const;
++ virtual const char** GetViewIcon() const;
++ virtual int GetViewCurrentViewPage() const;
+
+- virtual wxString GetKeyValue1(int iRowIndex);
+- virtual int FindRowIndexByKeyValues(wxString& key1, wxString& key2);
++ virtual wxString GetKeyValue1(const int iRowIndex) const;
++ virtual int FindRowIndexByKeyValues(const wxString& key1, const wxString& key2) const;
+
+ void OnProjectUpdate( wxCommandEvent& event );
+ void OnProjectSuspend( wxCommandEvent& event );
+@@ -79,42 +79,42 @@
+ protected:
+ virtual wxInt32 GetDocCount();
+
+- virtual wxString OnListGetItemText( long item, long column ) const;
++ virtual wxString OnListGetItemText(const long item,const long column ) const;
+ virtual wxInt32 AddCacheElement();
+ virtual wxInt32 EmptyCache();
+- virtual wxInt32 GetCacheCount();
++ virtual wxInt32 GetCacheCount() const;
+ virtual wxInt32 RemoveCacheElement();
+- virtual bool SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex);
++ virtual bool SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex);
+
+- virtual bool IsSelectionManagementNeeded();
++ virtual bool IsSelectionManagementNeeded() const;
+
+ virtual void UpdateSelection();
+
+- void GetDocProjectName(wxInt32 item, wxString& strBuffer) const;
+- wxInt32 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
+- void GetDocAccountName(wxInt32 item, wxString& strBuffer) const;
+- wxInt32 FormatAccountName( wxInt32 item, wxString& strBuffer ) const;
+- void GetDocTeamName(wxInt32 item, wxString& strBuffer) const;
+- wxInt32 FormatTeamName( wxInt32 item, wxString& strBuffer ) const;
+- void GetDocTotalCredit(wxInt32 item, float& fBuffer) const;
+- wxInt32 FormatTotalCredit( float fBuffer, wxString& strBuffer ) const;
+- void GetDocAVGCredit(wxInt32 item, float& fBuffer) const;
+- wxInt32 FormatAVGCredit( float fBuffer, wxString& strBuffer ) const;
+- void GetDocResourceShare(wxInt32 item, float& fBuffer) const;
+- void GetDocResourcePercent(wxInt32 item, float& fBuffer) const;
+- wxInt32 FormatResourceShare( float fBuffer, float fBufferPercent, wxString& strBuffer ) const;
+- void GetDocStatus(wxInt32 item, wxString& strBuffer) const;
+- wxInt32 FormatStatus( wxInt32 item, wxString& strBuffer ) const;
+- void GetDocProjectURL(wxInt32 item, wxString& strBuffer) const;
++ void GetDocProjectName(const wxInt32 item, wxString& strBuffer) const;
++ wxInt32 FormatProjectName(const wxInt32 item, wxString& strBuffer ) const;
++ void GetDocAccountName(const wxInt32 item, wxString& strBuffer) const;
++ wxInt32 FormatAccountName(const wxInt32 item, wxString& strBuffer ) const;
++ void GetDocTeamName(const wxInt32 item, wxString& strBuffer) const;
++ wxInt32 FormatTeamName(const wxInt32 item, wxString& strBuffer ) const;
++ void GetDocTotalCredit(const wxInt32 item, float& fBuffer) const;
++ wxInt32 FormatTotalCredit(const float fBuffer, wxString& strBuffer ) const;
++ void GetDocAVGCredit(const wxInt32 item, float& fBuffer) const;
++ wxInt32 FormatAVGCredit(const float fBuffer, wxString& strBuffer ) const;
++ void GetDocResourceShare(const wxInt32 item, float& fBuffer) const;
++ void GetDocResourcePercent(const wxInt32 item, float& fBuffer) const;
++ wxInt32 FormatResourceShare(const float fBuffer, const float fBufferPercent, wxString& strBuffer ) const;
++ void GetDocStatus(const wxInt32 item, wxString& strBuffer) const;
++ wxInt32 FormatStatus(const wxInt32 item, wxString& strBuffer ) const;
++ void GetDocProjectURL(const wxInt32 item, wxString& strBuffer) const;
+
+- virtual double GetProgressValue(long item);
+- virtual wxString GetProgressText( long item);
++ virtual double GetProgressValue(const long item) const;
++ virtual wxString GetProgressText(const long item) const;
+
+ bool IsWebsiteLink( const wxString& strLink );
+- wxInt32 ConvertWebsiteIndexToLink( wxInt32 iProjectIndex, wxInt32 iWebsiteIndex, wxString& strLink );
++ wxInt32 ConvertWebsiteIndexToLink(const wxInt32 iProjectIndex, const wxInt32 iWebsiteIndex, wxString& strLink );
+ wxInt32 ConvertLinkToWebsiteIndex( const wxString& strLink, wxInt32& iProjectIndex, wxInt32& iWebsiteIndex );
+
+- int GetProjectCacheAtIndex(CProject*& projectPtr, int index);
++ int GetProjectCacheAtIndex(CProject*& projectPtr, const int index) const;
+
+ DECLARE_EVENT_TABLE()
+ };
+Index: boinc/clientgui/ViewResources.cpp
+===================================================================
+--- boinc.orig/clientgui/ViewResources.cpp 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewResources.cpp 2011-11-25 21:57:13.000000000 +0100
+@@ -42,7 +42,7 @@
+ CViewResources::CViewResources()
+ {}
+
+-CViewResources::CViewResources(wxNotebook* pNotebook) :
++CViewResources::CViewResources(wxNotebook* const pNotebook) :
+ CBOINCBaseView(pNotebook)
+ {
+ m_BOINCwasEmpty=false;
+@@ -108,29 +108,29 @@
+ }
+
+
+-wxString& CViewResources::GetViewName() {
++wxString& CViewResources::GetViewName() const {
+ static wxString strViewName(wxT("Disk"));
+ return strViewName;
+ }
+
+
+-wxString& CViewResources::GetViewDisplayName() {
++wxString& CViewResources::GetViewDisplayName() const {
+ static wxString strViewName(_("Disk"));
+ return strViewName;
+ }
+
+
+-const char** CViewResources::GetViewIcon() {
++const char** CViewResources::GetViewIcon() const {
+ return usage_xpm;
+ }
+
+
+-const int CViewResources::GetViewRefreshRate() {
++int CViewResources::GetViewRefreshRate() const {
+ return 10;
+ }
+
+
+-const int CViewResources::GetViewCurrentViewPage() {
++int CViewResources::GetViewCurrentViewPage() const {
+ return VW_DISK;
+ }
+
+@@ -140,7 +140,7 @@
+ }
+
+
+-wxInt32 CViewResources::FormatProjectName(PROJECT* project, wxString& strBuffer) const {
++wxInt32 CViewResources::FormatProjectName(const PROJECT* const project, wxString& strBuffer) const {
+ CMainDocument* doc = wxGetApp().GetDocument();
+ std::string project_name;
+
+@@ -159,11 +159,11 @@
+ }
+
+
+-bool CViewResources::OnSaveState(wxConfigBase* /*pConfig*/) {
++bool CViewResources::OnSaveState(wxConfigBase* const WXUNUSED(pConfig)) {
+ return true;
+ }
+
+-bool CViewResources::OnRestoreState(wxConfigBase* /*pConfig*/) {
++bool CViewResources::OnRestoreState(wxConfigBase* const WXUNUSED(pConfig)) {
+ return true;
+ }
+
+@@ -310,7 +310,7 @@
+ }
+ }
+
+-wxInt32 CViewResources::FormatDiskSpace(double bytes, wxString& strBuffer) const {
++wxInt32 CViewResources::FormatDiskSpace(const double bytes, wxString& strBuffer) const {
+ double xTera = 1099511627776.0;
+ double xGiga = 1073741824.0;
+ double xMega = 1048576.0;
+Index: boinc/clientgui/ViewResources.h
+===================================================================
+--- boinc.orig/clientgui/ViewResources.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewResources.h 2011-11-25 00:48:51.000000000 +0100
+@@ -36,15 +36,15 @@
+
+ public:
+ CViewResources();
+- CViewResources(wxNotebook* pNotebook);
++ CViewResources(wxNotebook* const pNotebook);
+
+ ~CViewResources();
+
+- virtual wxString& GetViewName();
+- virtual wxString& GetViewDisplayName();
+- virtual const char** GetViewIcon();
+- virtual const int GetViewRefreshRate();
+- virtual const int GetViewCurrentViewPage();
++ virtual wxString& GetViewName() const;
++ virtual wxString& GetViewDisplayName() const;
++ virtual const char** GetViewIcon() const;
++ virtual int GetViewRefreshRate() const;
++ virtual int GetViewCurrentViewPage() const;
+
+ protected:
+
+@@ -55,12 +55,12 @@
+
+ virtual void UpdateSelection();
+
+- wxInt32 FormatProjectName(PROJECT*, wxString& strBuffer ) const;
+- wxInt32 FormatDiskSpace(double bytes, wxString& strBuffer) const;
++ wxInt32 FormatProjectName(const PROJECT* const project, wxString& strBuffer ) const;
++ wxInt32 FormatDiskSpace(const double bytes, wxString& strBuffer) const;
+
+- virtual bool OnSaveState( wxConfigBase* pConfig );
+- virtual bool OnRestoreState( wxConfigBase* pConfig );
+- virtual void OnListRender( wxTimerEvent& event );
++ virtual bool OnSaveState( wxConfigBase* const pConfig );
++ virtual bool OnRestoreState( wxConfigBase* const pConfig );
++ virtual void OnListRender( wxTimerEvent& event );
+ };
+
+
+Index: boinc/clientgui/ViewStatistics.cpp
+===================================================================
+--- boinc.orig/clientgui/ViewStatistics.cpp 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewStatistics.cpp 2011-11-25 21:58:38.000000000 +0100
+@@ -68,7 +68,7 @@
+ // Set USE_MEMORYDC FALSE to aid debugging
+ #define USE_MEMORYDC TRUE
+
+-CPaintStatistics::CPaintStatistics(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name
++CPaintStatistics::CPaintStatistics(wxWindow* const parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name
+ ): wxWindow(parent, id, pos, size, style, name)
+ { m_font_standart = *wxSWISS_FONT;
+ m_font_bold = *wxSWISS_FONT;
+@@ -208,7 +208,7 @@
+ }
+
+
+-static void getTypePoint(int &typePoint, int number) {typePoint = number / 10;}
++static void getTypePoint(int &typePoint, const int number) {typePoint = number / 10;}
+
+ static bool CrossTwoLine(const double X1_1, const double Y1_1, const double X1_2, const double Y1_2,
+ const double X2_1, const double Y2_1, const double X2_2, const double Y2_2,
+@@ -231,7 +231,7 @@
+ }
+ }
+
+-void CPaintStatistics::getDrawColour(wxColour &graphColour, int number) {
++void CPaintStatistics::getDrawColour(wxColour &graphColour, const int number) {
+ switch (number % 10){
+ case 1: graphColour = m_pen_GraphColour01; break;
+ case 2: graphColour = m_pen_GraphColour02; break;
+@@ -417,7 +417,7 @@
+ if (m_WorkSpace_Y_start < 0.0) m_WorkSpace_Y_start = 0.0;
+ }
+ //----Draw Project Head----
+-void CPaintStatistics::DrawProjectHead(wxDC &dc, PROJECT* project1, const wxString head_name_last){
++void CPaintStatistics::DrawProjectHead(wxDC &dc, const PROJECT* const project1, const wxString head_name_last){
+ wxCoord w_temp = 0, h_temp = 0, des_temp = 0, lead_temp = 0;
+ wxString head_name = wxT("");
+ wxCoord x0 = 0;
+@@ -485,7 +485,7 @@
+ }
+ }
+ //----Draw Legend----
+-void CPaintStatistics::DrawLegend(wxDC &dc, PROJECTS* proj, CMainDocument* pDoc, int SelProj, bool bColour, int &m_Legend_Shift){
++void CPaintStatistics::DrawLegend(wxDC &dc, PROJECTS* proj, const CMainDocument* const pDoc, int SelProj, bool bColour, int &m_Legend_Shift){
+ wxString head_name = wxT("0");
+ wxCoord project_name_max_width = 0;
+ const double radius1 = 5;
+@@ -1931,7 +1931,7 @@
+ CViewStatistics::CViewStatistics()
+ {}
+
+-CViewStatistics::CViewStatistics(wxNotebook* pNotebook) :
++CViewStatistics::CViewStatistics(wxNotebook* const pNotebook) :
+ CBOINCBaseView(pNotebook)
+ {
+ CTaskItemGroup* pGroup = NULL;
+@@ -2061,25 +2061,25 @@
+ #endif
+ }
+
+-wxString& CViewStatistics::GetViewName() {
++wxString& CViewStatistics::GetViewName() const {
+ static wxString strViewName(wxT("Statistics"));
+ return strViewName;
+ }
+
+-wxString& CViewStatistics::GetViewDisplayName() {
++wxString& CViewStatistics::GetViewDisplayName() const {
+ static wxString strViewName(_("Statistics"));
+ return strViewName;
+ }
+
+-const char** CViewStatistics::GetViewIcon() {
++const char** CViewStatistics::GetViewIcon() const {
+ return stats_xpm;
+ }
+
+-const int CViewStatistics::GetViewRefreshRate() {
++int CViewStatistics::GetViewRefreshRate() const {
+ return 60;
+ }
+
+-const int CViewStatistics::GetViewCurrentViewPage() {
++int CViewStatistics::GetViewCurrentViewPage() const {
+ return VW_STAT;
+ }
+
+@@ -2311,7 +2311,7 @@
+ wxLogTrace(wxT("Function Start/End"), wxT("CViewStatistics::OnShowHideProjectList - Function End"));
+ }
+
+-bool CViewStatistics::OnSaveState(wxConfigBase* pConfig) {
++bool CViewStatistics::OnSaveState(wxConfigBase* const pConfig) {
+ bool bReturnValue = true;
+
+ wxASSERT(pConfig);
+@@ -2339,7 +2339,7 @@
+ return bReturnValue;
+ }
+
+-bool CViewStatistics::OnRestoreState(wxConfigBase* pConfig) {
++bool CViewStatistics::OnRestoreState(wxConfigBase* const pConfig) {
+ wxASSERT(pConfig);
+ wxASSERT(m_pTaskPane);
+
+Index: boinc/clientgui/ViewStatistics.h
+===================================================================
+--- boinc.orig/clientgui/ViewStatistics.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewStatistics.h 2011-11-25 21:58:52.000000000 +0100
+@@ -29,15 +29,15 @@
+ {
+ public:
+ CPaintStatistics();
+- CPaintStatistics(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel"));
++ CPaintStatistics(wxWindow* const parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel"));
+
+ ~CPaintStatistics();
+
+ void DrawMainHead(wxDC &dc, const wxString head_name);
+
+- void DrawProjectHead(wxDC &dc, PROJECT* project1, const wxString head_name_last);
++ void DrawProjectHead(wxDC &dc, const PROJECT* const project1, const wxString head_name_last);
+
+- void DrawLegend(wxDC &dc, PROJECTS* proj, CMainDocument* pDoc, int SelProj, bool bColour, int &m_Legend_Shift);
++ void DrawLegend(wxDC &dc, PROJECTS* proj, const CMainDocument* const pDoc, int SelProj, bool bColour, int &m_Legend_Shift);
+
+ void DrawAxis(wxDC &dc, const double max_val_y, const double min_val_y, const double max_val_x, const double min_val_x, wxColour pen_AxisColour, const double max_val_y_all, const double min_val_y_all);
+
+@@ -47,7 +47,7 @@
+
+ void DrawMarker(wxDC &dc);
+
+- void getDrawColour(wxColour &graphColour, int number);
++ void getDrawColour(wxColour &graphColour, const int number);
+
+ void ClearXY();
+
+@@ -218,15 +218,15 @@
+
+ public:
+ CViewStatistics();
+- CViewStatistics(wxNotebook* pNotebook);
++ CViewStatistics(wxNotebook* const pNotebook);
+
+ ~CViewStatistics();
+
+- virtual wxString& GetViewName();
+- virtual wxString& GetViewDisplayName();
+- virtual const char** GetViewIcon();
+- virtual const int GetViewRefreshRate();
+- virtual const int GetViewCurrentViewPage();
++ virtual wxString& GetViewName() const;
++ virtual wxString& GetViewDisplayName() const;
++ virtual const char** GetViewIcon() const;
++ virtual int GetViewRefreshRate() const;
++ virtual int GetViewCurrentViewPage() const;
+
+ void OnStatisticsUserTotal( wxCommandEvent& event );
+ void OnStatisticsUserAverage( wxCommandEvent& event );
+@@ -251,8 +251,8 @@
+ EventHandlerRef m_pStatisticsAccessibilityEventHandlerRef;
+ #endif
+
+- virtual bool OnSaveState( wxConfigBase* pConfig );
+- virtual bool OnRestoreState( wxConfigBase* pConfig );
++ virtual bool OnSaveState( wxConfigBase* const pConfig );
++ virtual bool OnRestoreState( wxConfigBase* const pConfig );
+
+ virtual void OnListRender( wxTimerEvent& event );
+
+Index: boinc/clientgui/ViewTransfers.cpp
+===================================================================
+--- boinc.orig/clientgui/ViewTransfers.cpp 2011-10-08 14:11:56.000000000 +0200
++++ boinc/clientgui/ViewTransfers.cpp 2011-11-25 22:24:40.000000000 +0100
+@@ -77,7 +77,7 @@
+
+ static CViewTransfers* MyCViewTransfers;
+
+-static bool CompareViewTransferItems(int iRowIndex1, int iRowIndex2) {
++static bool CompareViewTransferItems(const int iRowIndex1, const int iRowIndex2) {
+ CTransfer* transfer1;
+ CTransfer* transfer2;
+ int result = 0;
+@@ -143,7 +143,7 @@
+ {}
+
+
+-CViewTransfers::CViewTransfers(wxNotebook* pNotebook) :
++CViewTransfers::CViewTransfers(wxNotebook* const pNotebook) :
+ CBOINCBaseView(pNotebook, ID_TASK_TRANSFERSVIEW, DEFAULT_TASK_FLAGS, ID_LIST_TRANSFERSVIEW, DEFAULT_LIST_MULTI_SEL_FLAGS)
+ {
+ CTaskItemGroup* pGroup = NULL;
+@@ -202,29 +202,29 @@
+ }
+
+
+-wxString& CViewTransfers::GetViewName() {
++wxString& CViewTransfers::GetViewName() const {
+ static wxString strViewName(wxT("Transfers"));
+ return strViewName;
+ }
+
+
+-wxString& CViewTransfers::GetViewDisplayName() {
++wxString& CViewTransfers::GetViewDisplayName() const {
+ static wxString strViewName(_("Transfers"));
+ return strViewName;
+ }
+
+
+-const char** CViewTransfers::GetViewIcon() {
++const char** CViewTransfers::GetViewIcon() const {
+ return xfer_xpm;
+ }
+
+
+-const int CViewTransfers::GetViewCurrentViewPage() {
++int CViewTransfers::GetViewCurrentViewPage() const {
+ return VW_XFER;
+ }
+
+
+-wxString CViewTransfers::GetKeyValue1(int iRowIndex) {
++wxString CViewTransfers::GetKeyValue1(const int iRowIndex) const {
+ CTransfer* transfer;
+
+ if (GetTransferCacheAtIndex(transfer, m_iSortedIndexes[iRowIndex])) {
+@@ -235,7 +235,7 @@
+ }
+
+
+-wxString CViewTransfers::GetKeyValue2(int iRowIndex) {
++wxString CViewTransfers::GetKeyValue2(const int iRowIndex) const {
+ CTransfer* transfer;
+
+ if (GetTransferCacheAtIndex(transfer, m_iSortedIndexes[iRowIndex])) {
+@@ -246,7 +246,7 @@
+ }
+
+
+-int CViewTransfers::FindRowIndexByKeyValues(wxString& key1, wxString& key2) {
++int CViewTransfers::FindRowIndexByKeyValues(const wxString& key1, const wxString& key2) const {
+ CTransfer* transfer;
+ unsigned int iRowIndex, n = GetCacheCount();
+ for(iRowIndex=0; iRowIndex < n; iRowIndex++) {
+@@ -369,7 +369,7 @@
+ }
+
+
+-wxString CViewTransfers::OnListGetItemText(long item, long column) const {
++wxString CViewTransfers::OnListGetItemText(const long item, const long column) const {
+ CTransfer* transfer;
+ wxString strBuffer = wxEmptyString;
+
+@@ -437,7 +437,7 @@
+ }
+
+
+-wxInt32 CViewTransfers::GetCacheCount() {
++wxInt32 CViewTransfers::GetCacheCount() const {
+ return (wxInt32)m_TransferCache.size();
+ }
+
+@@ -454,7 +454,7 @@
+ }
+
+
+-bool CViewTransfers::IsSelectionManagementNeeded() {
++bool CViewTransfers::IsSelectionManagementNeeded() const {
+ return true;
+ }
+
+@@ -474,7 +474,7 @@
+ }
+
+
+-bool CViewTransfers::SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex) {
++bool CViewTransfers::SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex) {
+ wxString strDocumentText = wxEmptyString;
+ wxString strDocumentText2 = wxEmptyString;
+ float fDocumentFloat = 0.0;
+@@ -554,47 +554,48 @@
+ }
+
+
+-void CViewTransfers::GetDocProjectName(wxInt32 item, wxString& strBuffer) const {
++int CViewTransfers::GetDocProjectName(const wxInt32 item, wxString& strBuffer) const {
+ FILE_TRANSFER* transfer = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+- if (pDoc) {
+- transfer = pDoc->file_transfer(item);
+- }
++ if (!pDoc) return -1;
++ transfer = pDoc->file_transfer(item);
+
+ if (transfer) {
+ strBuffer = HtmlEntityDecode(wxString(transfer->project_name.c_str(), wxConvUTF8));
+ } else {
+ strBuffer = wxEmptyString;
+ }
++
++ return 0;
+ }
+
+
+-void CViewTransfers::GetDocFileName(wxInt32 item, wxString& strBuffer) const {
++int CViewTransfers::GetDocFileName(const wxInt32 item, wxString& strBuffer) const {
+ FILE_TRANSFER* transfer = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+- if (pDoc) {
+- transfer = pDoc->file_transfer(item);
+- }
++ if (!pDoc) return -1;
++ transfer = pDoc->file_transfer(item);
+
+ if (transfer) {
+ strBuffer = wxString(transfer->name.c_str(), wxConvUTF8);
+ } else {
+ strBuffer = wxEmptyString;
+ }
++
++ return 0;
+ }
+
+
+-void CViewTransfers::GetDocProgress(wxInt32 item, float& fBuffer) const {
++int CViewTransfers::GetDocProgress(const wxInt32 item, float& fBuffer) const {
+ float fBytesSent = 0;
+ float fFileSize = 0;
+ FILE_TRANSFER* transfer = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+- if (pDoc) {
+- transfer = pDoc->file_transfer(item);
+- }
++ if (!pDoc) return -1;
++ transfer = pDoc->file_transfer(item);
+
+ fBuffer = 0;
+ if (transfer) {
+@@ -612,48 +613,49 @@
+ if (fFileSize) {
+ fBuffer = floor((fBytesSent / fFileSize) * 10000)/100;
+ }
++
++ return 0;
+ }
+
+
+-wxInt32 CViewTransfers::FormatProgress(float fBuffer, wxString& strBuffer) const {
++wxInt32 CViewTransfers::FormatProgress(const float fBuffer, wxString& strBuffer) const {
+ strBuffer.Printf(wxT("%.2f%%"), fBuffer);
+ return 0;
+ }
+
+
+-void CViewTransfers::GetDocBytesXferred(wxInt32 item, double& fBuffer) const {
++int CViewTransfers::GetDocBytesXferred(const wxInt32 item, double& fBuffer) const {
+ FILE_TRANSFER* transfer = NULL;
++ fBuffer = 0.0;
++
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+- if (pDoc) {
+- transfer = pDoc->file_transfer(item);
+- }
++ if (!pDoc) return -1;
++ transfer = pDoc->file_transfer(item);
+
+- if (transfer) {
+- fBuffer = transfer->bytes_xferred;
+- } else {
+- fBuffer = 0.0;
+- }
++ if (!transfer) return -1;
++ fBuffer = transfer->bytes_xferred;
++
++ return 0;
+ }
+
+
+-void CViewTransfers::GetDocTotalBytes(wxInt32 item, double& fBuffer) const {
++int CViewTransfers::GetDocTotalBytes(const wxInt32 item, double& fBuffer) const {
+ FILE_TRANSFER* transfer = NULL;
++ fBuffer = 0.0;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+- if (pDoc) {
+- transfer = pDoc->file_transfer(item);
+- }
++ if (!pDoc) return -1;
++ transfer = pDoc->file_transfer(item);
+
+- if (transfer) {
+- fBuffer = transfer->nbytes;
+- } else {
+- fBuffer = 0.0;
+- }
++ if (!transfer) return -1;
++ fBuffer = transfer->nbytes;
++
++ return 0;
+ }
+
+
+-wxInt32 CViewTransfers::FormatSize(double fBytesSent, double fFileSize, wxString& strBuffer) const {
++wxInt32 CViewTransfers::FormatSize(const double fBytesSent, const double fFileSize, wxString& strBuffer) const {
+ double xTera = 1099511627776.0;
+ double xGiga = 1073741824.0;
+ double xMega = 1048576.0;
+@@ -689,23 +691,23 @@
+ }
+
+
+-void CViewTransfers::GetDocTime(wxInt32 item, double& fBuffer) const {
++int CViewTransfers::GetDocTime(const wxInt32 item, double& fBuffer) const {
+ FILE_TRANSFER* transfer = NULL;
++ fBuffer = 0.0;
++
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+- if (pDoc) {
+- transfer = pDoc->file_transfer(item);
+- }
++ if (!pDoc) return -1;
++ transfer = pDoc->file_transfer(item);
+
+- if (transfer) {
+- fBuffer = transfer->time_so_far;
+- } else {
+- fBuffer = 0.0;
+- }
++ if (!transfer) return -1;
++ fBuffer = transfer->time_so_far;
++
++ return 0;
+ }
+
+
+-wxInt32 CViewTransfers::FormatTime(double fBuffer, wxString& strBuffer) const {
++wxInt32 CViewTransfers::FormatTime(const double fBuffer, wxString& strBuffer) const {
+ wxInt32 iHour = 0;
+ wxInt32 iMin = 0;
+ wxInt32 iSec = 0;
+@@ -723,20 +725,20 @@
+ }
+
+
+-void CViewTransfers::GetDocSpeed(wxInt32 item, double& fBuffer) const {
++int CViewTransfers::GetDocSpeed(const wxInt32 item, double& fBuffer) const {
+ FILE_TRANSFER* transfer = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+- if (pDoc) {
+- transfer = pDoc->file_transfer(item);
+- }
++ if (!pDoc) return -1;
++ transfer = pDoc->file_transfer(item);
+
+- if (transfer) {
+- if (transfer->xfer_active)
+- fBuffer = transfer->xfer_speed / 1024;
+- else
+- fBuffer = 0.0;
+- }
++ if (!transfer) return -1;
++ if (transfer->xfer_active)
++ fBuffer = transfer->xfer_speed / 1024;
++ else
++ fBuffer = 0.0;
++
++ return 0;
+ }
+
+
+@@ -747,21 +749,21 @@
+ }
+
+
+-void CViewTransfers::GetDocStatus(wxInt32 item, wxString& strBuffer) const {
++int CViewTransfers::GetDocStatus(const wxInt32 item, wxString& strBuffer) const {
+ FILE_TRANSFER* transfer = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+ int retval;
+ strBuffer = wxString("", wxConvUTF8);
+
+ transfer = pDoc->file_transfer(item);
+- if (!transfer) return;
++ if (!transfer) return -1;
+ CC_STATUS status;
+
+ wxASSERT(pDoc);
+ wxASSERT(wxDynamicCast(pDoc, CMainDocument));
+
+ retval = pDoc->GetCoreClientStatus(status);
+- if (retval) return;
++ if (retval) return retval;
+
+ wxDateTime dtNextRequest((time_t)transfer->next_request_time);
+ wxDateTime dtNow(wxDateTime::Now());
+@@ -791,26 +793,27 @@
+ FormatTime(transfer->project_backoff, x);
+ strBuffer += _(" (project backoff: ") + x + _(")");
+ }
++ return 0;
+ }
+
+
+-void CViewTransfers::GetDocProjectURL(wxInt32 item, wxString& strBuffer) const {
++int CViewTransfers::GetDocProjectURL(const wxInt32 item, wxString& strBuffer) const {
+ FILE_TRANSFER* transfer = NULL;
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+
+- if (pDoc) {
+- transfer = pDoc->file_transfer(item);
+- }
++ if (!pDoc) return -1;
++ transfer = pDoc->file_transfer(item);
+
+ wxASSERT(transfer);
+
+- if (transfer) {
+- strBuffer = wxString(transfer->project_url.c_str(), wxConvUTF8);
+- }
++ if (!transfer) return -1;
++ strBuffer = wxString(transfer->project_url.c_str(), wxConvUTF8);
++
++ return 0;
+ }
+
+
+-double CViewTransfers::GetProgressValue(long item) {
++double CViewTransfers::GetProgressValue(const long item) const {
+ double fBytesSent = 0;
+ double fFileSize = 0;
+ FILE_TRANSFER* transfer = NULL;
+@@ -838,7 +841,7 @@
+ }
+
+
+-wxString CViewTransfers::GetProgressText( long item) {
++wxString CViewTransfers::GetProgressText(const long item) const {
+ CTransfer* transfer;
+ wxString strBuffer = wxEmptyString;
+
+@@ -850,7 +853,7 @@
+ }
+
+
+-int CViewTransfers::GetTransferCacheAtIndex(CTransfer*& transferPtr, int index) {
++int CViewTransfers::GetTransferCacheAtIndex(CTransfer*& transferPtr, const int index) const {
+ try {
+ transferPtr = m_TransferCache.at(index);
+ } catch ( std::out_of_range ) {
+Index: boinc/clientgui/ViewTransfers.h
+===================================================================
+--- boinc.orig/clientgui/ViewTransfers.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/ViewTransfers.h 2011-11-25 22:23:13.000000000 +0100
+@@ -52,18 +52,18 @@
+
+ public:
+ CViewTransfers();
+- CViewTransfers(wxNotebook* pNotebook);
++ CViewTransfers(wxNotebook* const pNotebook);
+
+ ~CViewTransfers();
+
+- virtual wxString& GetViewName();
+- virtual wxString& GetViewDisplayName();
+- virtual const char** GetViewIcon();
+- virtual const int GetViewCurrentViewPage();
+-
+- virtual wxString GetKeyValue1(int iRowIndex);
+- virtual wxString GetKeyValue2(int iRowIndex);
+- virtual int FindRowIndexByKeyValues(wxString& key1, wxString& key2);
++ virtual wxString& GetViewName() const;
++ virtual wxString& GetViewDisplayName() const;
++ virtual const char** GetViewIcon() const;
++ virtual int GetViewCurrentViewPage() const;
++
++ virtual wxString GetKeyValue1(const int iRowIndex) const;
++ virtual wxString GetKeyValue2(const int iRowIndex) const;
++ virtual int FindRowIndexByKeyValues(const wxString& key1, const wxString& key2) const;
+
+ void OnTransfersRetryNow( wxCommandEvent& event );
+ void OnTransfersAbort( wxCommandEvent& event );
+@@ -73,36 +73,36 @@
+ protected:
+ virtual wxInt32 GetDocCount();
+
+- virtual wxString OnListGetItemText( long item, long column ) const;
++ virtual wxString OnListGetItemText( const long item, const long column ) const;
+
+ virtual wxInt32 AddCacheElement();
+ virtual wxInt32 EmptyCache();
+- virtual wxInt32 GetCacheCount();
++ virtual wxInt32 GetCacheCount() const;
+ virtual wxInt32 RemoveCacheElement();
+- virtual bool SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex);
++ virtual bool SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex);
+
+- virtual bool IsSelectionManagementNeeded();
++ virtual bool IsSelectionManagementNeeded() const;
+
+ virtual void UpdateSelection();
+
+- void GetDocProjectName(wxInt32 item, wxString& strBuffer) const;
+- void GetDocFileName(wxInt32 item, wxString& strBuffer) const;
+- void GetDocProgress(wxInt32 item, float& fBuffer) const;
+- wxInt32 FormatProgress( float fBuffer, wxString& strBuffer ) const;
+- void GetDocBytesXferred(wxInt32 item, double& fBuffer) const;
+- void GetDocTotalBytes(wxInt32 item, double& fBuffer) const;
+- wxInt32 FormatSize( double fBytesSent, double fFileSize, wxString& strBuffer ) const;
+- void GetDocTime(wxInt32 item, double& fBuffer) const;
+- wxInt32 FormatTime( double fBuffer, wxString& strBuffer ) const;
+- void GetDocSpeed(wxInt32 item, double& fBuffer) const;
+- wxInt32 FormatSpeed( double fBuffer, wxString& strBuffer ) const;
+- void GetDocStatus(wxInt32 item, wxString& strBuffer) const;
+- void GetDocProjectURL(wxInt32 item, wxString& strBuffer) const;
++ int GetDocProjectName(const wxInt32 item, wxString& strBuffer) const;
++ int GetDocFileName(const wxInt32 item, wxString& strBuffer) const;
++ int GetDocProgress(const wxInt32 item, float& fBuffer) const;
++ wxInt32 FormatProgress(const float fBuffer, wxString& strBuffer ) const;
++ int GetDocBytesXferred(const wxInt32 item, double& fBuffer) const;
++ int GetDocTotalBytes(const wxInt32 item, double& fBuffer) const;
++ wxInt32 FormatSize( const double fBytesSent, double fFileSize, wxString& strBuffer ) const;
++ int GetDocTime(const wxInt32 item, double& fBuffer) const;
++ wxInt32 FormatTime(const double fBuffer, wxString& strBuffer ) const;
++ int GetDocSpeed(const wxInt32 item, double& fBuffer) const;
++ wxInt32 FormatSpeed(const double fBuffer, wxString& strBuffer ) const;
++ int GetDocStatus(const wxInt32 item, wxString& strBuffer) const;
++ int GetDocProjectURL(const wxInt32 item, wxString& strBuffer) const;
+
+- virtual double GetProgressValue(long item);
+- virtual wxString GetProgressText( long item);
++ virtual double GetProgressValue(const long item) const;
++ virtual wxString GetProgressText( const long item) const;
+
+- int GetTransferCacheAtIndex(CTransfer*& transferPtr, int index);
++ int GetTransferCacheAtIndex(CTransfer*& transferPtr, const int index) const;
+
+ DECLARE_EVENT_TABLE()
+ };
+Index: boinc/clientgui/WelcomePage.cpp
+===================================================================
+--- boinc.orig/clientgui/WelcomePage.cpp 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/WelcomePage.cpp 2011-11-25 00:29:27.000000000 +0100
+@@ -69,7 +69,7 @@
+ {
+ }
+
+-CWelcomePage::CWelcomePage( CBOINCBaseWizard* parent )
++CWelcomePage::CWelcomePage( CBOINCBaseWizard* const parent )
+ {
+ Create( parent );
+ }
+@@ -78,7 +78,7 @@
+ * WizardPage creator
+ */
+
+-bool CWelcomePage::Create( CBOINCBaseWizard* parent )
++bool CWelcomePage::Create( CBOINCBaseWizard* const parent )
+ {
+ ////@begin CWelcomePage member initialisation
+ m_pTitleStaticCtrl = NULL;
+Index: boinc/clientgui/WelcomePage.h
+===================================================================
+--- boinc.orig/clientgui/WelcomePage.h 2011-03-17 18:51:03.000000000 +0100
++++ boinc/clientgui/WelcomePage.h 2011-11-25 00:29:50.000000000 +0100
+@@ -35,10 +35,10 @@
+ /// Constructors
+ CWelcomePage( );
+
+- CWelcomePage( CBOINCBaseWizard* parent );
++ CWelcomePage( CBOINCBaseWizard* const parent );
+
+ /// Creation
+- bool Create( CBOINCBaseWizard* parent );
++ bool Create( CBOINCBaseWizard* const parent );
+
+ /// Creates the controls and sizers
+ void CreateControls();
+Index: boinc/clientgui/WizardAttach.cpp
+===================================================================
+--- boinc.orig/clientgui/WizardAttach.cpp 2011-07-24 19:39:09.000000000 +0200
++++ boinc/clientgui/WizardAttach.cpp 2011-11-25 23:55:51.000000000 +0100
+@@ -80,7 +80,7 @@
+ {
+ }
+
+-CWizardAttach::CWizardAttach( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, long style )
++CWizardAttach::CWizardAttach( wxWindow* const parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const long style )
+ {
+ Create(parent, id, title, pos, style);
+ }
+@@ -89,7 +89,7 @@
+ * CWizardAttach creator
+ */
+
+-bool CWizardAttach::Create( wxWindow* parent, wxWindowID id, const wxString& /* title */, const wxPoint& pos, long style )
++bool CWizardAttach::Create( wxWindow* const parent, const wxWindowID id, const wxString& /* title */, const wxPoint& pos, const long style )
+ {
+
+ ////@begin CWizardAttach member initialisation
+@@ -351,8 +351,8 @@
+ * Runs the wizard.
+ */
+ bool CWizardAttach::Run(
+- wxString& WXUNUSED(strName), wxString& strURL, wxString& strTeamName,
+- bool bCredentialsCached
++ const wxString& WXUNUSED(strName), const wxString& strURL, const wxString& strTeamName,
++ const bool bCredentialsCached
+ ) {
+ m_strTeamName = strTeamName;
+
+@@ -456,7 +456,7 @@
+ * Get bitmap resources
+ */
+
+-wxBitmap CWizardAttach::GetBitmapResource( const wxString& WXUNUSED(name) )
++wxBitmap CWizardAttach::GetBitmapResource( const wxString& WXUNUSED(name) ) const
+ {
+ // Bitmap retrieval
+ ////@begin CWizardAttach bitmap retrieval
+@@ -468,7 +468,7 @@
+ * Get icon resources
+ */
+
+-wxIcon CWizardAttach::GetIconResource( const wxString& WXUNUSED(name) )
++wxIcon CWizardAttach::GetIconResource( const wxString& WXUNUSED(name) ) const
+ {
+ // Icon retrieval
+ ////@begin CWizardAttach icon retrieval
+@@ -480,7 +480,7 @@
+ * Determine if the wizard page has a next page
+ */
+
+-bool CWizardAttach::HasNextPage( wxWizardPageEx* page )
++bool CWizardAttach::HasNextPage( const wxWizardPageEx* const page ) const
+ {
+ bool bNoNextPageDetected = false;
+
+@@ -500,7 +500,7 @@
+ * Determine if the wizard page has a previous page
+ */
+
+-bool CWizardAttach::HasPrevPage( wxWizardPageEx* page )
++bool CWizardAttach::HasPrevPage( const wxWizardPageEx* const page ) const
+ {
+ if ((page == m_WelcomePage) || (page == m_CompletionPage) || (page == m_CompletionErrorPage))
+ return false;
+@@ -534,7 +534,7 @@
+ /*!
+ * Add the page transition to the stack.
+ */
+-wxWizardPageEx* CWizardAttach::_PushPageTransition( wxWizardPageEx* pCurrentPage, unsigned long ulPageID ) {
++wxWizardPageEx* CWizardAttach::_PushPageTransition( wxWizardPageEx* const pCurrentPage, const unsigned long ulPageID ) {
+ if (GetCurrentPage()) {
+ wxWizardPageEx* pPage = NULL;
+
+Index: boinc/clientgui/WizardAttach.h
+===================================================================
+--- boinc.orig/clientgui/WizardAttach.h 2011-07-24 19:39:09.000000000 +0200
++++ boinc/clientgui/WizardAttach.h 2011-11-25 00:35:14.000000000 +0100
+@@ -192,10 +192,10 @@
+ public:
+ /// Constructors
+ CWizardAttach( );
+- CWizardAttach( wxWindow* parent, wxWindowID id = SYMBOL_CWIZARDATTACH_IDNAME, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE );
++ CWizardAttach( wxWindow* const parent, wxWindowID const id = SYMBOL_CWIZARDATTACH_IDNAME, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const long style = wxDEFAULT_DIALOG_STYLE );
+
+ /// Creation
+- bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CWIZARDATTACH_IDNAME, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE );
++ bool Create( wxWindow* const parent, const wxWindowID id = SYMBOL_CWIZARDATTACH_IDNAME, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const long style = wxDEFAULT_DIALOG_STYLE );
+
+ /// Creates the controls and sizers
+ void CreateControls();
+@@ -216,25 +216,25 @@
+
+ /// Runs the wizard.
+ bool Run(
+- wxString& strName,
+- wxString& strURL,
+- wxString& wxString,
+- bool bCredentialsCached = true
++ const wxString& strName,
++ const wxString& strURL,
++ const wxString& wxString,
++ const bool bCredentialsCached = true
+ );
+
+ // Synchronize to Account Manager
+ bool SyncToAccountManager();
+
+ /// Retrieves bitmap resources
+- wxBitmap GetBitmapResource( const wxString& name );
++ wxBitmap GetBitmapResource( const wxString& name ) const;
+
+ /// Retrieves icon resources
+- wxIcon GetIconResource( const wxString& name );
++ wxIcon GetIconResource( const wxString& name ) const;
+ ////@end CWizardAttachProject member function declarations
+
+ /// Overrides
+- virtual bool HasNextPage( wxWizardPageEx* page );
+- virtual bool HasPrevPage( wxWizardPageEx* page );
++ virtual bool HasNextPage( const wxWizardPageEx* const page ) const;
++ virtual bool HasPrevPage( const wxWizardPageEx* const page ) const;
+
+ /// Track page transitions
+ wxWizardPageEx* _PopPageTransition();
+@@ -251,13 +251,13 @@
+ void SetAttachedToProjectSuccessfully(bool value) { attached_to_project_successfully = value ; }
+
+ wxString GetProjectName() const { return m_strProjectName ; }
+- void SetProjectName(wxString value) { m_strProjectName = value ; }
++ void SetProjectName(const wxString value) { m_strProjectName = value ; }
+
+ wxString GetProjectURL() const { return m_strProjectUrl ; }
+- void SetProjectURL(wxString value) { m_strProjectUrl = value ; }
++ void SetProjectURL(const wxString value) { m_strProjectUrl = value ; }
+
+ wxString GetProjectAuthenticator() const { return m_strProjectAuthenticator ; }
+- void SetProjectAuthenticator(wxString value) { m_strProjectAuthenticator = value ; }
++ void SetProjectAuthenticator(const wxString value) { m_strProjectAuthenticator = value ; }
+
+ /// Should we show tooltips?
+ static bool ShowToolTips();
+Index: boinc/lib/gui_rpc_client.h
+===================================================================
+--- boinc.orig/lib/gui_rpc_client.h 2011-11-14 01:15:55.000000000 +0100
++++ boinc/lib/gui_rpc_client.h 2011-11-25 22:01:42.000000000 +0100
+@@ -385,13 +385,13 @@
+ CC_STATE();
+ ~CC_STATE();
+
+- PROJECT* lookup_project(const char* const url);
+- APP* lookup_app(const PROJECT* const, const char* const name);
+- APP_VERSION* lookup_app_version(const PROJECT* const, const APP* const, int, const char* const plan_class);
+- APP_VERSION* lookup_app_version_old(const PROJECT* const, const APP* const, int);
+- WORKUNIT* lookup_wu(const PROJECT* const, const char* const name);
+- RESULT* lookup_result(const PROJECT* const, const char* const name);
+- RESULT* lookup_result(const char* const url, const char* const name);
++ PROJECT* lookup_project(const char* const url) const;
++ APP* lookup_app(const PROJECT* const, const char* const name) const;
++ APP_VERSION* lookup_app_version(const PROJECT* const, const APP* const, int, const char* const plan_class) const;
++ APP_VERSION* lookup_app_version_old(const PROJECT* const, const APP* const, int) const;
++ WORKUNIT* lookup_wu(const PROJECT* const, const char* const name) const;
++ RESULT* lookup_result(const PROJECT* const, const char* const name) const;
++ RESULT* lookup_result(const char* const url, const char* const name) const;
+
+ void print();
+ void clear();
+Index: boinc/lib/gui_rpc_client_ops.cpp
+===================================================================
+--- boinc.orig/lib/gui_rpc_client_ops.cpp 2011-11-14 01:14:41.000000000 +0100
++++ boinc/lib/gui_rpc_client_ops.cpp 2011-11-25 22:03:08.000000000 +0100
+@@ -908,7 +908,7 @@
+ have_ati = false;
+ }
+
+-PROJECT* CC_STATE::lookup_project(const char* const url) {
++PROJECT* CC_STATE::lookup_project(const char* const url) const {
+ unsigned int i;
+ for (i=0; i<projects.size(); i++) {
+ if (!strcmp(projects[i]->master_url, url)) return projects[i];
+@@ -916,7 +916,7 @@
+ return 0;
+ }
+
+-APP* CC_STATE::lookup_app(const PROJECT* const project, const char* const name) {
++APP* CC_STATE::lookup_app(const PROJECT* const project, const char* const name) const {
+ unsigned int i;
+ for (i=0; i<apps.size(); i++) {
+ if (apps[i]->project != project) continue;
+@@ -927,7 +927,7 @@
+
+ APP_VERSION* CC_STATE::lookup_app_version(
+ const PROJECT* const project, const APP* const app, const int version_num, const char* const plan_class
+-) {
++) const {
+ unsigned int i;
+ for (i=0; i<app_versions.size(); i++) {
+ if (app_versions[i]->project != project) continue;
+@@ -941,7 +941,7 @@
+
+ APP_VERSION* CC_STATE::lookup_app_version_old(
+ const PROJECT* const project, const APP* const app, const int version_num
+-) {
++) const {
+ unsigned int i;
+ for (i=0; i<app_versions.size(); i++) {
+ if (app_versions[i]->project != project) continue;
+@@ -952,7 +952,7 @@
+ return 0;
+ }
+
+-WORKUNIT* CC_STATE::lookup_wu(const PROJECT* const project, const char* const name) {
++WORKUNIT* CC_STATE::lookup_wu(const PROJECT* const project, const char* const name) const {
+ unsigned int i;
+ for (i=0; i<wus.size(); i++) {
+ if (wus[i]->project != project) continue;
+@@ -961,7 +961,7 @@
+ return 0;
+ }
+
+-RESULT* CC_STATE::lookup_result(const PROJECT* const project, const char* const name) {
++RESULT* CC_STATE::lookup_result(const PROJECT* const project, const char* const name) const {
+ unsigned int i;
+ for (i=0; i<results.size(); i++) {
+ if (results[i]->project != project) continue;
+@@ -970,7 +970,7 @@
+ return 0;
+ }
+
+-RESULT* CC_STATE::lookup_result(const char* const url, const char* const name) {
++RESULT* CC_STATE::lookup_result(const char* const url, const char* const name) const {
+ unsigned int i;
+ for (i=0; i<results.size(); i++) {
+ if (strcmp(results[i]->project->master_url, url)) continue;
diff --git a/debian/patches/evenMoreConst03.patch b/debian/patches/evenMoreConst03.patch
new file mode 100644
index 0000000..454286f
--- /dev/null
+++ b/debian/patches/evenMoreConst03.patch
@@ -0,0 +1,336 @@
+Index: boinc/lib/str_replace.h
+===================================================================
+--- boinc.orig/lib/str_replace.h 2011-11-26 16:11:07.000000000 +0100
++++ boinc/lib/str_replace.h 2011-11-26 16:11:32.000000000 +0100
+@@ -25,19 +25,19 @@
+ #endif
+
+ #if !HAVE_STRLCPY
+-extern size_t strlcpy(char*, const char*, size_t);
++extern size_t strlcpy(char* const, const char* const, const size_t);
+ #endif
+
+ #if !HAVE_STRLCAT
+-extern size_t strlcat(char *dst, const char *src, size_t size);
++extern size_t strlcat(char *const dst, const char *const src, const size_t size);
+ #endif
+
+ #if !HAVE_STRCASESTR
+-extern const char *strcasestr(const char *s1, const char *s2);
++extern const char *strcasestr(const char *const s1, const char *const s2);
+ #endif
+
+ #if !HAVE_STRCASECMP
+-inline int strcasecmp(const char* s1, const char* s2) {
++inline int strcasecmp(const char* const s1, const char* const s2) {
+ while (*s1 && *s2) {
+ char c1 = tolower(*s1++);
+ char c2 = tolower(*s2++);
+Index: boinc/lib/str_util.cpp
+===================================================================
+--- boinc.orig/lib/str_util.cpp 2011-11-26 16:11:07.000000000 +0100
++++ boinc/lib/str_util.cpp 2011-11-26 16:11:32.000000000 +0100
+@@ -53,7 +53,7 @@
+ // see http://www.gratisoft.us/todd/papers/strlcpy.html
+ //
+ #if !HAVE_STRLCPY
+-size_t strlcpy(char *dst, const char *src, size_t size) {
++size_t strlcpy(char *const dst, const char *const src, const size_t size) {
+ size_t ret = strlen(src);
+
+ if (size) {
+@@ -67,7 +67,7 @@
+ #endif
+
+ #if !HAVE_STRLCAT
+-size_t strlcat(char *dst, const char *src, size_t size) {
++size_t strlcat(char *const dst, const char *const src, const size_t size) {
+ size_t dst_len = strlen(dst);
+ size_t src_len = strlen(src);
+
+@@ -82,7 +82,7 @@
+ #endif // !HAVE_STRLCAT
+
+ #if !HAVE_STRCASESTR
+-const char *strcasestr(const char *s1, const char *s2) {
++const char *strcasestr(const char *const s1, const char *const s2) {
+ char *needle=NULL, *haystack=NULL, *p=NULL;
+ bool need_free = false;
+ // Is alloca() really less likely to fail with out of memory error
+@@ -152,7 +152,7 @@
+ // unit of time division used
+ // smallest_timescale: 0=seconds, 1=minutes, 2=hours, 3=days, 4=years
+ //
+-int ndays_to_string (double x, int smallest_timescale, char *buf) {
++int ndays_to_string (const double x, const int smallest_timescale, char *const buf) {
+ double years, days, hours, minutes, seconds;
+ char year_buf[64], day_buf[16], hour_buf[16], min_buf[16], sec_buf[16];
+
+@@ -214,7 +214,7 @@
+ // Convert nbytes into a string. If total_bytes is non-zero,
+ // convert the two into a fractional display (i.e. 4/16 KB)
+ //
+-void nbytes_to_string(double nbytes, double total_bytes, char* str, int len) {
++void nbytes_to_string(const double nbytes, const double total_bytes, char* const str, int const len) {
+ char buf[256];
+ double xTera = (1024.0*1024.0*1024.0*1024.0);
+ double xGiga = (1024.0*1024.0*1024.0);
+@@ -311,7 +311,7 @@
+
+ // remove whitespace from start and end of a string
+ //
+-void strip_whitespace(char *str) {
++void strip_whitespace(char *const str) {
+ int n;
+ while (1) {
+ if (!str[0]) break;
+@@ -345,7 +345,7 @@
+ }
+ }
+
+-char* time_to_string(double t) {
++char* time_to_string(const double t) {
+ static char buf[100];
+ time_t x = (time_t)t;
+ struct tm* tm = localtime(&x);
+@@ -372,7 +372,7 @@
+ return buf;
+ }
+
+-string timediff_format(double diff) {
++string timediff_format(const double diff) {
+ char buf[256];
+ int tdiff = (int)diff;
+
+@@ -408,7 +408,7 @@
+ return buf;
+ }
+
+-void mysql_timestamp(double dt, char* p) {
++void mysql_timestamp(const double dt, char* const p) {
+ struct tm* tmp;
+ time_t t = (time_t)dt;
+ tmp = localtime(&t); // MySQL timestamps are in local time
+@@ -421,7 +421,7 @@
+ // Return a text-string description of a given error.
+ // Must be kept consistent with error_numbers.h
+ //
+-const char* boincerror(int which_error) {
++const char* boincerror(const int which_error) {
+ switch (which_error) {
+ case BOINC_SUCCESS: return "Success";
+ case ERR_SELECT: return "select() failed";
+@@ -562,7 +562,7 @@
+ return buf;
+ }
+
+-const char* network_status_string(int n) {
++const char* network_status_string(const int n) {
+ switch (n) {
+ case NETWORK_STATUS_ONLINE: return "online";
+ case NETWORK_STATUS_WANT_CONNECTION: return "need connection";
+@@ -572,7 +572,7 @@
+ }
+ }
+
+-const char* rpc_reason_string(int reason) {
++const char* rpc_reason_string(const int reason) {
+ switch (reason) {
+ case RPC_REASON_USER_REQ: return "Requested by user";
+ case RPC_REASON_NEED_WORK: return "To fetch work";
+@@ -585,7 +585,7 @@
+ }
+ }
+
+-const char* suspend_reason_string(int reason) {
++const char* suspend_reason_string(const int reason) {
+ switch (reason) {
+ case SUSPEND_REASON_BATTERIES: return "on batteries";
+ case SUSPEND_REASON_USER_ACTIVE: return "computer is in use";
+@@ -603,7 +603,7 @@
+ return "unknown reason";
+ }
+
+-const char* run_mode_string(int mode) {
++const char* run_mode_string(const int mode) {
+ switch (mode) {
+ case RUN_MODE_ALWAYS: return "always";
+ case RUN_MODE_AUTO: return "according to prefs";
+@@ -691,8 +691,8 @@
+ // target is string to replace with
+ //
+ int string_substitute(
+- const char* haystack, char* out, int out_len,
+- const char* needle, const char* target
++ const char* const haystack, char* const out, const int out_len,
++ const char* const needle, const char* const target
+ ) {
+ int i=0, j=0;
+ int needle_len = (int)strlen(needle);
+@@ -716,7 +716,7 @@
+ return retval;
+ }
+
+-inline void remove_str(char* p, const char* str) {
++inline void remove_str(char* p, const char* const str) {
+ size_t n = strlen(str);
+ while (1) {
+ p = strstr(p, str);
+@@ -727,7 +727,7 @@
+
+ // remove _( and ") from string
+ //
+-void strip_translation(char* p) {
++void strip_translation(char* const p) {
+ remove_str(p, "_(\"");
+ remove_str(p, "\")");
+ }
+Index: boinc/lib/str_util.h
+===================================================================
+--- boinc.orig/lib/str_util.h 2011-11-26 16:11:07.000000000 +0100
++++ boinc/lib/str_util.h 2011-11-26 16:11:32.000000000 +0100
+@@ -26,17 +26,17 @@
+ #include <vector>
+
+ extern void strcpy_overlap(char*, const char*);
+-extern int ndays_to_string(double x, int smallest_timescale, char *buf);
+-extern void nbytes_to_string(double nbytes, double total_bytes, char* str, int len);
++extern int ndays_to_string(const double x, const int smallest_timescale, char *const buf);
++extern void nbytes_to_string(const double nbytes, const double total_bytes, char* const str, const int len);
+ extern int parse_command_line(char*, char**);
+ extern void c2x(char *what);
+ extern void strip_whitespace(char *str);
+ extern void strip_whitespace(std::string&);
+ #define safe_strcpy(x, y) strlcpy(x, y, sizeof(x))
+ #define safe_strcat(x, y) if (strlen(x)+strlen(y)<sizeof(x)) strcat(x, y)
+-extern char* time_to_string(double);
++extern char* time_to_string(const double);
+ extern char* precision_time_to_string(double);
+-extern std::string timediff_format(double);
++extern std::string timediff_format(const double);
+
+ inline bool ends_with(std::string const& s, std::string const& suffix) {
+ return
+@@ -62,13 +62,13 @@
+ }
+
+ extern int string_substitute(
+- const char* haystack, char* out, int out_len,
+- const char* needle, const char* target
++ const char* haystack, char* const out, const int out_len,
++ const char* needle, const char* const target
+ );
+
+ // convert UNIX time to MySQL timestamp (yyyymmddhhmmss)
+ //
+-extern void mysql_timestamp(double, char*);
++extern void mysql_timestamp(const double, char* const);
+
+ extern const char* network_status_string(int);
+ extern const char* rpc_reason_string(int);
+Index: boinc/lib/proc_control.cpp
+===================================================================
+--- boinc.orig/lib/proc_control.cpp 2011-10-30 00:27:06.000000000 +0200
++++ boinc/lib/proc_control.cpp 2011-11-26 16:30:40.000000000 +0100
+@@ -45,7 +45,7 @@
+
+ using std::vector;
+
+-static void get_descendants_aux(PROC_MAP& pm, int pid, vector<int>& pids) {
++static void get_descendants_aux(PROC_MAP& pm , const int pid, vector<int>& pids) {
+ PROC_MAP::iterator i = pm.find(pid);
+ if (i == pm.end()) return;
+ PROCINFO& p = i->second;
+@@ -60,7 +60,7 @@
+
+ // return a list of all descendants of the given process
+ //
+-void get_descendants(int pid, vector<int>& pids) {
++void get_descendants(const int pid, vector<int>& pids) {
+ int retval;
+ PROC_MAP pm;
+ pids.clear();
+@@ -85,7 +85,7 @@
+ //
+
+ int suspend_or_resume_threads(
+- DWORD pid, DWORD calling_thread_id, bool resume
++ const DWORD pid, const DWORD calling_thread_id, const bool resume
+ ) {
+ HANDLE threads, thread;
+ static HMODULE hKernel32Lib = NULL;
+@@ -168,7 +168,7 @@
+ #else
+ // Same, but if child_pid is nonzero, give it a chance to exit gracefully on Unix
+ //
+-void kill_descendants(int child_pid) {
++void kill_descendants(const int child_pid) {
+ vector<int> descendants;
+ // on Unix, ask main process nicely.
+ // it descendants still exist after 10 sec, use the nuclear option
+@@ -191,7 +191,7 @@
+ }
+ #endif
+
+-void suspend_or_resume_all(vector<int>& pids, bool resume) {
++void suspend_or_resume_all(vector<int>& pids, const bool resume) {
+ for (unsigned int i=0; i<pids.size(); i++) {
+ #ifdef _WIN32
+ suspend_or_resume_threads(pids[i], 0, resume);
+@@ -206,7 +206,7 @@
+ // suspend/resume the descendants of the given process
+ // (or if pid==0, the calling process)
+ //
+-void suspend_or_resume_descendants(int pid, bool resume) {
++void suspend_or_resume_descendants(int pid, const bool resume) {
+ vector<int> descendants;
+ if (!pid) {
+ #ifdef _WIN32
+@@ -219,7 +219,7 @@
+ suspend_or_resume_all(descendants, resume);
+ }
+
+-void suspend_or_resume_process(int pid, bool resume) {
++void suspend_or_resume_process(const int pid, const bool resume) {
+ #ifdef _WIN32
+ suspend_or_resume_threads(pid, 0, resume);
+ #else
+Index: boinc/lib/proc_control.h
+===================================================================
+--- boinc.orig/lib/proc_control.h 2011-10-30 00:27:06.000000000 +0200
++++ boinc/lib/proc_control.h 2011-11-26 16:31:30.000000000 +0100
+@@ -23,16 +23,16 @@
+ #include <windows.h>
+ #endif
+
+-extern void get_descendants(int pid, std::vector<int>& pids);
++extern void get_descendants(const int pid, std::vector<int>& pids);
+ extern bool any_process_exists(std::vector<int>& pids);
+ extern void kill_all(std::vector<int>& pids);
+ #ifdef _WIN32
+ extern void kill_descendants();
+-extern int suspend_or_resume_threads(DWORD pid, DWORD threadid, bool resume);
++extern int suspend_or_resume_threads(const DWORD pid, const DWORD threadid, const bool resume);
+ #else
+-extern void kill_descendants(int child_pid=0);
++extern void kill_descendants(const int child_pid=0);
+ #endif
+-extern void suspend_or_resume_descendants(int pid, bool resume);
+-extern void suspend_or_resume_process(int pid, bool resume);
++extern void suspend_or_resume_descendants(int pid, const bool resume);
++extern void suspend_or_resume_process(const int pid, const bool resume);
+
+ #endif
+Index: boinc/lib/procinfo.cpp
+===================================================================
+--- boinc.orig/lib/procinfo.cpp 2011-10-08 14:11:56.000000000 +0200
++++ boinc/lib/procinfo.cpp 2011-11-26 16:22:39.000000000 +0100
+@@ -64,7 +64,7 @@
+ }
+ }
+
+-static inline bool in_vector(int n, vector<int>& v) {
++static inline bool in_vector(const int n, const vector<int>& v) {
+ for (unsigned int i=0; i<v.size(); i++) {
+ if (n == v[i]) return true;
+ }
--
BOINC packaging
More information about the pkg-boinc-commits
mailing list