diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG
index e15467af0..d8e887bbc 100644
--- a/resources/text/CHANGELOG
+++ b/resources/text/CHANGELOG
@@ -5,6 +5,8 @@
[~] Message list optimizations.
[+] Feed list categories expand status is now persistent.
[+] System-wide external web browser can now be used.
+[#] All datetimes fetched from feeds are now considered to be UTC.
+[~] Tweaked "check for updates" dialog.
[1.9.9.6]
diff --git a/src/core/systemfactory.h b/src/core/systemfactory.h
index acbb51c33..31168e8ce 100644
--- a/src/core/systemfactory.h
+++ b/src/core/systemfactory.h
@@ -43,6 +43,10 @@ class UpdateInfo {
Evolution
};
+ explicit UpdateInfo() {
+ m_availableVersion = m_changes = "";
+ }
+
QString m_availableVersion;
QString m_changes;
UpdateType m_type;
diff --git a/src/gui/formupdate.cpp b/src/gui/formupdate.cpp
index 6232574b1..e2f087cd3 100755
--- a/src/gui/formupdate.cpp
+++ b/src/gui/formupdate.cpp
@@ -38,7 +38,6 @@ FormUpdate::FormUpdate(QWidget *parent)
m_btnUpdate = m_ui->m_buttonBox->addButton(tr("Update"), QDialogButtonBox::ActionRole);
m_btnUpdate->setToolTip(tr("Download new installation files."));
- m_btnUpdate->hide();
connect(m_btnUpdate, SIGNAL(clicked()), this, SLOT(startUpdate()));
@@ -71,13 +70,15 @@ void FormUpdate::checkForUpdates() {
m_updateInfo = update.first;
if (update.second != QNetworkReply::NoError) {
- //: Uknown release.
+ //: Unknown release.
m_ui->m_lblAvailableRelease->setText(tr("unknown"));
m_ui->m_txtChanges->clear();
m_ui->m_lblStatus->setStatus(WidgetWithStatus::Error,
tr("Error: '%1'.").arg(NetworkFactory::networkErrorText(update.second)),
tr("List with updates was "
"not\ndownloaded successfully."));
+ m_btnUpdate->setEnabled(false);
+ m_btnUpdate->setToolTip(tr("Checking for updates failed."));
}
else {
m_ui->m_lblAvailableRelease->setText(update.first.m_availableVersion);
@@ -92,19 +93,33 @@ void FormUpdate::checkForUpdates() {
// is available.
// TODO: Tady po stisku update tlacitka se provede
// stazeni archivu do tempu.
- m_btnUpdate->setVisible(isUpdateForThisSystem());
+ m_btnUpdate->setEnabled(true);
+ m_btnUpdate->setToolTip(isUpdateForThisSystem() ?
+ tr("Download installation file for your OS.") :
+ tr("Installation file is not available directly.\n"
+ "Go to application website to obtain it manually."));
}
else {
m_ui->m_lblStatus->setStatus(WidgetWithStatus::Warning,
tr("No new release available."),
tr("This release is not newer than\ncurrently installed one."));
- m_btnUpdate->show();
+ m_btnUpdate->setEnabled(true);
+ m_btnUpdate->setToolTip(tr("No new update available."));
}
}
}
void FormUpdate::startUpdate() {
- if (!NetworkFactory::openUrlInExternalBrowser(m_updateInfo.m_urls.value(OS_ID).m_fileUrl)) {
+ QString url_file;
+
+ if (isUpdateForThisSystem()) {
+ url_file = m_updateInfo.m_urls.value(OS_ID).m_fileUrl;
+ }
+ else {
+ url_file = APP_URL;
+ }
+
+ if (!NetworkFactory::openUrlInExternalBrowser(url_file)) {
if (SystemTrayIcon::isSystemTrayActivated()) {
SystemTrayIcon::instance()->showMessage(tr("Cannot update application"),
tr("Cannot navigate to installation file. Check new installation downloads "
diff --git a/src/gui/formupdate.ui b/src/gui/formupdate.ui
index dbc6a4c96..aa4045038 100755
--- a/src/gui/formupdate.ui
+++ b/src/gui/formupdate.ui
@@ -45,13 +45,13 @@
Changes
+
+ m_txtChanges
+
-
-
- true
-
false
@@ -69,7 +69,7 @@ p, li { white-space: pre-wrap; }
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p></body></html>
- Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
+ Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse
@@ -85,6 +85,9 @@ p, li { white-space: pre-wrap; }
Status
+
+ m_lblStatus
+
-