This is an automated email from the git hooks/post-receive script.

isaacschemm pushed 
a commit to branch 
master
in repository panel-plugins/xfce4-verve-plugin.

commit 2183785a779157fc22559058221b181d97be658d
Author: Isaac Schemm <isaacsch...@gmail.com>
Date:   Fri Nov 17 08:18:28 2017 -0600

    Save colors to configuration file
---
 panel-plugin/verve-plugin.c | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/verve-plugin.c b/panel-plugin/verve-plugin.c
index 72da842..72fa08f 100644
--- a/panel-plugin/verve-plugin.c
+++ b/panel-plugin/verve-plugin.c
@@ -529,6 +529,11 @@ verve_plugin_new (XfcePanelPlugin *plugin)
   verve->launch_params.use_backslash = FALSE;
   verve->launch_params.use_smartbookmark = FALSE;
   verve->launch_params.smartbookmark_url = g_strdup("");
+  
+  /* Initialize colors */
+  verve->fg_color_override = FALSE;
+  verve->bg_color_override = FALSE;
+  verve->base_color_override = FALSE;
 
   /* Initialize label */
   verve->label = gtk_label_new ("");
@@ -833,6 +838,7 @@ verve_plugin_write_rc_file (XfcePanelPlugin *plugin,
 {
   XfceRc *rc;
   gchar *filename;
+  gchar *color_str;
 
   g_return_if_fail (plugin != NULL);
   g_return_if_fail (verve != NULL);
@@ -872,9 +878,17 @@ verve_plugin_write_rc_file (XfcePanelPlugin *plugin,
       xfce_rc_write_entry (rc, "smartbookmark-url", 
verve->launch_params.smartbookmark_url);
 
       /* Write colors */
-      xfce_rc_write_entry (rc, "foreground-color", verve->fg_color_override ? 
"orange" : "");
-      xfce_rc_write_entry (rc, "background-color", verve->bg_color_override ? 
"green" : "");
-      xfce_rc_write_entry (rc, "base-color", verve->base_color_override ? 
"blue" : "");
+      color_str = gdk_color_to_string(&verve->fg_color);
+      xfce_rc_write_entry (rc, "foreground-color", verve->fg_color_override ? 
color_str : "");
+      g_free (color_str);
+      
+      color_str = gdk_color_to_string(&verve->bg_color);
+      xfce_rc_write_entry (rc, "background-color", verve->bg_color_override ? 
color_str : "");
+      g_free (color_str);
+      
+      color_str = gdk_color_to_string(&verve->base_color);
+      xfce_rc_write_entry (rc, "base-color", verve->base_color_override ? 
color_str : "");
+      g_free (color_str);
     
       /* Close handle */
       xfce_rc_close (rc);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to