diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-10-04 13:17:37 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-10-04 13:17:37 -0300 |
commit | 30bee57b60526dcdf675a0606e72b980a67af17b (patch) | |
tree | 0c33ec5fda451dc360dd7d3667676d25c5e0e52e | |
parent | a5b351ed720597ea62ee0254e60e47a4f87ce1d2 (diff) | |
download | subsurface-30bee57b60526dcdf675a0606e72b980a67af17b.tar.gz |
Code Cleanup - Uneeded preferences stored at the old prefs setting
Those preferences removed ( basically the ones about visibility of
the List View of the Table ) are now managed by the Qt Settings
system, and thus there's no need to have them there. wich gave us
a pretty good cleanup.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
-rw-r--r-- | pref.h | 12 | ||||
-rw-r--r-- | prefs.c | 17 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 20 | ||||
-rw-r--r-- | subsurfacestartup.c | 1 |
4 files changed, 0 insertions, 50 deletions
@@ -7,17 +7,6 @@ extern "C" { /* can't use 'bool' for the boolean values - different size in C and C++ */ typedef struct { - short cylinder; - short temperature; - short totalweight; - short suit; - short nitrox; - short sac; - short otu; - short maxcns; -} visible_cols_t; - -typedef struct { short po2; short pn2; short phe; @@ -30,7 +19,6 @@ struct preferences { const char *divelist_font; const char *default_filename; double font_size; - visible_cols_t visible_cols; partial_pressure_graphs_t pp_graphs; short mod; double mod_ppO2; @@ -81,15 +81,6 @@ void save_preferences(void) SAVE_UNIT("fahrenheit", temperature, FAHRENHEIT); SAVE_UNIT("lbs", weight, LBS); - SAVE_BOOL("TEMPERATURE", visible_cols.temperature); - SAVE_BOOL("TOTALWEIGHT", visible_cols.totalweight); - SAVE_BOOL("SUIT", visible_cols.suit); - SAVE_BOOL("CYLINDER", visible_cols.cylinder); - SAVE_BOOL("NITROX", visible_cols.nitrox); - SAVE_BOOL("SAC", visible_cols.sac); - SAVE_BOOL("OTU", visible_cols.otu); - SAVE_BOOL("MAXCNS", visible_cols.maxcns); - SAVE_STRING("divelist_font", divelist_font); SAVE_BOOL("po2graph", pp_graphs.po2); @@ -144,14 +135,6 @@ void load_preferences(void) GET_UNIT("lbs", weight, KG, LBS); /* an unset key is 'default' */ - GET_BOOL("CYLINDER", visible_cols.cylinder); - GET_BOOL("TEMPERATURE", visible_cols.temperature); - GET_BOOL("TOTALWEIGHT", visible_cols.totalweight); - GET_BOOL("SUIT", visible_cols.suit); - GET_BOOL("NITROX", visible_cols.nitrox); - GET_BOOL("OTU", visible_cols.otu); - GET_BOOL("MAXCNS", visible_cols.maxcns); - GET_BOOL("SAC", visible_cols.sac); GET_BOOL("po2graph", pp_graphs.po2); GET_BOOL("pn2graph", pp_graphs.pn2); GET_BOOL("phegraph", pp_graphs.phe); diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index af83c21a3..4b296aa14 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -549,16 +549,6 @@ void MainWindow::readSettings() GET_UNIT("weight", weight, units::LBS, units::KG); } s.endGroup(); - s.beginGroup("DisplayListColumns"); - GET_BOOL("CYLINDER", visible_cols.cylinder); - GET_BOOL("TEMPERATURE", visible_cols.temperature); - GET_BOOL("TOTALWEIGHT", visible_cols.totalweight); - GET_BOOL("SUIT", visible_cols.suit); - GET_BOOL("NITROX", visible_cols.nitrox); - GET_BOOL("OTU", visible_cols.otu); - GET_BOOL("MAXCNS", visible_cols.maxcns); - GET_BOOL("SAC", visible_cols.sac); - s.endGroup(); s.beginGroup("TecDetails"); GET_BOOL("po2graph", pp_graphs.po2); GET_BOOL("pn2graph", pp_graphs.pn2); @@ -616,16 +606,6 @@ void MainWindow::writeSettings() SAVE_VALUE("temperature", units.temperature); SAVE_VALUE("weight", units.weight); settings.endGroup(); - settings.beginGroup("DisplayListColumns"); - SAVE_VALUE("TEMPERATURE", visible_cols.temperature); - SAVE_VALUE("TOTALWEIGHT", visible_cols.totalweight); - SAVE_VALUE("SUIT", visible_cols.suit); - SAVE_VALUE("CYLINDER", visible_cols.cylinder); - SAVE_VALUE("NITROX", visible_cols.nitrox); - SAVE_VALUE("SAC", visible_cols.sac); - SAVE_VALUE("OTU", visible_cols.otu); - SAVE_VALUE("MAXCNS", visible_cols.maxcns); - settings.endGroup(); settings.beginGroup("TecDetails"); SAVE_VALUE("po2graph", pp_graphs.po2); SAVE_VALUE("pn2graph", pp_graphs.pn2); diff --git a/subsurfacestartup.c b/subsurfacestartup.c index 954840928..741606ee4 100644 --- a/subsurfacestartup.c +++ b/subsurfacestartup.c @@ -6,7 +6,6 @@ struct preferences prefs; struct preferences default_prefs = { .units = SI_UNITS, .unit_system = METRIC, - .visible_cols = { TRUE, FALSE, }, .pp_graphs = { .po2 = FALSE, .pn2 = FALSE, |