summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-14 14:06:44 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-14 14:06:44 -0700
commit4b120d1bf54f339eaea488c71faecb5395defaf3 (patch)
tree433f2e86a8fd782ec741b793c6e89f5cab31ec88
parentb5eb66545b4c28809610d0778b9a797da9dda002 (diff)
downloadsubsurface-4b120d1bf54f339eaea488c71faecb5395defaf3.tar.gz
Cloud storage: show in preferences if cloud account was verified
This should make it easier to figure out what's happening. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/preferences.cpp4
-rw-r--r--qt-ui/preferences.ui2
-rw-r--r--qt-ui/subsurfacewebservices.cpp3
3 files changed, 6 insertions, 3 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index 1bc776e01..7ed807f3b 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -109,6 +109,10 @@ void PreferencesDialog::cloudPinNeeded()
ui.cloud_storage_pin->setVisible(prefs.cloud_verification_status == CS_NEED_TO_VERIFY);
ui.cloud_storage_pin_label->setEnabled(prefs.cloud_verification_status == CS_NEED_TO_VERIFY);
ui.cloud_storage_pin_label->setVisible(prefs.cloud_verification_status == CS_NEED_TO_VERIFY);
+ if (prefs.cloud_verification_status == CS_VERIFIED)
+ ui.cloudStorageGroupBox->setTitle(tr("Subsurface cloud storage (credentials verified)"));
+ else
+ ui.cloudStorageGroupBox->setTitle(tr("Subsurface cloud storage"));
}
#define DANGER_GF (gf > 100) ? "* { color: red; }" : ""
diff --git a/qt-ui/preferences.ui b/qt-ui/preferences.ui
index 28cc39bc9..bbbb058a6 100644
--- a/qt-ui/preferences.ui
+++ b/qt-ui/preferences.ui
@@ -429,7 +429,7 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox_8b">
+ <widget class="QGroupBox" name="cloudStorageGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index 06e4d1ec2..1deb3099c 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -978,15 +978,14 @@ void CloudStorageAuthenticate::uploadFinished()
qDebug() << "Completed connection with cloud storage backend, response" << cloudAuthReply;
if (cloudAuthReply == "[VERIFIED]" || cloudAuthReply == "[OK]") {
prefs.cloud_verification_status = CS_VERIFIED;
- emit finishedAuthenticate();
} else if (cloudAuthReply == "[VERIFY]") {
prefs.cloud_verification_status = CS_NEED_TO_VERIFY;
- emit finishedAuthenticate();
} else {
prefs.cloud_verification_status = CS_INCORRECT_USER_PASSWD;
report_error("%s", qPrintable(cloudAuthReply));
MainWindow::instance()->getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error);
}
+ emit finishedAuthenticate();
}
void CloudStorageAuthenticate::uploadError(QNetworkReply::NetworkError error)