Bug#495427: View Track Details doesn't always work

2009-03-15 Thread John Lindgren
More specifically, the problem happens when one info dialog is closed
with Alt-F4 and then another is opened. If the first dialog is instead
closed with the Close button, opening another one works fine.

John




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#495427: View Track Details doesn't always work

2009-03-15 Thread John Lindgren
I believe that the attached patch fixes the problem.

John
--- ui_fileinfo.0.c	2008-05-23 18:00:34.0 -0400
+++ ui_fileinfo.c	2009-03-15 16:56:00.0 -0400
@@ -264,7 +264,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);
@@ -295,6 +295,7 @@
 G_FREE_CLEAR(current_file);
 
 fileinfo_entry_set_image(image_artwork, DATA_DIR /images/audio.png);
+return 1;
 }
 
 static void
@@ -771,6 +772,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);
 }