Renaming the prefs struct members to be consistent with the QSettings.

-Renaming prefs members for consistency.
-Changing references of QSettings to the prefs structure instead.
-Removing unused functions in pref.h were left over from an old version.
-Changing the data-type of bool members to short for consistency with other members.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Gehad Elrobey 2014-04-16 22:03:44 +02:00 committed by Dirk Hohndel
parent 4bd4c01108
commit 8380f09619
8 changed files with 80 additions and 97 deletions

29
pref.h
View file

@ -23,14 +23,14 @@ struct preferences {
double font_size;
partial_pressure_graphs_t pp_graphs;
short mod;
double mod_ppO2;
double modppO2;
short ead;
short profile_dc_ceiling;
short profile_red_ceiling;
short profile_calc_ceiling;
short calc_ceiling_3m_incr;
short calc_all_tissues;
short calc_ndl_tts;
short dcceiling;
short redceiling;
short calcceiling;
short calcceiling3m;
short calcalltissues;
short calcndltts;
short gflow;
short gfhigh;
short animation;
@ -39,10 +39,10 @@ struct preferences {
short unit_system;
struct units units;
short show_sac;
bool display_unused_tanks;
bool show_average_depth;
bool zoomed_plot;
short heart_rate;
short display_unused_tanks;
short show_average_depth;
short zoomed_plot;
short hrgraph;
};
enum unit_system_values {
METRIC,
@ -54,16 +54,9 @@ extern struct preferences prefs, default_prefs;
#define PP_GRAPHS_ENABLED (prefs.pp_graphs.po2 || prefs.pp_graphs.pn2 || prefs.pp_graphs.phe)
extern void subsurface_open_conf(void);
extern void subsurface_set_conf(const char *name, const char *value);
extern void subsurface_set_conf_bool(const char *name, bool value);
extern void subsurface_set_conf_int(const char *name, int value);
extern void subsurface_unset_conf(const char *name);
extern const char *subsurface_get_conf(const char *name);
extern int subsurface_get_conf_bool(const char *name);
extern int subsurface_get_conf_int(const char *name);
extern void subsurface_flush_conf(void);
extern void subsurface_close_conf(void);
extern const char system_divelist_default_font[];
extern const int system_divelist_default_font_size;