[libgweather] GWeatherInfo: don't require forecast data for sun strings



commit 9ec3045153c720f90358098fffea1e7d31411bd9
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sat Feb 16 17:50:31 2013 +0100

    GWeatherInfo: don't require forecast data for sun strings
    
    Similar to get_value_sunrise(), get_sunrise() and get_sunset() should
    only check if their fields are valid before bailing out.

 libgweather/weather.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgweather/weather.c b/libgweather/weather.c
index 7f8733a..6161b65 100644
--- a/libgweather/weather.c
+++ b/libgweather/weather.c
@@ -872,7 +872,7 @@ gweather_info_get_sunrise (GWeatherInfo *info)
 
     _gweather_info_ensure_sun (info);
 
-    if (!priv->valid || !priv->sunriseValid)
+    if (!priv->sunriseValid)
         return g_strdup ("-");
 
     sunrise = g_date_time_new_from_unix_local (priv->sunrise);
@@ -898,7 +898,7 @@ gweather_info_get_sunset (GWeatherInfo *info)
 
     _gweather_info_ensure_sun (info);
 
-    if (!priv->valid || !priv->sunsetValid)
+    if (!priv->sunsetValid)
         return g_strdup ("-");
 
     sunset = g_date_time_new_from_unix_local (priv->sunset);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]