info.c: add a method to clear all GtkListStore allocations
Add a new method in info.c called info_widget_destroy(), which clears all GtkListStore instances. The method is exposed via display-gtk.h and called from gtk-gui.c:on_destroy(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0b4dfd6cff
commit
61698b9f55
@ -64,6 +64,7 @@ extern GtkWidget *total_stats_widget(void);
|
||||
|
||||
extern GtkWidget *dive_list_create(void);
|
||||
extern void dive_list_destroy(void);
|
||||
extern void info_widget_destroy(void);
|
||||
extern GdkPixbuf *get_gps_icon(void);
|
||||
|
||||
/* Helper functions for gtk combo boxes */
|
||||
|
||||
@ -336,6 +336,7 @@ gboolean on_delete(GtkWidget* w, gpointer data)
|
||||
static void on_destroy(GtkWidget* w, gpointer data)
|
||||
{
|
||||
dive_list_destroy();
|
||||
info_widget_destroy();
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user