[Goodies-commits] r2454 - xfce4-datetime-plugin/tags/datetime_0_4_2/panel-plugin

Remco den Breeje stacium at xfce.org
Sun Jan 21 16:56:44 CET 2007


Author: stacium
Date: 2007-01-21 15:56:44 +0000 (Sun, 21 Jan 2007)
New Revision: 2454

Modified:
   xfce4-datetime-plugin/tags/datetime_0_4_2/panel-plugin/datetime.c
Log:
Fixes bug where datetime formats read from the config-file are lost



Modified: xfce4-datetime-plugin/tags/datetime_0_4_2/panel-plugin/datetime.c
===================================================================
--- xfce4-datetime-plugin/tags/datetime_0_4_2/panel-plugin/datetime.c	2007-01-21 15:50:26 UTC (rev 2453)
+++ xfce4-datetime-plugin/tags/datetime_0_4_2/panel-plugin/datetime.c	2007-01-21 15:56:44 UTC (rev 2454)
@@ -430,6 +430,7 @@
   gchar *file;
   XfceRc *rc;
   const gchar *date_font, *time_font, *date_format, *time_format;
+  const gchar *val;
 
   /* load defaults */
   date_font = "Bitstream Vera Sans 8";
@@ -445,10 +446,14 @@
 
     if(rc != NULL)
     {
-      date_font	  = xfce_rc_read_entry(rc, "date_font", date_font);
-      time_font	  = xfce_rc_read_entry(rc, "time_font", time_font);
-      date_format = xfce_rc_read_entry(rc, "date_format", date_format);
-      time_format = xfce_rc_read_entry(rc, "time_format", time_format);
+      val = xfce_rc_read_entry(rc, "date_font", date_font);
+      date_font          = g_strdup(val);
+      val = xfce_rc_read_entry(rc, "time_font", time_font);
+      time_font          = g_strdup(val);
+      val = xfce_rc_read_entry(rc, "date_format", date_format);
+      date_format = g_strdup(val);
+      val = xfce_rc_read_entry(rc, "time_format", time_format);
+      time_format = g_strdup(val);
 
       xfce_rc_close(rc);
     }




More information about the Goodies-commits mailing list