diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-05-31 17:42:12 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-31 19:45:05 -0700 |
commit | a6b667478034cee6efde4b0828ad4a263345355f (patch) | |
tree | f9695816f6bdc075e878849a388ac816a124eb7d /qt-ui/preferences.cpp | |
parent | 97ef9d0ee81f9037e7d71041bfb326c304888283 (diff) | |
download | subsurface-a6b667478034cee6efde4b0828ad4a263345355f.tar.gz |
Cloud storage: rethink the terminology used
Cloud storage makes more sense that remote storage - at least I assume
that more people are used to thinking about "storing things in the cloud".
Don't use PIN or passphrase, call it a password everywhere.
Don't use copy_string() to copy the password - the git credentials routine
asserts that password is not NULL, so make sure we at least have a pointer
to an empty string here.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/preferences.cpp')
-rw-r--r-- | qt-ui/preferences.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index da3a45715..f0f1212a2 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -205,11 +205,9 @@ void PreferencesDialog::setUiFromPrefs() ui.proxyType->setCurrentIndex(ui.proxyType->findData(prefs.proxy_type)); ui.btnUseDefaultFile->setChecked(prefs.use_default_file); - s.beginGroup("RemoteStorage"); - ui.remote_storage_email->setText(prefs.remote_storage_email); - ui.remote_storage_pin->setText(prefs.passphrase); - ui.save_PIN_local->setChecked(prefs.save_PIN_local); - s.endGroup(); + ui.cloud_storage_email->setText(prefs.cloud_storage_email); + ui.cloud_storage_password->setText(prefs.cloud_storage_password); + ui.save_password_local->setChecked(prefs.save_password_local); } void PreferencesDialog::restorePrefs() @@ -361,13 +359,13 @@ void PreferencesDialog::syncSettings() s.setValue("proxy_pass", ui.proxyPassword->text()); s.endGroup(); - s.beginGroup("RemoteStorage"); - SAVE_OR_REMOVE("remote_storage_email", default_prefs.remote_storage_email, ui.remote_storage_email->text()); - SAVE_OR_REMOVE("save_PIN_local", default_prefs.save_PIN_local, ui.save_PIN_local->isChecked()); - if (ui.save_PIN_local->isChecked()) - SAVE_OR_REMOVE("passphrase", default_prefs.passphrase, ui.remote_storage_pin->text()); + s.beginGroup("CloudStorage"); + SAVE_OR_REMOVE("email", default_prefs.cloud_storage_email, ui.cloud_storage_email->text()); + SAVE_OR_REMOVE("save_password_local", default_prefs.save_password_local, ui.save_password_local->isChecked()); + if (ui.save_password_local->isChecked()) + SAVE_OR_REMOVE("password", default_prefs.cloud_storage_password, ui.cloud_storage_password->text()); else - s.remove("passphrase"); + s.remove("password"); s.endGroup(); loadSettings(); emit settingsChanged(); @@ -480,10 +478,10 @@ void PreferencesDialog::loadSettings() GET_TXT("proxy_pass", proxy_pass); s.endGroup(); - s.beginGroup("RemoteStorage"); - GET_TXT("passphrase", passphrase); - GET_TXT("remote_storage_email", remote_storage_email); - GET_BOOL("save_PIN_local", save_PIN_local); + s.beginGroup("CloudStorage"); + GET_TXT("password", cloud_storage_password); + GET_TXT("email", cloud_storage_email); + GET_BOOL("save_password_local", save_password_local); s.endGroup(); } |