summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-05 23:02:55 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-06 00:01:30 +0100
commit5861da0bce842bcca9777cad5d41bea790d6c5da (patch)
tree52e3cb57be6807de7cb129a838f677183fc0c254
parent44762c425233cb13d86d64360dbda54e975a7372 (diff)
downloadsubsurface-5861da0bce842bcca9777cad5d41bea790d6c5da.tar.gz
Remove unused part of the geocoding preferences
And always turn on geocoding. The user needs to trigger this manually anyway, so there's no point in having the extra option in the preferences. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/preferences.cpp6
-rw-r--r--qt-ui/preferences.ui30
-rw-r--r--qthelper.cpp6
-rw-r--r--subsurfacestartup.c2
4 files changed, 11 insertions, 33 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index d0adfabf4..615f0b84e 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -241,9 +241,11 @@ void PreferencesDialog::setUiFromPrefs()
ui.cloud_background_sync->setChecked(prefs.cloud_background_sync);
// GeoManagement
+#ifdef DISABLED
ui.enable_geocoding->setChecked( prefs.geocoding.enable_geocoding );
ui.parse_without_gps->setChecked(prefs.geocoding.parse_dive_without_gps);
ui.tag_existing_dives->setChecked(prefs.geocoding.tag_existing_dives);
+#endif
ui.first_item->setCurrentIndex(prefs.geocoding.category[0]);
ui.second_item->setCurrentIndex(prefs.geocoding.category[1]);
ui.third_item->setCurrentIndex(prefs.geocoding.category[2]);
@@ -417,9 +419,11 @@ void PreferencesDialog::syncSettings()
s.endGroup();
s.beginGroup("geocoding");
+#ifdef DISABLED
s.setValue("enable_geocoding", ui.enable_geocoding->isChecked());
- s.setValue("parse_dives_without_gps", ui.parse_without_gps->isChecked());
+ s.setValue("parse_dive_without_gps", ui.parse_without_gps->isChecked());
s.setValue("tag_existing_dives", ui.tag_existing_dives->isChecked());
+#endif
s.setValue("cat0", ui.first_item->currentIndex());
s.setValue("cat1", ui.second_item->currentIndex());
s.setValue("cat2", ui.third_item->currentIndex());
diff --git a/qt-ui/preferences.ui b/qt-ui/preferences.ui
index 403e52164..061ecffb9 100644
--- a/qt-ui/preferences.ui
+++ b/qt-ui/preferences.ui
@@ -1433,36 +1433,6 @@
<number>5</number>
</property>
<item>
- <widget class="QGroupBox" name="groupBox_Geocoding">
- <property name="title">
- <string>Dive site geo lookup</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_8">
- <item>
- <widget class="QCheckBox" name="enable_geocoding">
- <property name="text">
- <string>Enable geocoding for dive site management</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="parse_without_gps">
- <property name="text">
- <string>Parse site without GPS data</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="tag_existing_dives">
- <property name="text">
- <string>Same format for existing dives</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
<widget class="QGroupBox" name="groupBox_12">
<property name="title">
<string>Dive Site Layout</string>
diff --git a/qthelper.cpp b/qthelper.cpp
index ed23948ea..4b80a8093 100644
--- a/qthelper.cpp
+++ b/qthelper.cpp
@@ -1538,9 +1538,13 @@ void loadPreferences()
// GeoManagement
s.beginGroup("geocoding");
+#ifdef DISABLED
GET_BOOL("enable_geocoding", geocoding.enable_geocoding);
- GET_BOOL("parse_dives_without_gps", geocoding.parse_dive_without_gps);
+ GET_BOOL("parse_dive_without_gps", geocoding.parse_dive_without_gps);
GET_BOOL("tag_existing_dives", geocoding.tag_existing_dives);
+#else
+ prefs.geocoding.enable_geocoding = true;
+#endif
GET_ENUM("cat0", taxonomy_category, geocoding.category[0]);
GET_ENUM("cat1", taxonomy_category, geocoding.category[1]);
GET_ENUM("cat2", taxonomy_category, geocoding.category[2]);
diff --git a/subsurfacestartup.c b/subsurfacestartup.c
index ef2eb2cd5..ea57394e8 100644
--- a/subsurfacestartup.c
+++ b/subsurfacestartup.c
@@ -73,7 +73,7 @@ struct preferences default_prefs = {
.defaultsetpoint = 1100,
.cloud_background_sync = true,
.geocoding = {
- .enable_geocoding = false,
+ .enable_geocoding = true,
.parse_dive_without_gps = false,
.tag_existing_dives = false,
.category = { 0 }