[Xfce4-commits] <xfce4-weather-plugin:master> Only write clouds data to cache file when available.

Harald Judt noreply at xfce.org
Fri Dec 14 15:48:01 CET 2012


Updating branch refs/heads/master
         to 775ccced0174c8efedaf3468ac049e472f86ba4b (commit)
       from f1849b532fe28cf88fa6c83283d0982d332cf848 (commit)

commit 775ccced0174c8efedaf3468ac049e472f86ba4b
Author: Harald Judt <h.judt at gmx.at>
Date:   Fri Dec 14 15:46:29 2012 +0100

    Only write clouds data to cache file when available.

 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 6e65399..26cc992 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -942,8 +942,9 @@ write_cache_file(plugin_data *data)
         g_free(end);
         g_free(point);
         for (j = 0; j < CLOUDS_PERC_NUM; j++)
-            g_string_append_printf(out, "clouds_percent[%d]=%s\n", j,
-                                   loc->clouds_percent[j]);
+            if (loc->clouds_percent[j])
+                g_string_append_printf(out, "clouds_percent[%d]=%s\n", j,
+                                       loc->clouds_percent[j]);
         CACHE_APPEND("fog_percent=%s\n", loc->fog_percent);
         CACHE_APPEND("precipitation_value=%s\n", loc->precipitation_value);
         CACHE_APPEND("precipitation_unit=%s\n", loc->precipitation_unit);


More information about the Xfce4-commits mailing list