[Goodies-commits] r6519 - xfce4-radio-plugin/trunk/panel-plugin

Stefan Ott cockroach at xfce.org
Tue Jan 20 00:29:14 CET 2009


Author: cockroach
Date: 2009-01-19 23:29:14 +0000 (Mon, 19 Jan 2009)
New Revision: 6519

Modified:
   xfce4-radio-plugin/trunk/panel-plugin/xfce4-radio.c
Log:
Stop needlessly re-adding the image


Modified: xfce4-radio-plugin/trunk/panel-plugin/xfce4-radio.c
===================================================================
--- xfce4-radio-plugin/trunk/panel-plugin/xfce4-radio.c	2009-01-19 23:20:19 UTC (rev 6518)
+++ xfce4-radio-plugin/trunk/panel-plugin/xfce4-radio.c	2009-01-19 23:29:14 UTC (rev 6519)
@@ -62,9 +62,6 @@
 static void
 show_signal_image(radio_gui* data, gint signal)
 {
-	// TODO:
-	//  - Make sure we only add the image *once*
-	//  - Fix the background color?
 	GdkImage *image;
 
 	signal_s = gdk_pixmap_create_from_xpm_d
@@ -75,8 +72,11 @@
 	gtk_image_set_from_image (GTK_IMAGE(data->signal_image), image, NULL);
 	gtk_widget_show (data->signal_image);
 
-	gtk_box_pack_start (GTK_BOX (data->outer_box), data->signal_image,
-		FALSE, FALSE, 1);	
+	if (GTK_WIDGET(data->signal_image)->parent == NULL)
+	{
+		gtk_box_pack_start (GTK_BOX (data->outer_box),
+			data->signal_image, FALSE, FALSE, 1);
+	}
 }
 
 static gboolean




More information about the Goodies-commits mailing list