[LP#1581708] Fix incorrect reporting units on "Feel" value in weather plugin.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Sat, 12 Nov 2016 00:20:40 +0000 (02:20 +0200)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Sat, 12 Nov 2016 00:22:16 +0000 (02:22 +0200)
YQL always reports Fahrenheit degrees there.

ChangeLog
plugins/weather/weatherwidget.c

index f89b923..ff33d7c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -62,6 +62,8 @@
     config variable is UseSmallerIcons and default is 1 (old behavior).
 * Changed volume slider popup behavior - it now hides when loses focus.
 * Fixed invalid memory access in weather plugin.
+* Fixed incorrect reporting units on "Feel" value in weather plugin. YQL
+    always reports Fahrenheit degrees there.
 
 0.8.2
 -------------------------------------------------------------------------
index c2d4763..3cca937 100644 (file)
@@ -1615,6 +1615,9 @@ gtk_weather_run_conditions_dialog(GtkWidget * widget)
                        2,2);
 
       gchar * feels = g_strdup_printf("%d \302\260%s", 
+                          /* Yahoo reports chill always in Fahreheit degrees */
+                                      (location->cUnits_ == 'c') ?
+                                      (forecast->iWindChill_ - 32) * 5 / 9 :
                                       forecast->iWindChill_,
                                       forecast->units_.pcTemperature_);