diff options
-rw-r--r-- | display-gtk.h | 1 | ||||
-rw-r--r-- | divelist.c | 5 | ||||
-rw-r--r-- | gtk-gui.c | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/display-gtk.h b/display-gtk.h index b75515232..7b2ce5f2e 100644 --- a/display-gtk.h +++ b/display-gtk.h @@ -74,6 +74,7 @@ extern GtkWidget *cylinder_list_widget(int w_idx); extern GtkWidget *weightsystem_list_widget(int w_idx); extern GtkWidget *dive_list_create(void); +extern void dive_list_destroy(void); unsigned int amount_selected; diff --git a/divelist.c b/divelist.c index 2d6c6fdcf..9bdee1571 100644 --- a/divelist.c +++ b/divelist.c @@ -2294,6 +2294,11 @@ GtkWidget *dive_list_create(void) return dive_list.container_widget; } +void dive_list_destroy(void) +{ + gtk_widget_destroy(dive_list.tree_view); +} + void mark_divelist_changed(int changed) { dive_list.changed = changed; @@ -356,6 +356,7 @@ static gboolean on_delete(GtkWidget* w, gpointer data) static void on_destroy(GtkWidget* w, gpointer data) { + dive_list_destroy(); gtk_main_quit(); } @@ -369,6 +370,7 @@ void quit(GtkWidget *w, gpointer data) quit = ask_save_changes(); if (quit){ + dive_list_destroy(); gtk_main_quit(); } } |