diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-04-18 14:00:11 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-04-18 14:00:11 +0200 |
commit | ad3af05b3b56f78f5446727e568c874b54ec4d40 (patch) | |
tree | 402e11cbef0b1b34fc278bc25bdee81f907cb4d5 /plugins | |
parent | 9aa9637cb7879b3ad9b0295495220be00dc4eab2 (diff) |
destroy trkproperties window before quit (fixes memleak)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/gtkui.c | 1 | ||||
-rw-r--r-- | plugins/gtkui/trkproperties.c | 11 | ||||
-rw-r--r-- | plugins/gtkui/trkproperties.h | 3 |
3 files changed, 12 insertions, 3 deletions
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index 30305548..359613b9 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -847,6 +847,7 @@ gtkui_thread (void *ctx) { gtk_main (); cover_art_free (); eq_window_destroy (); + trkproperties_destroy (); gtk_widget_destroy (mainwin); gtk_widget_destroy (searchwin); #if HAVE_NOTIFY diff --git a/plugins/gtkui/trkproperties.c b/plugins/gtkui/trkproperties.c index 633ffe65..d86e3316 100644 --- a/plugins/gtkui/trkproperties.c +++ b/plugins/gtkui/trkproperties.c @@ -59,9 +59,7 @@ on_trackproperties_key_press_event (GtkWidget *widget, } void -on_closebtn_clicked (GtkButton *button, - gpointer user_data) -{ +trkproperties_destroy (void) { if (trackproperties) { GtkWidget *w = trackproperties; on_trackproperties_delete_event (NULL, NULL, NULL); @@ -70,6 +68,13 @@ on_closebtn_clicked (GtkButton *button, } void +on_closebtn_clicked (GtkButton *button, + gpointer user_data) +{ + trkproperties_destroy (); +} + +void on_metadata_edited (GtkCellRendererText *renderer, gchar *path, gchar *new_text, gpointer user_data) { GtkListStore *store = GTK_LIST_STORE (user_data); GtkTreePath *treepath = gtk_tree_path_new_from_string (path); diff --git a/plugins/gtkui/trkproperties.h b/plugins/gtkui/trkproperties.h index 51937f5e..e7eaffed 100644 --- a/plugins/gtkui/trkproperties.h +++ b/plugins/gtkui/trkproperties.h @@ -24,4 +24,7 @@ struct DB_playItem_s; void show_track_properties_dlg (struct DB_playItem_s *it); +void +trkproperties_destroy (void); + #endif |