From d5ef54221e728a40587a54eb22288ef457a71519 Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Sun, 22 Jan 2017 05:21:08 +0200 Subject: [PATCH 1/8] MGR: Add dummy version check. It seems that this check will work if the client will check newer file version on start. Client will check this even the last check was more that 14 days ago and on start only. Client newer saves this information in its internal files and never reread 'get_current_version.xml' between checks. In any other cases result will be empty. --- clientgui/MainDocument.cpp | 16 ++++++++++++++++ clientgui/MainDocument.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index 3483b9169d..fca4b92d59 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -164,6 +164,7 @@ void CNetworkConnection::Poll() { if (!retval) { wxLogTrace(wxT("Function Status"), wxT("CNetworkConnection::Poll - Connection Success")); SetStateSuccess(m_strNewComputerName, m_strNewComputerPassword); + m_pDocument->CheckForVersionUpdate(); } else if (ERR_AUTHENTICATOR == retval) { wxLogTrace(wxT("Function Status"), wxT("CNetworkConnection::Poll - RPC Authorization - ERR_AUTHENTICATOR")); SetStateErrorAuthentication(); @@ -1278,6 +1279,21 @@ bool CMainDocument::IsUserAuthorized() { return true; } +void CMainDocument::CheckForVersionUpdate() { + std::string version, url; + // It seems that this check will work if the client will check newer file version on start. + // Client will check this even the last check was more that 14 days ago and on start only. + // Client newer saves this information in its internal files + // and never reread 'get_current_version.xml' between checks. + // In any other cases result will be empty. + rpc.get_newer_version(version, url); + + if (!version.empty() && !url.empty()) { + char message[MAXPATHLEN]; + snprintf(message, sizeof(message), "%s: %s", wxT("You can download it here"), url); + wxGetApp().SafeMessageBox(message, wxT("A new version of BOINC is available.")); + } +} int CMainDocument::CachedProjectStatusUpdate(bool bForce) { int i = 0; diff --git a/clientgui/MainDocument.h b/clientgui/MainDocument.h index 90c10b5d9d..de5fb71592 100644 --- a/clientgui/MainDocument.h +++ b/clientgui/MainDocument.h @@ -167,6 +167,8 @@ public: bool IsUserAuthorized(); + void CheckForVersionUpdate(); + CNetworkConnection* m_pNetworkConnection; CBOINCClientManager* m_pClientManager; AsyncRPC rpc; From e63d579fbc25a14cfe50a77e3b9406bc6667c6fb Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Sun, 22 Jan 2017 16:28:58 +0200 Subject: [PATCH 2/8] MGR: Version check. Remove unuseful comment. --- clientgui/MainDocument.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index fca4b92d59..17dabb2865 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -1281,11 +1281,6 @@ bool CMainDocument::IsUserAuthorized() { void CMainDocument::CheckForVersionUpdate() { std::string version, url; - // It seems that this check will work if the client will check newer file version on start. - // Client will check this even the last check was more that 14 days ago and on start only. - // Client newer saves this information in its internal files - // and never reread 'get_current_version.xml' between checks. - // In any other cases result will be empty. rpc.get_newer_version(version, url); if (!version.empty() && !url.empty()) { From 494739b11264e50a685182c70bc036e48bfced70 Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Tue, 24 Jan 2017 02:09:53 +0200 Subject: [PATCH 3/8] client: Version check. Add force version check. --- client/client_state.h | 2 +- client/current_version.cpp | 4 ++-- client/gui_rpc_server_ops.cpp | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/client_state.h b/client/client_state.h index 5fa1ac1708..ee0e1aaa46 100644 --- a/client/client_state.h +++ b/client/client_state.h @@ -238,7 +238,7 @@ struct CLIENT_STATE { // --------------- acct_setup.cpp: PROJECT_INIT project_init; PROJECT_ATTACH project_attach; - void new_version_check(); + void new_version_check(bool force = false); void all_projects_list_check(); double new_version_check_time; double all_projects_list_check_time; diff --git a/client/current_version.cpp b/client/current_version.cpp index 2a7519ac3a..aba94b737a 100644 --- a/client/current_version.cpp +++ b/client/current_version.cpp @@ -140,8 +140,8 @@ void newer_version_startup_check() { #define NEW_VERSION_CHECK_PERIOD (14*86400) -void CLIENT_STATE::new_version_check() { - if ((new_version_check_time == 0) || +void CLIENT_STATE::new_version_check(bool force) { + if (force || (new_version_check_time == 0) || (now - new_version_check_time > NEW_VERSION_CHECK_PERIOD)) { // get_current_version_op.handle_reply() // updates new_version_check_time diff --git a/client/gui_rpc_server_ops.cpp b/client/gui_rpc_server_ops.cpp index 6b34c4a713..f28694d67c 100644 --- a/client/gui_rpc_server_ops.cpp +++ b/client/gui_rpc_server_ops.cpp @@ -996,6 +996,8 @@ static void handle_acct_mgr_rpc_poll(GUI_RPC_CONN& grc) { } static void handle_get_newer_version(GUI_RPC_CONN& grc) { + gstate.new_version_check(true); + grc.mfout.printf( "%s\n" "%s\n", From 8e84ff30b7d29e83c1677a040179b533436b4860 Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Tue, 24 Jan 2017 02:13:06 +0200 Subject: [PATCH 4/8] client: Version check. Fix message about new version. --- client/current_version.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/current_version.cpp b/client/current_version.cpp index aba94b737a..7231666897 100644 --- a/client/current_version.cpp +++ b/client/current_version.cpp @@ -87,15 +87,15 @@ static void show_newer_version_msg(const char* new_vers) { if (cc_config.client_new_version_text.empty()) { msg_printf_notice(0, true, "http://boinc.berkeley.edu/manager_links.php?target=notice&controlid=download", - "%s (%s) %s", - _("A new version of BOINC is available."), + "%s (%s). %s", + _("A new version of BOINC is available"), new_vers, cc_config.client_download_url.c_str(), _("Download") ); } else { msg_printf_notice(0, true, NULL, - "%s (%s) %s", + "%s (%s). %s", cc_config.client_new_version_text.c_str(), new_vers, cc_config.client_download_url.c_str(), From 1d88771e368e4d6d6883f89a374a3c61b831b1fe Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Wed, 25 Jan 2017 05:41:49 +0200 Subject: [PATCH 5/8] MGR: Version check. Added new menu option 'Help'->'Check for new version'. Fixed XML new version responce parse. --- clientgui/AdvancedFrame.cpp | 41 +++++++++++++++++++++++++++++++++++++ clientgui/AdvancedFrame.h | 1 + clientgui/MainDocument.cpp | 6 ------ lib/gui_rpc_client_ops.cpp | 9 ++++++-- 4 files changed, 49 insertions(+), 8 deletions(-) diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index f4adb299db..5cf8547226 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -196,6 +196,7 @@ BEGIN_EVENT_TABLE (CAdvancedFrame, CBOINCBaseFrame) EVT_MENU(ID_HELPBOINCMANAGER, CAdvancedFrame::OnHelpBOINC) EVT_MENU(ID_HELPBOINCWEBSITE, CAdvancedFrame::OnHelpBOINC) EVT_MENU(wxID_ABOUT, CAdvancedFrame::OnHelpAbout) + EVT_MENU(wxID_CHECK_VERSION, CAdvancedFrame::OnCheckVersion) EVT_HELP(wxID_ANY, CAdvancedFrame::OnHelp) // Custom Events & Timers EVT_FRAME_CONNECT(CAdvancedFrame::OnConnect) @@ -686,6 +687,21 @@ bool CAdvancedFrame::CreateMenu() { ); menuHelp->AppendSeparator(); + strMenuName.Printf( + _("Check for new %s version"), + pSkinAdvanced->GetApplicationShortName().c_str() + ); + strMenuDescription.Printf( + _("Check for new %s version"), + pSkinAdvanced->GetApplicationShortName().c_str() + ); + menuHelp->Append( + wxID_CHECK_VERSION, + strMenuName, + strMenuDescription + ); + menuHelp->AppendSeparator(); + strMenuName.Printf( _("&About %s..."), pSkinAdvanced->GetApplicationName().c_str() @@ -1666,6 +1682,31 @@ void CAdvancedFrame::OnHelpAbout(wxCommandEvent& WXUNUSED(event)) { wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnHelpAbout - Function End")); } +void CAdvancedFrame::OnCheckVersion(wxCommandEvent& WXUNUSED(event)) { + wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnCheckVersion - Function Begin")); + + std::string version, url; + wxString message, title; + title.Printf(_("Version Update")); + CMainDocument* pDoc = wxGetApp().GetDocument(); + CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced(); + if (pDoc->IsConnected()) { + pDoc->rpc.get_newer_version(version, url); + + if (!version.empty() && !url.empty()) { + message.Printf("%s: %s", _("A new version of BOINC is available for downloading here"), url); + } + else { + message.Printf("%s", _("No new version available for downloading"), url); + } + } + else { + message.Printf("%s is not connected to the client", pSkinAdvanced->GetApplicationName().c_str()); + } + wxGetApp().SafeMessageBox(message, title); + + wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnCheckVersion - Function End")); +} void CAdvancedFrame::OnRefreshView(CFrameEvent& WXUNUSED(event)) { wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnRefreshView - Function Begin")); diff --git a/clientgui/AdvancedFrame.h b/clientgui/AdvancedFrame.h index 4ddfc6076d..0d848e7d8d 100644 --- a/clientgui/AdvancedFrame.h +++ b/clientgui/AdvancedFrame.h @@ -88,6 +88,7 @@ public: void OnHelp( wxHelpEvent& event ); void OnHelpBOINC( wxCommandEvent& event ); void OnHelpAbout( wxCommandEvent& event ); + void OnCheckVersion( wxCommandEvent& event ); void OnRefreshState( wxTimerEvent& event ); void OnFrameRender( wxTimerEvent& event ); diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index 17dabb2865..4b86a4c27c 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -1282,12 +1282,6 @@ bool CMainDocument::IsUserAuthorized() { void CMainDocument::CheckForVersionUpdate() { std::string version, url; rpc.get_newer_version(version, url); - - if (!version.empty() && !url.empty()) { - char message[MAXPATHLEN]; - snprintf(message, sizeof(message), "%s: %s", wxT("You can download it here"), url); - wxGetApp().SafeMessageBox(message, wxT("A new version of BOINC is available.")); - } } int CMainDocument::CachedProjectStatusUpdate(bool bForce) { diff --git a/lib/gui_rpc_client_ops.cpp b/lib/gui_rpc_client_ops.cpp index 6d6f63ad5e..ccd452ffe7 100644 --- a/lib/gui_rpc_client_ops.cpp +++ b/lib/gui_rpc_client_ops.cpp @@ -2372,14 +2372,19 @@ int RPC_CLIENT::get_newer_version(std::string& version, std::string& version_dow RPC rpc(this); version = ""; + version_download_url = ""; + retval = rpc.do_rpc("\n"); if (!retval) { while (rpc.fin.fgets(buf, 256)) { + if (!version.empty() && !version_download_url.empty()) { + break; + } if (parse_str(buf, "", version)) { - return ERR_XML_PARSE; + continue; } if (parse_str(buf, "", version_download_url)) { - return ERR_XML_PARSE; + continue; } } } From 777ffdbb3faf6096ebe0e1de352b9e8c4dc74af6 Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Wed, 25 Jan 2017 06:15:38 +0200 Subject: [PATCH 6/8] MGR: Version check. Add menu to Simple view. --- clientgui/AdvancedFrame.cpp | 4 +-- clientgui/Events.h | 1 + clientgui/sg_BoincSimpleFrame.cpp | 42 +++++++++++++++++++++++++++++++ clientgui/sg_BoincSimpleFrame.h | 1 + 4 files changed, 46 insertions(+), 2 deletions(-) diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index 5cf8547226..10933147d7 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -196,7 +196,7 @@ BEGIN_EVENT_TABLE (CAdvancedFrame, CBOINCBaseFrame) EVT_MENU(ID_HELPBOINCMANAGER, CAdvancedFrame::OnHelpBOINC) EVT_MENU(ID_HELPBOINCWEBSITE, CAdvancedFrame::OnHelpBOINC) EVT_MENU(wxID_ABOUT, CAdvancedFrame::OnHelpAbout) - EVT_MENU(wxID_CHECK_VERSION, CAdvancedFrame::OnCheckVersion) + EVT_MENU(ID_CHECK_VERSION, CAdvancedFrame::OnCheckVersion) EVT_HELP(wxID_ANY, CAdvancedFrame::OnHelp) // Custom Events & Timers EVT_FRAME_CONNECT(CAdvancedFrame::OnConnect) @@ -696,7 +696,7 @@ bool CAdvancedFrame::CreateMenu() { pSkinAdvanced->GetApplicationShortName().c_str() ); menuHelp->Append( - wxID_CHECK_VERSION, + ID_CHECK_VERSION, strMenuName, strMenuDescription ); diff --git a/clientgui/Events.h b/clientgui/Events.h index 760b3e74b8..8ceddc6541 100644 --- a/clientgui/Events.h +++ b/clientgui/Events.h @@ -95,6 +95,7 @@ #define ID_HELPBOINC 6035 // Locked: Used by manager_links.php #define ID_HELPBOINCWEBSITE 6024 // Locked: Used by manager_links.php #define ID_HELPBOINCMANAGER 6025 // Locked: Used by manager_links.php +#define ID_CHECK_VERSION 6026 //#define wxID_ABOUT // Views diff --git a/clientgui/sg_BoincSimpleFrame.cpp b/clientgui/sg_BoincSimpleFrame.cpp index 29c38408fc..910ff63eaf 100644 --- a/clientgui/sg_BoincSimpleFrame.cpp +++ b/clientgui/sg_BoincSimpleFrame.cpp @@ -84,6 +84,7 @@ BEGIN_EVENT_TABLE(CSimpleFrame, CBOINCBaseFrame) EVT_MENU(ID_HELPBOINCMANAGER, CSimpleFrame::OnHelpBOINC) EVT_MENU(ID_HELPBOINCWEBSITE, CSimpleFrame::OnHelpBOINC) EVT_MENU(wxID_ABOUT, CSimpleFrame::OnHelpAbout) + EVT_MENU(ID_CHECK_VERSION, CSimpleFrame::OnCheckVersion) EVT_MENU(ID_EVENTLOG, CSimpleFrame::OnEventLog) EVT_MOVE(CSimpleFrame::OnMove) #ifdef __WXMAC__ @@ -258,6 +259,21 @@ CSimpleFrame::CSimpleFrame(wxString title, wxIconBundle* icons, wxPoint position ); menuHelp->AppendSeparator(); + strMenuName.Printf( + _("Check for new %s version"), + pSkinAdvanced->GetApplicationShortName().c_str() + ); + strMenuDescription.Printf( + _("Check for new %s version"), + pSkinAdvanced->GetApplicationShortName().c_str() + ); + menuHelp->Append( + ID_CHECK_VERSION, + strMenuName, + strMenuDescription + ); + menuHelp->AppendSeparator(); + strMenuName.Printf( _("&About %s..."), pSkinAdvanced->GetApplicationName().c_str() @@ -611,6 +627,32 @@ void CSimpleFrame::OnHelpAbout(wxCommandEvent& /*event*/) { wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnHelpAbout - Function End")); } +void CSimpleFrame::OnCheckVersion(wxCommandEvent& WXUNUSED(event)) { + wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnCheckVersion - Function Begin")); + + std::string version, url; + wxString message, title; + title.Printf(_("Version Update")); + CMainDocument* pDoc = wxGetApp().GetDocument(); + CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced(); + if (pDoc->IsConnected()) { + pDoc->rpc.get_newer_version(version, url); + + if (!version.empty() && !url.empty()) { + message.Printf("%s: %s", _("A new version of BOINC is available for downloading here"), url); + } + else { + message.Printf("%s", _("No new version available for downloading"), url); + } + } + else { + message.Printf("%s is not connected to the client", pSkinAdvanced->GetApplicationName().c_str()); + } + wxGetApp().SafeMessageBox(message, title); + + wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnCheckVersion - Function End")); +} + void CSimpleFrame::OnHelp(wxHelpEvent& event) { wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnHelp - Function Begin")); diff --git a/clientgui/sg_BoincSimpleFrame.h b/clientgui/sg_BoincSimpleFrame.h index cf08e4de46..6d767d7b2f 100644 --- a/clientgui/sg_BoincSimpleFrame.h +++ b/clientgui/sg_BoincSimpleFrame.h @@ -114,6 +114,7 @@ public: void OnHelp( wxHelpEvent& event ); void OnHelpBOINC( wxCommandEvent& event ); void OnHelpAbout( wxCommandEvent& event ); + void OnCheckVersion( wxCommandEvent& event ); void OnProjectsAttachToProject(wxCommandEvent& event); From f77f6793ceb76f3172e63a7472c678ef9d841594 Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Wed, 25 Jan 2017 16:26:58 +0200 Subject: [PATCH 7/8] MGR: Version check. Remove code duplicates. --- clientgui/AdvancedFrame.cpp | 20 +------------------- clientgui/MainDocument.cpp | 26 ++++++++++++++++++++++++-- clientgui/MainDocument.h | 2 +- clientgui/sg_BoincSimpleFrame.cpp | 20 +------------------- 4 files changed, 27 insertions(+), 41 deletions(-) diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index 10933147d7..15445ec3bc 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -1685,25 +1685,7 @@ void CAdvancedFrame::OnHelpAbout(wxCommandEvent& WXUNUSED(event)) { void CAdvancedFrame::OnCheckVersion(wxCommandEvent& WXUNUSED(event)) { wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnCheckVersion - Function Begin")); - std::string version, url; - wxString message, title; - title.Printf(_("Version Update")); - CMainDocument* pDoc = wxGetApp().GetDocument(); - CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced(); - if (pDoc->IsConnected()) { - pDoc->rpc.get_newer_version(version, url); - - if (!version.empty() && !url.empty()) { - message.Printf("%s: %s", _("A new version of BOINC is available for downloading here"), url); - } - else { - message.Printf("%s", _("No new version available for downloading"), url); - } - } - else { - message.Printf("%s is not connected to the client", pSkinAdvanced->GetApplicationName().c_str()); - } - wxGetApp().SafeMessageBox(message, title); + wxGetApp().GetDocument()->CheckForVersionUpdate(true); wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnCheckVersion - Function End")); } diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index 4b86a4c27c..b2169f10cd 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -37,6 +37,7 @@ #include "BOINCTaskBar.h" #include "DlgEventLog.h" #include "Events.h" +#include "SkinManager.h" #ifndef _WIN32 #include @@ -1279,9 +1280,30 @@ bool CMainDocument::IsUserAuthorized() { return true; } -void CMainDocument::CheckForVersionUpdate() { +void CMainDocument::CheckForVersionUpdate(bool showMessage) { std::string version, url; - rpc.get_newer_version(version, url); + wxString message, title; + title.Printf(_("Version Update")); + std::string applicationName = wxGetApp().GetSkinManager()->GetAdvanced()->GetApplicationName(); + if (IsConnected()) { + rpc.get_newer_version(version, url); + + if (!showMessage) + return; + + if (!version.empty() && !url.empty()) { + message.Printf("%s: %s", _("A new version of BOINC is available for downloading here"), url); + } + else { + message.Printf("%s", _("No new version available for downloading"), url); + } + } + else { + message.Printf("%s is not connected to the client", applicationName.c_str()); + } + if (showMessage) { + wxGetApp().SafeMessageBox(message, title); + } } int CMainDocument::CachedProjectStatusUpdate(bool bForce) { diff --git a/clientgui/MainDocument.h b/clientgui/MainDocument.h index de5fb71592..92f96c01f2 100644 --- a/clientgui/MainDocument.h +++ b/clientgui/MainDocument.h @@ -167,7 +167,7 @@ public: bool IsUserAuthorized(); - void CheckForVersionUpdate(); + void CheckForVersionUpdate(bool showMessage = false); CNetworkConnection* m_pNetworkConnection; CBOINCClientManager* m_pClientManager; diff --git a/clientgui/sg_BoincSimpleFrame.cpp b/clientgui/sg_BoincSimpleFrame.cpp index 910ff63eaf..75fdf43bb9 100644 --- a/clientgui/sg_BoincSimpleFrame.cpp +++ b/clientgui/sg_BoincSimpleFrame.cpp @@ -630,25 +630,7 @@ void CSimpleFrame::OnHelpAbout(wxCommandEvent& /*event*/) { void CSimpleFrame::OnCheckVersion(wxCommandEvent& WXUNUSED(event)) { wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnCheckVersion - Function Begin")); - std::string version, url; - wxString message, title; - title.Printf(_("Version Update")); - CMainDocument* pDoc = wxGetApp().GetDocument(); - CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced(); - if (pDoc->IsConnected()) { - pDoc->rpc.get_newer_version(version, url); - - if (!version.empty() && !url.empty()) { - message.Printf("%s: %s", _("A new version of BOINC is available for downloading here"), url); - } - else { - message.Printf("%s", _("No new version available for downloading"), url); - } - } - else { - message.Printf("%s is not connected to the client", pSkinAdvanced->GetApplicationName().c_str()); - } - wxGetApp().SafeMessageBox(message, title); + wxGetApp().GetDocument()->CheckForVersionUpdate(true); wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnCheckVersion - Function End")); } From 73138ddd90ba0507e75c84401f600373e7d3d709 Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Wed, 25 Jan 2017 16:37:39 +0200 Subject: [PATCH 8/8] MGR: Version check. Fix linux build. --- clientgui/MainDocument.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index b2169f10cd..8845d05b4f 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -1284,7 +1284,7 @@ void CMainDocument::CheckForVersionUpdate(bool showMessage) { std::string version, url; wxString message, title; title.Printf(_("Version Update")); - std::string applicationName = wxGetApp().GetSkinManager()->GetAdvanced()->GetApplicationName(); + wxString applicationName = wxGetApp().GetSkinManager()->GetAdvanced()->GetApplicationName(); if (IsConnected()) { rpc.get_newer_version(version, url); @@ -1299,7 +1299,7 @@ void CMainDocument::CheckForVersionUpdate(bool showMessage) { } } else { - message.Printf("%s is not connected to the client", applicationName.c_str()); + message.Printf("%s is not connected to the client", applicationName); } if (showMessage) { wxGetApp().SafeMessageBox(message, title);