Preferences: hook up default file behavior in the dialog

This now sets the preference variable / config entry and keeps them in
sync. Doesn't actually change the behavior at program start, yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-06-14 08:17:06 -07:00
parent bfd3782b81
commit 10b9202757
3 changed files with 50 additions and 0 deletions

8
pref.h
View file

@ -89,6 +89,7 @@ struct preferences {
int defaultsetpoint; // default setpoint in mbar
bool show_pictures_in_profile;
bool use_default_file;
short default_file_behavior;
facebook_prefs_t facebook;
char *cloud_storage_password;
char *cloud_storage_email;
@ -103,6 +104,13 @@ enum unit_system_values {
PERSONALIZE
};
enum def_file_behavior {
UNDEFINED_DEFAULT_FILE,
LOCAL_DEFAULT_FILE,
NO_DEFAULT_FILE,
CLOUD_DEFAULT_FILE
};
extern struct preferences prefs, default_prefs;
#define PP_GRAPHS_ENABLED (prefs.pp_graphs.po2 || prefs.pp_graphs.pn2 || prefs.pp_graphs.phe)