aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-25 22:19:05 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-25 22:19:05 -0800
commit73ffbdebe49cc3c4eb28ccf6e632792227a59db3 (patch)
tree12808b6e51e09667a6d2fbdf9ba53ef466286a41
parentaaa34a1de7e58a95aa106ce9353a2f8ee65a163d (diff)
downloadsubsurface-73ffbdebe49cc3c4eb28ccf6e632792227a59db3.tar.gz
Changing the way we tell Linux users about new versions
We no longer encourage people to check with their OS vendor. We want them to check our download page. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/updatemanager.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/qt-ui/updatemanager.cpp b/qt-ui/updatemanager.cpp
index 35e47441a..ba10fd46b 100644
--- a/qt-ui/updatemanager.cpp
+++ b/qt-ui/updatemanager.cpp
@@ -88,30 +88,25 @@ void UpdateManager::requestReceived()
+ "<br/><br/><b>" + tr("Please check your internet connection.") + "</b>";
} else {
//No network error
- QString response(reply->readAll());
- QString responseBody;
- if (response.contains('"'))
- responseBody = response.split("\"").at(1);
- else
- responseBody = response;
+ QString responseBody(reply->readAll());
+ QString responseLink;
+ if (responseBody.contains('"'))
+ responseLink = responseBody.split("\"").at(1);
msgbox.setIcon(QMessageBox::Information);
-
if (responseBody == "OK") {
msgText = tr("You are using the latest version of Subsurface.");
- } else if (responseBody.startsWith("http")) {
+ } else if (responseBody.startsWith("[\"http")) {
haveNewVersion = true;
msgText = tr("A new version of Subsurface is available.<br/>Click on:<br/><a href=\"%1\">%1</a><br/> to download it.")
- .arg(responseBody);
+ .arg(responseLink);
} else if (responseBody.startsWith("Latest version")) {
// the webservice backend doesn't localize - but it's easy enough to just replace the
// strings that it is likely to send back
haveNewVersion = true;
- responseBody.replace("Latest version is ", "");
- responseBody.replace(". please check with your OS vendor for updates.", "");
msgText = QString("<b>") + tr("A new version of Subsurface is available.") + QString("</b><br/><br/>") +
- tr("Latest version is %1, please check with your OS vendor for updates.")
- .arg(responseBody);
+ tr("Latest version is %1, please check %2 our download page %3 for information in how to update.")
+ .arg(responseLink).arg("<a href=\"http://subsurface-divelog.org/download\">").arg("</a>");
} else {
// the webservice backend doesn't localize - but it's easy enough to just replace the
// strings that it is likely to send back