diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-04-24 16:33:29 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-24 16:38:25 -0700 |
commit | 92a5a5c35b39543a2feaeea247eb7390cd3a9e94 (patch) | |
tree | c48388fd9cd08a0196855367112f9cbf4493a6d4 /divelist-gtk.c | |
parent | 02d822924cd13ad6935e167d9a7597af91445a60 (diff) | |
download | subsurface-92a5a5c35b39543a2feaeea247eb7390cd3a9e94.tar.gz |
Split report_dives into UI and logic and move to divelist files
Functionality is unchanged, except we now have a nice process_dives
function that deals with all the logic and that gets called from
report_dives from the Gtk code.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist-gtk.c')
-rw-r--r-- | divelist-gtk.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/divelist-gtk.c b/divelist-gtk.c index 189b75ba1..e1482ee06 100644 --- a/divelist-gtk.c +++ b/divelist-gtk.c @@ -801,7 +801,6 @@ static gint gtk_dive_nr_sort(GtkTreeModel *model, return dive_nr_sort(idx_a, idx_b, when_a, when_b); } - static struct divelist_column { const char *header; data_func_t data; @@ -895,6 +894,12 @@ static void row_activated_cb(GtkTreeView *tree_view, edit_dive_info(get_dive(index), FALSE); } +void report_dives(bool is_imported, bool prefer_imported) +{ + process_dives(is_imported, prefer_imported); + dive_list_update_dives(); +} + void add_dive_cb(GtkWidget *menuitem, gpointer data) { struct dive *dive; |