[Xfce4-commits] [panel-plugins/xfce4-netload-plugin] 23/27: Use the proper idiom to serialize GdkRGBA when saving the config
noreply at xfce.org
noreply at xfce.org
Sat May 14 15:54:13 CEST 2016
This is an automated email from the git hooks/post-receive script.
landry pushed a commit to branch master
in repository panel-plugins/xfce4-netload-plugin.
commit 84acfc91c3a381bcd4b78e80c13370c5ccf191ca
Author: Landry Breuil <landry at xfce.org>
Date: Sat May 14 15:45:40 2016 +0200
Use the proper idiom to serialize GdkRGBA when saving the config
---
panel-plugin/netload.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/panel-plugin/netload.c b/panel-plugin/netload.c
index 71b0d6d..31134ce 100644
--- a/panel-plugin/netload.c
+++ b/panel-plugin/netload.c
@@ -743,17 +743,8 @@ static void monitor_write_config(XfcePanelPlugin *plugin, t_global_monitor *glob
xfce_rc_write_bool_entry (rc, "Show_Bars", global->monitor->options.show_bars);
xfce_rc_write_bool_entry (rc, "Colorize_Values", global->monitor->options.colorize_values);
- g_snprintf(value, 8, "#%02X%02X%02X",
- (guint)global->monitor->options.color[IN].red >> 8,
- (guint)global->monitor->options.color[IN].green >> 8,
- (guint)global->monitor->options.color[IN].blue >> 8);
- xfce_rc_write_entry (rc, "Color_In", value);
-
- g_snprintf(value, 8, "#%02X%02X%02X",
- (guint)global->monitor->options.color[OUT].red >> 8,
- (guint)global->monitor->options.color[OUT].green >> 8,
- (guint)global->monitor->options.color[OUT].blue >> 8);
- xfce_rc_write_entry (rc, "Color_Out", value);
+ xfce_rc_write_entry (rc, "Color_In", gdk_rgba_to_string(&global->monitor->options.color[IN]));
+ xfce_rc_write_entry (rc, "Color_Out", gdk_rgba_to_string(&global->monitor->options.color[OUT]));
xfce_rc_write_entry (rc, "Text", global->monitor->options.label_text ?
global->monitor->options.label_text : "");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list