Add a separate preferences tab for resetting all preferences to their default values.
One or two very small alterations to other sections of the preferences UI code.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds a tab for dive log - related preferences.
A suitable test programs is still required.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a preferences tab for dive download, allowing resetting the
buttons representing download connections in the Download panel.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the preference settings dealing with thumbnails (currently under
General preferences and Profile preferences) and put them in a newly-created
Media preference tab.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the "Show unused cylinders" checkbox (Profile tab) and the
"Set default cylinder" qTextEdit box (General tab) and put them in a
separate and new Equipment tab. This sounds like a simple task but,
as can be seen from the files changed, was actually a complex matter.
Adapt the existing test programs (General and TechDetails) for creating
a test program that tests parts of the Equipment tab.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This reverts commit 321a920a98.
It appears that the load_xxx functions aren't called, so while the correct
values are stored to the settings, they aren't retrieved. Let's revert while
this gets fixed.
Fixes#1609
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The variables referenced are moved into qPref in earlier commits
so in general all QSettings calls are replaced by qPref*:: calls
Signed-off-by: Jan Iversen <jani@apache.org>
See also commit c032006d91. Compare functions passed
to sort functions need to compare for less-than and not
less-or-equal.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Each preferences object owns its string members. In three cases, pointers
were copied instead of strings, leading to (in the best case) dangling
pointers if the user edited values:
1) In the GET_TXT macro in core/prefs-macros.h
2) In the PreferencesDialog::defaultsRequested() method
3) In main() of the mobile version
This patch fixes these issues, by using copy_string() or copy_prefs()
as appropriate.
The only reason that the old code didn't crash regularly is that the
default_prefs object was only used at startup and defaultsRequested()
is (at the moment?) dead code.
This patch also aligns the backslashes in core/pref.h and fixes a typo.
The declaration of copy_prefs() is moved to the core/prefs.h header.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
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>
Clicking Save in the preferences dialog will now cause
the GUI to immediately reflect the latest settings (just
as it behaved in 4.5).
Signed-off-by: K. Heller <pestophagous@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is needed only on Windows, so that the uninstaller knows
which directory to delete.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We didn't respond at all to that button. Also, the language settings
didn't propagate without this explicit call.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When I removed the old preferences dialog, I forgot to load them
again. The code is in the wrong place: it should be on every and
each preferences dialog (or on the main preferences)
Beware if you used this wip code before, I may have destroyed
your preferences.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Change the Reset to Defaults button to Apply in the preferences dialog.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The new preferences dialog still needs a bit of fine tuning
but should already work.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Simple port of the default preferences to the new preferences structure.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Load all settings as soon as we start the preferences.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
All functions that should control the preferences are
created.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since I'm using a dialog created by hand, I also need to
hook things by hand. the code is very simple - debug output
kept in just to make sure things are indeed working.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This Preferences dialog should be visually similar to the
old one - the main difference is how it acts on the preferences.
It's also not based on .ui files since it's a very simple widget
I prefered to mount it by hand - no more than 6 lines of c++ code.
Right now we have only one preference page on this, and nothing
is hoocked up.
I've also changed mainwindow a bit to only show this dialog for
testing purposes.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>