diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-04-30 12:40:52 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-30 12:40:52 -0700 |
commit | 241dd7cb81364521d78250f800e8508211575254 (patch) | |
tree | 1ea443fe4589f0f247db4304de38e857e18100f6 /core/subsurfacestartup.c | |
parent | 2e6588dc0ef8d7698cc5dbe831f524a6e394145d (diff) | |
parent | ba9288fab6d7aa8527f7a75a717cdc88a68facd9 (diff) | |
download | subsurface-241dd7cb81364521d78250f800e8508211575254.tar.gz |
Merge branch 'offlineDefault'
Diffstat (limited to 'core/subsurfacestartup.c')
-rw-r--r-- | core/subsurfacestartup.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/core/subsurfacestartup.c b/core/subsurfacestartup.c index 6e0dede1c..c2881a17f 100644 --- a/core/subsurfacestartup.c +++ b/core/subsurfacestartup.c @@ -10,6 +10,9 @@ struct preferences prefs, informational_prefs; struct preferences default_prefs = { .cloud_base_url = "https://cloud.subsurface-divelog.org/", +#if defined(SUBSURFACE_MOBILE) + .git_local_only = true, +#endif .units = SI_UNITS, .unit_system = METRIC, .coordinates_traditional = true, @@ -197,6 +200,11 @@ void parse_argument(const char *arg) continue; case '-': /* long options with -- */ + /* first test for --user=bla which allows the use of user specific settings */ + if (strncmp(arg, "--user=", sizeof("--user=") - 1) == 0) { + settings_suffix = strdup(arg + sizeof("--user=") - 1); + return; + } if (strcmp(arg, "--help") == 0) { print_help(); exit(0); @@ -254,8 +262,10 @@ void setup_system_prefs(void) subsurface_OS_pref_setup(); default_prefs.divelist_font = strdup(system_divelist_default_font); default_prefs.font_size = system_divelist_default_font_size; - default_prefs.default_filename = system_default_filename(); +#if !defined(SUBSURFACE_MOBILE) + default_prefs.default_filename = system_default_filename(); +#endif env = getenv("LC_MEASUREMENT"); if (!env) env = getenv("LC_ALL"); |