diff --git a/clientgui/BOINCBaseView.cpp b/clientgui/BOINCBaseView.cpp index 84fe776280..df72ba4955 100644 --- a/clientgui/BOINCBaseView.cpp +++ b/clientgui/BOINCBaseView.cpp @@ -105,8 +105,9 @@ CBOINCBaseView::~CBOINCBaseView() {} // The user friendly name of the view. // If it has not been defined by the view "Undefined" is returned. // -wxString CBOINCBaseView::GetViewName() { - return wxString(wxT("Undefined")); +wxString& CBOINCBaseView::GetViewName() { + static wxString strViewName(wxT("Undefined")); + return strViewName; } diff --git a/clientgui/BOINCBaseView.h b/clientgui/BOINCBaseView.h index 2b4ec35ba2..c1b6eab717 100644 --- a/clientgui/BOINCBaseView.h +++ b/clientgui/BOINCBaseView.h @@ -90,7 +90,7 @@ public: ~CBOINCBaseView(); - virtual wxString GetViewName(); + virtual wxString& GetViewName(); virtual const char** GetViewIcon(); bool FireOnSaveState( wxConfigBase* pConfig ); diff --git a/clientgui/ViewMessages.cpp b/clientgui/ViewMessages.cpp index a1ecbfa34b..5e3e0ec8dc 100644 --- a/clientgui/ViewMessages.cpp +++ b/clientgui/ViewMessages.cpp @@ -120,7 +120,7 @@ CViewMessages::~CViewMessages() { } -wxString CViewMessages::GetViewName() { +wxString& CViewMessages::GetViewName() { static wxString strViewName(_("Messages")); return strViewName; } diff --git a/clientgui/ViewMessages.h b/clientgui/ViewMessages.h index a2d258d3a3..3827947bee 100644 --- a/clientgui/ViewMessages.h +++ b/clientgui/ViewMessages.h @@ -38,7 +38,7 @@ public: ~CViewMessages(); - virtual wxString GetViewName(); + virtual wxString& GetViewName(); virtual const char** GetViewIcon(); void OnMessagesCopyAll( wxCommandEvent& event ); diff --git a/clientgui/ViewProjects.cpp b/clientgui/ViewProjects.cpp index b119d55ac1..47ab00f29f 100644 --- a/clientgui/ViewProjects.cpp +++ b/clientgui/ViewProjects.cpp @@ -189,7 +189,7 @@ CViewProjects::~CViewProjects() { } -wxString CViewProjects::GetViewName() { +wxString& CViewProjects::GetViewName() { static wxString strViewName(_("Projects")); return strViewName; } diff --git a/clientgui/ViewProjects.h b/clientgui/ViewProjects.h index 45ff824836..467ebfab5c 100644 --- a/clientgui/ViewProjects.h +++ b/clientgui/ViewProjects.h @@ -54,7 +54,7 @@ public: ~CViewProjects(); - virtual wxString GetViewName(); + virtual wxString& GetViewName(); virtual const char** GetViewIcon(); void OnProjectUpdate( wxCommandEvent& event ); diff --git a/clientgui/ViewResources.cpp b/clientgui/ViewResources.cpp index 1a9fb037e5..ac38390ee7 100644 --- a/clientgui/ViewResources.cpp +++ b/clientgui/ViewResources.cpp @@ -86,7 +86,7 @@ CViewResources::~CViewResources() { } -wxString CViewResources::GetViewName() { +wxString& CViewResources::GetViewName() { static wxString strViewName(_("Disk")); return strViewName; } diff --git a/clientgui/ViewResources.h b/clientgui/ViewResources.h index 3b8a642116..4364e40208 100644 --- a/clientgui/ViewResources.h +++ b/clientgui/ViewResources.h @@ -49,7 +49,7 @@ public: ~CViewResources(); - virtual wxString GetViewName(); + virtual wxString& GetViewName(); virtual const char** GetViewIcon(); protected: diff --git a/clientgui/ViewStatistics.cpp b/clientgui/ViewStatistics.cpp index 57226cbe7b..cd48347f49 100644 --- a/clientgui/ViewStatistics.cpp +++ b/clientgui/ViewStatistics.cpp @@ -356,7 +356,7 @@ CViewStatistics::~CViewStatistics() { } -wxString CViewStatistics::GetViewName() { +wxString& CViewStatistics::GetViewName() { static wxString strViewName(_("Statistics")); return strViewName; } diff --git a/clientgui/ViewStatistics.h b/clientgui/ViewStatistics.h index 5b13939ccf..db5f942ff1 100644 --- a/clientgui/ViewStatistics.h +++ b/clientgui/ViewStatistics.h @@ -53,7 +53,7 @@ public: ~CViewStatistics(); - virtual wxString GetViewName(); + virtual wxString& GetViewName(); void OnStatisticsUserTotal( wxCommandEvent& event ); void OnStatisticsUserAverage( wxCommandEvent& event ); diff --git a/clientgui/ViewTransfers.cpp b/clientgui/ViewTransfers.cpp index b267e1273e..7b4f4c82e5 100644 --- a/clientgui/ViewTransfers.cpp +++ b/clientgui/ViewTransfers.cpp @@ -130,7 +130,7 @@ CViewTransfers::~CViewTransfers() { } -wxString CViewTransfers::GetViewName() { +wxString& CViewTransfers::GetViewName() { static wxString strViewName(_("Transfers")); return strViewName; } diff --git a/clientgui/ViewTransfers.h b/clientgui/ViewTransfers.h index 4b6eb51765..0d0b6edb63 100644 --- a/clientgui/ViewTransfers.h +++ b/clientgui/ViewTransfers.h @@ -52,7 +52,7 @@ public: ~CViewTransfers(); - virtual wxString GetViewName(); + virtual wxString& GetViewName(); virtual const char** GetViewIcon(); void OnTransfersRetryNow( wxCommandEvent& event ); diff --git a/clientgui/ViewWork.cpp b/clientgui/ViewWork.cpp index 58dcf0f03a..e6a5711bbf 100644 --- a/clientgui/ViewWork.cpp +++ b/clientgui/ViewWork.cpp @@ -141,7 +141,7 @@ CViewWork::~CViewWork() { } -wxString CViewWork::GetViewName() { +wxString& CViewWork::GetViewName() { static wxString strViewName(_("Work")); return strViewName; } diff --git a/clientgui/ViewWork.h b/clientgui/ViewWork.h index 4fd26f81aa..b4eac60827 100644 --- a/clientgui/ViewWork.h +++ b/clientgui/ViewWork.h @@ -55,7 +55,7 @@ public: ~CViewWork(); - virtual wxString GetViewName(); + virtual wxString& GetViewName(); virtual const char** GetViewIcon(); void OnWorkSuspend( wxCommandEvent& event );