[Xfce4-commits] <xfce4-weather-plugin:master> Read/write int values for system of measurement (bug #8325)

Harald Judt noreply at xfce.org
Fri Jul 13 16:50:18 CEST 2012


Updating branch refs/heads/master
         to e77af5bf30ab30c1f931431eba7efbd48375862e (commit)
       from 011e067f419d1077b52ecb8d190b421364bf26cf (commit)

commit e77af5bf30ab30c1f931431eba7efbd48375862e
Author: Harald Judt <h.judt at gmx.at>
Date:   Wed Jul 11 19:11:04 2012 +0200

    Read/write int values for system of measurement (bug #8325)
    
    Replace the misspelled "celcius" with a more general text.
    Also, default to the more widely used metric unit system.

 panel-plugin/weather.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index 407b4dd..10b23cc 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -500,10 +500,7 @@ xfceweather_read_config (XfcePanelPlugin  *plugin,
       data->location_name_short = g_strdup (value);
     }
 
-  if (xfce_rc_read_bool_entry (rc, "celcius", TRUE))
-    data->unit_system = METRIC;
-  else
-    data->unit_system = IMPERIAL;
+  data->unit_system = xfce_rc_read_int_entry(rc, "unit_system", METRIC);
 
   if (data->proxy_host)
     {
@@ -583,7 +580,7 @@ xfceweather_write_config (XfcePanelPlugin  *plugin,
   if (!rc)
     return;
 
-  xfce_rc_write_bool_entry (rc, "celcius", (data->unit_system == METRIC));
+  xfce_rc_write_int_entry (rc, "unit_system", data->unit_system);
 
   if (data->lat)
     xfce_rc_write_entry (rc, "lat", data->lat);


More information about the Xfce4-commits mailing list