From d31913918621daac2610e154276d0debd70090cf Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 23 Jul 2012 22:29:40 +0000 Subject: [PATCH] - client: improve "new version available" notice svn path=/trunk/boinc/; revision=25888 --- checkin_notes | 6 ++++++ client/current_version.cpp | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/checkin_notes b/checkin_notes index 0f3fdef36c..8957d4d069 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5052,3 +5052,9 @@ David 23 July 2012 Makefile.am db/ boinc_db_types.h + +David 23 July 2012 + - client: improve "new version available" notice + + client/ + current_version.cpp diff --git a/client/current_version.cpp b/client/current_version.cpp index e7de5561fe..cf86405009 100644 --- a/client/current_version.cpp +++ b/client/current_version.cpp @@ -82,13 +82,14 @@ static bool parse_version(FILE* f, char* new_version) { return false; } -static void show_newer_version_msg() { +static void show_newer_version_msg(const char* new_vers) { msg_printf_notice(0, true, "http://boinc.berkeley.edu/manager_links.php?target=notice&controlid=download", - "%s %s", + "%s (%s) %s", _("A new version of BOINC is available."), + new_vers, config.client_download_url.c_str(), - _("Download it.") + _("Download") ); } @@ -104,7 +105,7 @@ void GET_CURRENT_VERSION_OP::handle_reply(int http_op_retval) { while (fgets(buf, 256, f)) { if (match_tag(buf, "")) { if (parse_version(f, new_version)) { - show_newer_version_msg(); + show_newer_version_msg(new_version); gstate.newer_version = string(new_version); break; } @@ -119,7 +120,7 @@ void GET_CURRENT_VERSION_OP::handle_reply(int http_op_retval) { void newer_version_startup_check() { if (!gstate.newer_version.empty()) { if (is_version_newer(gstate.newer_version.c_str())) { - show_newer_version_msg(); + show_newer_version_msg(gstate.newer_version.c_str()); } else { gstate.newer_version = ""; }