aboutsummaryrefslogtreecommitdiffstats
path: root/core/subsurfacestartup.c
AgeCommit message (Collapse)Author
2017-11-22Copy default filename string when assigning to default preferencesGravatar Berthold Stoeger
This tries to remove subtle ownership issues. When copying preferences structures, the default filename is copied. But the default preferences struct simply takes a pointer to a global string which is free()d in main(). Now, this is not strictly a bug because the free()ing of preferences resources is not implemented. Yet, let's try to make this consistent. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-16subsurface-startup: expose print_version() in the headerGravatar Lubomir I. Ivanov
The Windows auto-verbose + log file creation if starting from a non-terminal has the problem that the print_version() call is never made becase 'verbose' is updated programatically in windows.c and not by the user (by passing -v). To work around the issue: - move the windows console creation call before *everything* else - then immediatelly install the message handler - then see if 'verbose' is set and explicitly call print_version() print_version() now also has a flag (version_printed), to avoid printing the version multiple times, if the user decided to add an extra -v to the Desktop shortcut. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-09Print version when run in verbose modeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-09Add details about key libraries when showing versionGravatar Dirk Hohndel
Also fixed a spelling error and apparently some whitespace issue. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-03win32: optimize the console and logging logicGravatar Lubomir I. Ivanov
Currently one has to explicitly use --win32console and/or --win32log to enable a dedicated console (a console window that opens next to the Subsurface window) or to enable file logging on Win32. This patch makes the following changes: - removes the --win32* command line arguments - removes the dedicated console window support - if the app starts from a shortcut and not from a console, always redirect stderr and stdout to _err & _out log files - if the app starts from a console redirect stderr and stdout to that console Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-10-29Remove three obsolete preferences options for geocodingGravatar Stefan Fuchs
These options are not used any longer/were never used and can be removed to not confuse the users. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-26Don't show error if cloud credentials aren't set upGravatar Dirk Hohndel
This became rather obvious with the change to immediately show errors. The commit also fixes a small memory leak. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-28Planner prefs: set all ascent rates to 9m/minGravatar Rick Walsh
9m/min (or 10m/min) is the ascent rate assumed by Buhlmann and navy tables, and the default of most other planning software and dive computers. Setting the default to 9m/min allows the default behaviour to be consistent with "expected" behaviour, but does not prevent the user from changing the preference. There is disagreement between some users whether the final ascent ascent duration should be considered when determining the length of the final stop. This change does not alter that at all, but at 9m/min, the difference is <1min. See #592 Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
2017-09-20Add a checkbox to turn off plan variationsGravatar Robert C. Helling
... as those come with a performance penalty Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-06-17Set default cloud timeout to ten seconds for mobile appGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29Add SPDX header to core C filesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-28minimal pO2 threshold: split max threshold into min and maxGravatar Jan Mulder
Nothing really special here. Just a split of the only p02 max threshold into a min threshold and max threshold, and the adaptation of the UI. Change of translatable strings included. ref: https://github.com/Subsurface-divelog/subsurface/issues/259 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-11Minimum gas calculation - Calculations and UI parametersGravatar Stefan Fuchs
Add minimum gas calculation to planner output. Add the two UI parameters prefs.sacfactor and prefs.problemsolvingtime. Connect UI signals and slots for recalculation of diveplan. Disable minimum gas calculation if there was already a warning before. If minimum gas result is larger then cylinder start pressure give warning message instead of result. Add line break before pO2 warnings but only if warnings exist. Signed-off-by: Joachim Ritter <jritter@bitsenke.de> Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-02-05Finish removal of informational_prefsGravatar Dirk Hohndel
And make export-html build again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-05MOBILE: Read profile settings from gitGravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-02-03Win32: add the --win32log option to log stdout and stderr to filesGravatar Lubomir I. Ivanov
Adding --win32log as the first command line option on Windows will now log all stdout and stderr output to the files subsurface_err.log and subsurface_out.log in the working directory. This change required a new argument 'bool logfile' to be added to: subsurface_console_init() which is defined in all platform files (linux.c, macos.c, etc.) Example usage: subsurface.exe --win32log -v -v -v Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-01-06Add some additional parameters to help textGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-06Rename prefs.deco_mode to prefs.planner_deco_modeGravatar Robert C. Helling
This is to avoid confusion with planner.display_deco_mode. When accessing the "current deco mode" use the decoMode() helper function. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-11-01on first run, use system language.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-24Rename conservatism_level to vpmb_conservatismGravatar Rick Walsh
Make the variable purpose less ambiguous Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-07-23Allow the user to give longer cloud timeout on the command lineGravatar Dirk Hohndel
When stuck in areas with really bad internet 5 seconds may not be enough, but making the timeout longer in general seems the wrong way to go. So keep the default 5 seconds but allow the user to override that with subsurface --cloud-timeout=NN Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-07-09Add function to calculate gas maximum narcotic depthGravatar Rick Walsh
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-21fixup: Don't confuse EAD and ENDGravatar Rick Walsh
The previous patch (Planner: add best mix EAD preference) used the term EAD (equivalent air depth) in variable names and strings, when it should have been END (equivalent narcotic depth). They're not the same thing and shouldn't be confused. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-21Planner: add best mix EAD preferenceGravatar Rick Walsh
Add best mix EAD preference and UI, along with a tooltip describing what it does Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30QML UI: make offline the defaultGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-29Allow switching the user from the command lineGravatar Dirk Hohndel
This is a feature that many people have asked for. This implementation is somewhat simplistic because we simply use a different name for the program settings - but interestingly enough this appears to be enough to capture a lot of the core functionality that people are looking for in multi-user support. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>