Connect preferences to the rest of the code

The biggest problem here was that bool has different sizes in C and C++
code. So using this in a structure shared between the two sides wasn't a
smart idea.

Instead I went with 'short', but that caused problems with Qt being to
smart for its own good and not doing the right thing when dealing with
'boolean' settings and a short value. This may be something in the way I
implemented things (as I doubt that something this fundamental would be
broken) but the workaround implemented here (explicitly using 0 or 1
depending on the value of the boolean) seems to work.

I also decided to get rid of the confusion of where gflow/gfhigh are
floating point (0..1) and when they are integers (0..100). We now use
integers anywhere outside of deco.c.

I also applied some serious spelling corrections to the preferences
dialog's ui file.

Finally, this enables the code that selects which partial pressure graph
to show.

Still to do: font size, metric/imperial logic

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Correctly enable partial pressure threshold entry in preferences

The initial state needs to reflect the value of the checkbox. Once the
dialog is run, there is a signal/slot connection in the .ui file that
keeps things in sync.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Correct the ceiling preference handling

Added the red dc ceiling as preference option.
Hooked them all up together so the sub-preferences are enabled when the
master preference is set (for 3m and red ceiling).
Use the options in the profile plotting functions.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add --version to command line options

Displays Subsurface and libdivecomputer versions.

Suggested-by: Jef Driesen <jefdriesen@telenet.be>
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix a mistake naming for the da_dk alias localisation

The country code is da, not dk.

Suggested-by: Sylvestre Ledru <sylvestre@debian.org>
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix default zooming.

Set default zoom level only when at least one dive selected
and user have not changed it.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix message widget visibility.

Hide message widget when closing dive with no GPS coordinates.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>