changeset 4842:62cb85252393

Only hide, do not destroy, window on delete-event (Debian bug #495427)
author John Lindgren <john.lindgren@tds.net>
date Fri, 10 Apr 2009 01:02:50 -0400
parents a8c464186ec9
children ca837b93ad0f
files src/audlegacy/ui_fileinfo.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audlegacy/ui_fileinfo.c	Thu Apr 09 20:43:01 2009 -0400
+++ b/src/audlegacy/ui_fileinfo.c	Fri Apr 10 01:02:50 2009 -0400
@@ -261,7 +261,7 @@
     g_object_unref(G_OBJECT(pixbuf));
 }
 
-static void
+static int
 fileinfo_hide(gpointer unused)
 {
     if(GTK_WIDGET_VISIBLE(fileinfo_win)) gtk_widget_hide(fileinfo_win);
@@ -292,6 +292,7 @@
     G_FREE_CLEAR(current_file);
 
     fileinfo_entry_set_image(image_artwork, DATA_DIR "/images/audio.png");
+    return 1;
 }
 
 static void
@@ -768,6 +769,8 @@
     gtk_container_add(GTK_CONTAINER(bbox_close), btn_close);
     GTK_WIDGET_SET_FLAGS(btn_close, GTK_CAN_DEFAULT);
     g_signal_connect(G_OBJECT(btn_close), "clicked", (GCallback) fileinfo_hide, NULL);
+    g_signal_connect ((GObject *) fileinfo_win, "delete-event",
+     (GCallback) fileinfo_hide, 0);
 
     gtk_widget_show_all (vbox0);
 }