Import and merge GPS data from the webservice

Dive locations marked (and named) via the companion app are downloaded
from the webservice, parsed and merged with the existing dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Merge branch 'webservice-import'

Update maxdepth / duration that have moved into the divecomputer
structure.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Store/Retrieve last entered webservice UID to/from config.

We use subsurface_set_conf() subsurface_get_conf() to store
and recall the prefered UID for the download.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Save all dive computer nicknames - whether used or not

We used to save dive computer information only if that dive computer was
actually used in any of the dives we saved.  But we can simplify the
code if we just always save any dive computers we know about.  And it
does allow for some usage cases where you have nicknames for other
peoples computers that you may not actively use, but you want to see if
you end up loading multiple XML files in one go.

So there's just no compelling reason to not just save all the info we
have.  And this will make it less painful to remove the "use system
config for dive computer nicknames", because you can also use this to
continue to gather dive computer info in a separate XML file if you want
to.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove saving of dive computer nicnames in system config

We save the (more complete) dive computer information in the XML file
with serial numbers and firmware version if we know about them, so using
a complicated string in the system config was redundant and confusing.

So remove that code.

NOTE! Since the dive computer nicknames are now only saved if the XML
file is saved, we also mark the dive list "changed" when we edit the
nicknames.  That way we'll be prompted to save things before exiting,
even if we don't actually edit any actual dive data.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use actual min and max temperatures in statistics.

The statistics page only used each dive's "watertemp" attribute,
regardless of actual higher/lower temperatures in the samples.  By
finding the actual max/min temperatures, the statistics page utilize
more "real" data, and look better even on single dives.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove unused variable for unit name in statistics calculations

The code was incorrect - and completely unnecessary.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>