Clarification on EAD and END meaning in Subsurface

As pointed out in commit 23ce727 by Dirk and remembered Jan, there are different
meanings for EAD and END depending on organisations.  Let's explain a bit the one
Subsurface has choosen,  as this is confusing, even while translating the acronyms.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix units boxes in preference panel

The groupBox-es got renamed, and thus the unit-systems radio-buttons
was enabling/disabling the wrong buttons.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Rename the radio button to match label kgs->kg

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Update the diffrent units when switching system

When switching between metric and imperial, we should also show that the
different units are switching too. This signals the greyed out
radio buttons to switch to the right system.

Fixes #347

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Keep track of user requested minimum depth

When got auto-rescaling of the depth scale, always reset the depth scale
to what the profile would suggest. This introduces a concept of user
requested minimum witch we will update and not scale down to lower than.

Reported-by: Henrik Brautaset Aronsen <henrik@synth.no>
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't crash when trying to open a empty file

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Implement a settingsChanged in DivePlannerWidget

This is so we can default to the GF's from the preferences. We need the
bail handler in createTemporaryPlan, because its triggered when we
change GF's, and if we don't have a stagingDive there, we will access a
NULL-pointer.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Replaced writing email to, with sending an email to

Seems to read better as "sending an email to"

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Updates main menu entries

Updates summary of main menu entries to those in the new GUI

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Removes unnecessary references to number of elements in

 the date field

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Update to manual

- Companion app added
- Figures updated & reorganised
- Small amount of reorganisation of text
- Typos corrected

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Divelogs.de: allow import of downloaded dives

This patch adds commands to the dialog buttons, to apply
(and possibly show an error if 'parse_file' fails',
reject, or show help - which is a link to the 'divelogs.de'
website.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Divelogs.de: add a divelist context menu item for upload

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Divelogs.de: add code for zipping up all dives

prepare_dives_for_divelogs() comes from the GTK version, originally.
The upload seems to fail at this point with an error.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Divelogs.de: parse response once the upload is finished

This is based on the GTK version.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Divelogs.de: improve prepare_dives_for_divelogs()

prepare_dives_for_divelogs() is based on GTK / C code
where we used GLib methods to generate a temp zip file.
Qt has QTemporaryFile, but it seems there is some sort
of a problem when using with with zip_open
(ZIP_CREATE considered) or at least in this particular case.

To workaround that, we generate a random name ourself with qrand()
and simply pass it to zip_open (with ZIP_CREATE) and then return
the filename.

Also (!), there is memory corruption when trying to return
'tempfile'. This wasn't the case with the C compiler,
to my knowledge. Regardless of this fact the generated
zip does not look corrupt.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Divelogs.de: further improve reading the server reponse

We now check for the following entries:
<Login>succeeded</Login>
<FileCopy>failed</FileCopy>

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Divelogs.de: Add a 'filename' field when uploading

The 'Content-Disposition' header, requires that we pass
'name' but also a 'filename' field.

Suggested-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Divelogs.de: Improve the error handling post DLD creation

Only show a filename in the error report if such was previsly
set. We also add a string for translation, that is shown
in the main window.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Divelogs.de: store the user/pass on upload

We store the user/pass for 'Apply' when downloading, but
we also want to store these values for 'Upload'.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>