Updating branch refs/heads/master
         to d46b02ec4913570112db453b133c627cbee3fa8c (commit)
       from cb53f6815925cef35003be468fb6d3a9750ca00c (commit)

commit d46b02ec4913570112db453b133c627cbee3fa8c
Author: Andrzej <[email protected]>
Date:   Tue Mar 20 10:32:00 2012 +0100

    notify pixbuf on changing icons

 panel-plugin/indicator-button.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/indicator-button.c b/panel-plugin/indicator-button.c
index c846848..e9a416e 100644
--- a/panel-plugin/indicator-button.c
+++ b/panel-plugin/indicator-button.c
@@ -172,6 +172,23 @@ xfce_indicator_button_set_label (XfceIndicatorButton 
*button,
 
 
 
+
+static void
+on_pixbuf_changed (GtkImage *image, GParamSpec *pspec, XfceIndicatorButton 
*button)
+{
+  GdkPixbuf     *pixbuf;
+
+  g_return_if_fail (XFCE_IS_INDICATOR_BUTTON (button));
+  g_return_if_fail (GTK_IS_IMAGE (image));
+
+  pixbuf = gtk_image_get_pixbuf (image);
+  button->orig_icon_size = gdk_pixbuf_get_width (pixbuf);
+
+  xfce_panel_image_set_from_pixbuf (button->icon, pixbuf);
+}
+
+
+
 void
 xfce_indicator_button_set_image (XfceIndicatorButton *button,
                                  GtkImage            *image)
@@ -190,6 +207,7 @@ xfce_indicator_button_set_image (XfceIndicatorButton 
*button,
         }
 
       pixbuf = gtk_image_get_pixbuf (image);
+      g_signal_connect(G_OBJECT(image), "notify::pixbuf", 
G_CALLBACK(on_pixbuf_changed), button);
       button->orig_icon_size = gdk_pixbuf_get_width (pixbuf);
 
       button->icon = xfce_panel_image_new_from_pixbuf (pixbuf);
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to