From 20d1d2c385d3e1c0282b565ba26fe81113a51dee Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 28 May 2015 12:33:01 -0700 Subject: [PATCH] Remote storage: add preference for the passphrase While we don't expose it as this to the user, we'll need an ssh key and potentially a passphrase in order to communicate with the git server in our infrastructure. This simply sets up a way to store the passphrase. Signed-off-by: Dirk Hohndel --- pref.h | 1 + qt-ui/preferences.cpp | 4 ++++ subsurfacestartup.c | 1 + 3 files changed, 6 insertions(+) diff --git a/pref.h b/pref.h index 2e5bf83c7..3320e39e5 100644 --- a/pref.h +++ b/pref.h @@ -90,6 +90,7 @@ struct preferences { bool show_pictures_in_profile; bool use_default_file; facebook_prefs_t facebook; + char *passphrase; }; enum unit_system_values { METRIC, diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index aeccc961c..db454c6d8 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -465,6 +465,10 @@ void PreferencesDialog::loadSettings() GET_TXT("proxy_user", proxy_user); GET_TXT("proxy_pass", proxy_pass); s.endGroup(); + + s.beginGroup("RemoteStorage"); + GET_TXT("passphrase", passphrase); + s.endGroup(); } void PreferencesDialog::buttonClicked(QAbstractButton *button) diff --git a/subsurfacestartup.c b/subsurfacestartup.c index 886365a16..429b40395 100644 --- a/subsurfacestartup.c +++ b/subsurfacestartup.c @@ -248,6 +248,7 @@ void free_prefs(void) free((void*)prefs.default_filename); free((void*)prefs.default_cylinder); free((void*)prefs.divelist_font); + free((void*)prefs.passphrase); free(prefs.proxy_host); free(prefs.proxy_user); free(prefs.proxy_pass);