aboutsummaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt
AgeCommit message (Collapse)Author
2017-02-03Revert "In statistics, ignore gas use of planned dives"Gravatar Dirk Hohndel
This reverts commit 1d8662006cbb5edae941315e30ede381c23a817b. Mistakenly pushed to master Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-02In statistics, ignore gas use of planned divesGravatar Robert C. Helling
When merged with real dives, those would double count otherwise. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-01-22QML UI: allow magic phrase for multiple buddies to be localizedGravatar Dirk Hohndel
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-01Deco mode for plannining is not deco mode for showingGravatar Tomaz Canabrava
We had (in the wrong place, imo) a new feature that should differentiate the different deco_modes, you could plan your dive in buelhman and see it in vpm-b, for instance but both of them accessed the same pref. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-11-01More preference handling fixesGravatar Tomaz Canabrava
Remove a few uneeded lines and add more loading code for the preferences. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-11-01Use default prefs for the prefs that where missingGravatar Tomaz Canabrava
This patch fixes all the cases that I didn't checked for the default prefs. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-11-01use GET_* macros for getting settingsGravatar Tomaz Canabrava
Those macros are nice because they take into consideration the default preferences. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-11-01Load use_system_languageGravatar Tomaz Canabrava
Forgot to load use_system_language, wich borked the preferences. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-11-01Remember to load the languageGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-11-01Fix bug where the Font setting was ignoredGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-11-01Preferences tests: fix Update Manager date loadingGravatar Tomaz Canabrava
Date loading was incorrect, this unittest + fix deals with that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-11-01Preferences tests: location updates & bug fixGravatar Tomaz Canabrava
Fixed loading the location preferences. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-28Correctly load the language based prefsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-28Load system LanguageGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-28Fix default file behavior testsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-28Remember to look for the GroupGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-18Added language testcaseGravatar Tomaz Canabrava
Also, added a missing method / property Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-18Tests for Units PreferencesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-15Make all current written tests passGravatar Tomaz Canabrava
Fixes a couple of issues with the tests. Also, a type in prefs.h is "short" while it's actually a boolean, this made me write the wrong testcase for this. Fixed this by setting the Qt wrapper to bool, but I didn't changed the c implementation because I tought I could break something. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-15Update a few tests, implement PlannerGravatar Tomaz Canabrava
Also, fixed a typo that caused a bug. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-15Test planner settingsGravatar Tomaz Canabrava
Plus: fix a typo. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-15Test geologationGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-11Add preference to change deco modelGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-25Clean up group handling in SettingsObjectWrapperGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-25Make sure we remember the dive computer vendor and modelGravatar Dirk Hohndel
Preferences work best if you not only write them, but read them again as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-24Separate VPM-B conservatism preference for planner and profileGravatar Rick Walsh
Separate the VPM-B conservatism preference into diveplan.vpmb_conservatism for planning dives and prefs.vpmb_conservatism for profile ceiling display of saved dives. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> 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-09-20Preferences: remember both the locale name and the user friendly textGravatar Dirk Hohndel
Currently we are confused which it is we are looking at and so setting the language is broken. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17QML UI: deal with multiple buddies correctlyGravatar Joakim Bygdell
When editing adive in Subsurface-mobile we can only handle one buddy due to the limitations of the combobox. To prevent loss of data when editing a dive with more than one buddy we display "Multiple Buddies" in the buddy field. This creates a special case where no changes are written to the buddy field unless the user changes buddy for that dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04Fix some warningsGravatar Dirk Hohndel
At least the warnings about size potentially being uninitialized seem correct and valid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04iOS build: Fix compile failureGravatar Dirk Hohndel
Without this moc_SubsurfaceObjectWrapper doesn't compile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04Remove hacks regarding multiple gasmixes and cylindersGravatar Joakim Bygdell
Enabling cylinder edit in Subsurface-mobile our previous hacks regarding multiple cylinders and gasmixes must be removed. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04QML UI: Enable cylinder editGravatar Joakim Bygdell
This adds the option to select a cylinder when adding or editing a dive. Due to limited screen size we restrict the editing to the first cylinder only. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04Settings fixup: gflow and gfhigh are intGravatar Rick Walsh
With the recent setting cleanup, gradient factors were set to bool, so were saved as 1/1, rather than say 50/80. This commit fixes that. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-28Settings update: Fix git_local_only loadingGravatar Tomaz Canabrava
Thanks to the unittesting. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-28Settings update: Fix cloud_git_urlGravatar Tomaz Canabrava
I was freeing data segment, sigh. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-28Settings update: Fix loading "show pictures" in profile testsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27Settings update: Fix missing groups and Language initializationGravatar Tomaz Canabrava
There's one function named uiLanguage() that should return the current uiLanguage() that subsurface is running, but it actually sets a whole lot of preferences, I think that the general idea of that function is okay, but it seems broken for me. still, I used it to load the correct language from the preferences since it's what this function is currently doing right now. Also, a lot of missing groups where added. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27Settings update: Only set if value changed + bugfixes.Gravatar Tomaz Canabrava
Only set the settings if it actually changes, when the user clicked on the save button on the preferences, the code would run in every dialog saving each preferences on disk, but this is uneeded if the value didn't changed. Also, while doing that, I found a couple of places where I used the wrong field, which are now fixed. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27Settings update: Fix broken UpdateManger logicGravatar Dirk Hohndel
In commit b76c1846bbfd ("Settings update: Simplify Update Manager") the logic for when to show the UpdateManger question to the user got broken. Unintuitively, a boolean setting actually has three possible values. True, False, and Unset. This patch fixes things to work as designed again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27Settings update: Remember to load the "UpdateManager" settingsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27Settings update: Move loadPreferences out of qt-helper.cppGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27Settings update: Move preferences sync / initializationGravatar Tomaz Canabrava
Move Preferences sync / initialization out of the planner widget prerferences to the ObjectWrapper. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27Settings update: Add "Dive Computer" settings to SettingsObjectWrapperGravatar Tomaz Canabrava
For some reason, the dive computer settings weren't in the settings prefs. This moves it, makes the boilerplate on Settings ObjectWrapper and make things compile. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27Settings update: Add UpdateManagerSettings to SettingsObjectWrapperGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27Settings update: Clean up save user id localGravatar Tomaz Canabrava
So, prefs.save_userid_local is being set outside of a preferences set (it's set to true and false while loading the files via xml or git) and because of that I had to bypass a few method calls. When something triggers a preferences change, the application will be notified that the preferences changed, thing that I couldn't do while reading the xml or git because that should be local-only. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-10Adds Cylinder helper class for cylinder info access in grantlee templatesGravatar Tim Wootton
to allow grantlee to access individual fields of the cylinder_t struct rather than a string representation of the whole cylinder info using a grantlee structure like this one: <table class="table_class"> <tr> <td>Cylinder</td> <td>Start press.</td> <td>End press.</td> <td>Gas mix</td> </tr> {% for cylinderObject in dive.cylinderObjects %} <tr> <td>{{ cylinderObject.description }}</td> <td>{{ cylinderObject.startPressure }}</td> <td>{{ cylinderObject.endPressure }}</td> <td>{{ cylinderObject.gasMix }}</td> </tr> {% endfor %} </table> Signed-off-by: Tim Wootton <tim@tee-jay.org.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-07-30Send the appropriate signal when gitLocalOnly changesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-07-23Only add non-blank cylinder strings to the cylinder listGravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.org.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>