From 84acfc91c3a381bcd4b78e80c13370c5ccf191ca Mon Sep 17 00:00:00 2001 From: Landry Breuil Date: Sat, 14 May 2016 15:45:40 +0200 Subject: [PATCH] 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 : "");