[Xfce4-commits] <xfce4-weather-plugin:master> Fix reading forecast days from config file.

Harald Judt noreply at xfce.org
Tue Dec 18 22:00:01 CET 2012


Updating branch refs/heads/master
         to 93f1c3705abf0a910902a5d79a8c317759e6a477 (commit)
       from 99f61010187b4bcea6c82f6725305986bee7cef2 (commit)

commit 93f1c3705abf0a910902a5d79a8c317759e6a477
Author: Harald Judt <h.judt at gmx.at>
Date:   Tue Dec 18 21:59:11 2012 +0100

    Fix reading forecast days from config file.

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

diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index cfd9c9d..5149b81 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -717,8 +717,9 @@ xfceweather_read_config(XfcePanelPlugin *plugin,
     else
         data->forecast_layout = FC_LAYOUT_LIST;
 
-    val = xfce_rc_read_int_entry(rc, "forecast_days", DEFAULT_FORECAST_DAYS);
-    constrain_to_limits(&data->forecast_days, 1, DEFAULT_FORECAST_DAYS);
+    data->forecast_days = xfce_rc_read_int_entry(rc, "forecast_days",
+                                                 DEFAULT_FORECAST_DAYS);
+    constrain_to_limits(&data->forecast_days, 1, MAX_FORECAST_DAYS);
 
     value = xfce_rc_read_entry(rc, "theme_dir", NULL);
     if (data->icon_theme)


More information about the Xfce4-commits mailing list