[Xfce4-commits] <xfce4-netload-plugin:master> Bug 8915: Keep colorized values after orientation change

Mike Massonnet noreply at xfce.org
Mon May 28 21:34:01 CEST 2012


Updating branch refs/heads/master
         to b6efbf1286eee3ae0c7ba4cfcedf66b7f4160b90 (commit)
       from b5a375218d255906bd41f4f6a383bd06f19de1fe (commit)

commit b6efbf1286eee3ae0c7ba4cfcedf66b7f4160b90
Author: Mike Massonnet <mmassonnet at xfce.org>
Date:   Mon May 28 21:32:04 2012 +0200

    Bug 8915: Keep colorized values after orientation change

 panel-plugin/netload.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/netload.c b/panel-plugin/netload.c
index 02b35b1..035f549 100644
--- a/panel-plugin/netload.c
+++ b/panel-plugin/netload.c
@@ -353,6 +353,14 @@ static void monitor_set_orientation (XfcePanelPlugin *plugin, GtkOrientation ori
         gtk_misc_set_alignment(GTK_MISC(global->monitor->sent_label), 1.0f, 0.5f);
     }
 
+    if (global->monitor->options.show_values)
+    {
+        gtk_widget_modify_fg(global->monitor->rcv_label, GTK_STATE_NORMAL,
+                             (global->monitor->options.colorize_values ? &global->monitor->options.color[IN] : NULL));
+        gtk_widget_modify_fg(global->monitor->sent_label, GTK_STATE_NORMAL,
+                             (global->monitor->options.colorize_values ? &global->monitor->options.color[OUT] : NULL));
+    }
+
     gtk_box_pack_start(GTK_BOX(global->monitor->box),
                        GTK_WIDGET(global->monitor->label),
                        TRUE, FALSE, BORDER / 2);


More information about the Xfce4-commits mailing list