Skip to content

Commit

Permalink
- client: improve "new version available" notice
Browse files Browse the repository at this point in the history
svn path=/branches/boinc_core_release_7_0a/; revision=25918
  • Loading branch information
romw committed Jul 30, 2012
1 parent e00240a commit 475d28c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 6 additions & 0 deletions checkin_notes
Original file line number Diff line number Diff line change
Expand Up @@ -4058,6 +4058,12 @@ David 21 July 2012
client/
work_fetch.cpp

David 23 July 2012
- client: improve "new version available" notice

client/
current_version.cpp

Charlie 27 July 2012
- Mac: Eliminate extra output from wxMac build script.

Expand Down
11 changes: 6 additions & 5 deletions client/current_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href=%s>%s</a>",
"%s (%s) <a href=%s>%s</a>",
_("A new version of BOINC is available."),
new_vers,
config.client_download_url.c_str(),
_("Download it.")
_("Download")
);
}

Expand All @@ -104,7 +105,7 @@ void GET_CURRENT_VERSION_OP::handle_reply(int http_op_retval) {
while (fgets(buf, 256, f)) {
if (match_tag(buf, "<version>")) {
if (parse_version(f, new_version)) {
show_newer_version_msg();
show_newer_version_msg(new_version);
gstate.newer_version = string(new_version);
break;
}
Expand All @@ -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 = "";
}
Expand Down

0 comments on commit 475d28c

Please sign in to comment.