diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-05-28 12:19:19 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-28 14:40:06 -0700 |
commit | 61c0d0c73d46515faa7d3dd2a63a19c43e437496 (patch) | |
tree | e557535b9d8d7f87f402554185eff0c329b3e7b9 /qt-ui | |
parent | c90635cef27e58b4a482473e7d0711cca5bd818e (diff) | |
download | subsurface-61c0d0c73d46515faa7d3dd2a63a19c43e437496.tar.gz |
Remote storage: collect email and PIN in preferences
This allows entering / storing the PIN (aka passphrase) for the ssh key.
The email isn't used, yet - this will be used by the automated backend to
create a unique git repository that will turn into the remote storage.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/preferences.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index db454c6d8..da3a45715 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -204,6 +204,12 @@ void PreferencesDialog::setUiFromPrefs() ui.proxyPassword->setText(prefs.proxy_pass); 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(); } void PreferencesDialog::restorePrefs() @@ -355,6 +361,14 @@ 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()); + else + s.remove("passphrase"); + s.endGroup(); loadSettings(); emit settingsChanged(); } @@ -468,6 +482,8 @@ void PreferencesDialog::loadSettings() s.beginGroup("RemoteStorage"); GET_TXT("passphrase", passphrase); + GET_TXT("remote_storage_email", remote_storage_email); + GET_BOOL("save_PIN_local", save_PIN_local); s.endGroup(); } |