diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-11-11 14:29:26 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-11 14:29:26 +0100 |
commit | fe4f13f184ffb97ee4b6dbd4138a9d8ae3aabd14 (patch) | |
tree | ae127ca3591cb72b86bd1b512134086902e140cd /display-gtk.h | |
parent | 78ad07c72ed37928020cdbf4842e24690ce35f81 (diff) | |
download | subsurface-fe4f13f184ffb97ee4b6dbd4138a9d8ae3aabd14.tar.gz |
Add special download modes to force updates from the divecomputer
This will hopefully not be something we need often, but if we improve
support for a divecomputer (either in libdivecomputer or in our native
Uemis code or even in the way we handle (and potentially discard) events),
then it is extremely useful to be able to say "re-download things
from the divecomputer and for things that were not edited in Subsurface,
don't try to merge the data (which gives BAD results if for example you
fixed a bug in the depth calculation in libdivecomputer) but instead
simply take the samples, the events and some of the other unedited data
straight from the download".
This commit implements just that - a "force download" checkbox in the
download dialog that makes us reimport all dives from the dive computer,
even the ones we already have, and an "always prefer downloaded dive"
checkbox that then tells Subsurface not to merge but simply to take the
data from the downloaded dive - without overwriting the things we have
already edited in Subsurface (like location, buddy, equipment, etc).
This, as a precaution, refuses to merge dives that don't have identical
start times. So if you have edited the date / time of a dive or if you
have previously merged your dive with a different dive computer (and
therefore modified samples and events) you are out of luck.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'display-gtk.h')
-rw-r--r-- | display-gtk.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/display-gtk.h b/display-gtk.h index d709696a6..4f156c7f7 100644 --- a/display-gtk.h +++ b/display-gtk.h @@ -113,6 +113,7 @@ typedef gint (*sort_func_t)(GtkTreeModel *model, extern GtkTreeViewColumn *tree_view_column(GtkWidget *tree_view, int index, const char *title, data_func_t data_func, unsigned int flags); -GError *uemis_download(const char *path, char **divenr, char **xml_buffer, progressbar_t *progress); +GError *uemis_download(const char *path, char **divenr, char **xml_buffer, + progressbar_t *progress, gboolean force_download); #endif |