diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-11-19 14:11:08 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-20 11:42:01 -0800 |
commit | a8d413551e3b6c7c2ab9d092b67e0976550e2115 (patch) | |
tree | a305ddc5fb8ee66a6c6ca44f4ccc929991493252 /display-gtk.h | |
parent | d1571ead2df6276ff8db06bd54d39b873b4ab9c9 (diff) | |
download | subsurface-a8d413551e3b6c7c2ab9d092b67e0976550e2115.tar.gz |
Allow the user to cancel a dive computer download
The code pretended to support this for libdivecomputer based downloads,
but it had never been hooked up when the native Uemis downloader was
implemented. When I finally decided to close that feature gap I realized
that the original code was, shall we say, "aspirational" or "completely
bogus" and therefore never worked.
So instead of just hooking up the code for the Uemis downloader I instead
implemented this correctly for the first time for both libdivecomputer and
the native Uemis downloader.
In order not to have to mess with multithreaded Gtk development I simply
opted for a helper function that fires on a 100ms timeout and have it end
the dialog without a response. This way we can run the dialog while
waiting for the download to finish, still update the progress bar and
respond in a useful manner to the user clicking cancel.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'display-gtk.h')
-rw-r--r-- | display-gtk.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/display-gtk.h b/display-gtk.h index 4f156c7f7..e1fd4f5d9 100644 --- a/display-gtk.h +++ b/display-gtk.h @@ -114,6 +114,6 @@ extern GtkTreeViewColumn *tree_view_column(GtkWidget *tree_view, int index, cons data_func_t data_func, unsigned int flags); GError *uemis_download(const char *path, char **divenr, char **xml_buffer, - progressbar_t *progress, gboolean force_download); + progressbar_t *progress, GtkDialog *dialog, gboolean force_download); #endif |