]> spindle.queued.net Git - midori/commitdiff
Correct a missing differentiation between proxy widgets
authorChristian Dywan <christian@twotoasts.de>
Mon, 27 Oct 2008 02:01:52 +0000 (03:01 +0100)
committerChristian Dywan <christian@twotoasts.de>
Mon, 27 Oct 2008 02:01:52 +0000 (03:01 +0100)
katze/katze-arrayaction.c

index cc5f45f186f231087d0381e78bc44fd2af9140d0..b06c41a6403086f7a0c5194f3dffb713af1432cf 100644 (file)
@@ -214,11 +214,16 @@ katze_array_action_menu_item_activate_cb (GtkWidget*        proxy,
 
 static void
 katze_array_action_icon_cb (GdkPixbuf* icon,
-                            GtkWidget* menuitem)
+                            GtkWidget* widget)
 {
     GtkWidget* image = gtk_image_new_from_pixbuf (icon);
-    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image);
-    g_object_unref (menuitem);
+    g_object_unref (icon);
+    gtk_widget_show (image);
+    if (GTK_IS_IMAGE_MENU_ITEM (widget))
+        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (widget), image);
+    else
+        gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (widget), image);
+    g_object_unref (widget);
 }
 
 static void