[Xfce4-commits] <xfce4-indicator-plugin:master> xfce4-indicator-plugin does not update output #8066

Mark Trompell noreply at xfce.org
Tue Oct 25 08:24:01 CEST 2011


Updating branch refs/heads/master
         to 7c4732fa62e11947633692d9e6849d20df87e7ae (commit)
       from 33523445089c67717ffae6f86eb21c4cb0a8eea1 (commit)

commit 7c4732fa62e11947633692d9e6849d20df87e7ae
Author: Jason Conti <jconti at launchpad.net>
Date:   Fri Sep 16 12:00:00 2011 +0200

    xfce4-indicator-plugin does not update output #8066

 panel-plugin/indicator.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/indicator.c b/panel-plugin/indicator.c
index 1809b2c..fa517bb 100644
--- a/panel-plugin/indicator.c
+++ b/panel-plugin/indicator.c
@@ -276,6 +276,12 @@ menu_deactivate (GtkMenu *menu,
 }
 
 static void
+on_label_changed (GtkLabel *label, GParamSpec *pspec, GtkButton *button)
+{
+  gtk_button_set_label (button, gtk_label_get_label (label));
+}
+
+static void
 indicator_construct (XfcePanelPlugin *plugin)
 {
   IndicatorPlugin *indicator;
@@ -324,8 +330,10 @@ entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_d
   if (entry->image != NULL)
     gtk_button_set_image(GTK_TOGGLE_BUTTON(button), GTK_WIDGET(entry->image));
 
-  if (entry->label != NULL)
+  if (entry->label != NULL) {
     gtk_button_set_label(GTK_TOGGLE_BUTTON(button), gtk_label_get_label (entry->label));
+    g_signal_connect(G_OBJECT(entry->label), "notify::label", G_CALLBACK(on_label_changed), button);
+  }
 
   if (entry->menu != NULL)
   {


More information about the Xfce4-commits mailing list