diff options
Diffstat (limited to 'subsurface-core')
-rw-r--r-- | subsurface-core/pref.h | 2 | ||||
-rw-r--r-- | subsurface-core/qthelper.cpp | 7 | ||||
-rw-r--r-- | subsurface-core/subsurfacestartup.c | 4 |
3 files changed, 12 insertions, 1 deletions
diff --git a/subsurface-core/pref.h b/subsurface-core/pref.h index 9f5f587e2..348dcfbf2 100644 --- a/subsurface-core/pref.h +++ b/subsurface-core/pref.h @@ -123,6 +123,8 @@ struct preferences { geocoding_prefs_t geocoding; enum deco_mode deco_mode; short conservatism_level; + int time_threshold; + int distance_threshold; }; enum unit_system_values { METRIC, diff --git a/subsurface-core/qthelper.cpp b/subsurface-core/qthelper.cpp index 63248f6c4..c1205ce6f 100644 --- a/subsurface-core/qthelper.cpp +++ b/subsurface-core/qthelper.cpp @@ -1601,6 +1601,13 @@ void loadPreferences() // Subsurface webservice id is stored outside of the groups GET_TXT("subsurface_webservice_uid", userid); + // but the related time / distance threshold (only used in the mobile app) + // are in their own group + s.beginGroup("locationService"); + GET_INT("distance_threshold", distance_threshold); + GET_INT("time_threshold", time_threshold); + s.endGroup(); + // GeoManagement s.beginGroup("geocoding"); #ifdef DISABLED diff --git a/subsurface-core/subsurfacestartup.c b/subsurface-core/subsurfacestartup.c index 13cbbfa3f..5b3dfa8c1 100644 --- a/subsurface-core/subsurfacestartup.c +++ b/subsurface-core/subsurfacestartup.c @@ -79,7 +79,9 @@ struct preferences default_prefs = { .category = { 0 } }, .deco_mode = BUEHLMANN, - .conservatism_level = 3 + .conservatism_level = 3, + .distance_threshold = 1000, + .time_threshold = 600 }; int run_survey; |