mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
aaa34a1de7
commit
73ffbdebe4
1 changed files with 8 additions and 13 deletions
|
@ -88,30 +88,25 @@ void UpdateManager::requestReceived()
|
||||||
+ "<br/><br/><b>" + tr("Please check your internet connection.") + "</b>";
|
+ "<br/><br/><b>" + tr("Please check your internet connection.") + "</b>";
|
||||||
} else {
|
} else {
|
||||||
//No network error
|
//No network error
|
||||||
QString response(reply->readAll());
|
QString responseBody(reply->readAll());
|
||||||
QString responseBody;
|
QString responseLink;
|
||||||
if (response.contains('"'))
|
if (responseBody.contains('"'))
|
||||||
responseBody = response.split("\"").at(1);
|
responseLink = responseBody.split("\"").at(1);
|
||||||
else
|
|
||||||
responseBody = response;
|
|
||||||
|
|
||||||
msgbox.setIcon(QMessageBox::Information);
|
msgbox.setIcon(QMessageBox::Information);
|
||||||
|
|
||||||
if (responseBody == "OK") {
|
if (responseBody == "OK") {
|
||||||
msgText = tr("You are using the latest version of Subsurface.");
|
msgText = tr("You are using the latest version of Subsurface.");
|
||||||
} else if (responseBody.startsWith("http")) {
|
} else if (responseBody.startsWith("[\"http")) {
|
||||||
haveNewVersion = true;
|
haveNewVersion = true;
|
||||||
msgText = tr("A new version of Subsurface is available.<br/>Click on:<br/><a href=\"%1\">%1</a><br/> to download it.")
|
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")) {
|
} else if (responseBody.startsWith("Latest version")) {
|
||||||
// the webservice backend doesn't localize - but it's easy enough to just replace the
|
// the webservice backend doesn't localize - but it's easy enough to just replace the
|
||||||
// strings that it is likely to send back
|
// strings that it is likely to send back
|
||||||
haveNewVersion = true;
|
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/>") +
|
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.")
|
tr("Latest version is %1, please check %2 our download page %3 for information in how to update.")
|
||||||
.arg(responseBody);
|
.arg(responseLink).arg("<a href=\"http://subsurface-divelog.org/download\">").arg("</a>");
|
||||||
} else {
|
} else {
|
||||||
// the webservice backend doesn't localize - but it's easy enough to just replace the
|
// the webservice backend doesn't localize - but it's easy enough to just replace the
|
||||||
// strings that it is likely to send back
|
// strings that it is likely to send back
|
||||||
|
|
Loading…
Add table
Reference in a new issue