[Xfce4-commits] <xfce4-weather-plugin:master> Translate wind direction in tooltips.

Harald Judt noreply at xfce.org
Tue Nov 27 16:46:45 CET 2012


Updating branch refs/heads/master
         to 643251ea4f81f20eb923587178f5c5eee25fe91f (commit)
       from a5b33f7c3187cd4ffff547144d62512c53ee6fba (commit)

commit 643251ea4f81f20eb923587178f5c5eee25fe91f
Author: Harald Judt <h.judt at gmx.at>
Date:   Tue Nov 27 10:49:24 2012 +0100

    Translate wind direction in tooltips.

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

diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index b6477b0..e4e2d90 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -834,7 +834,7 @@ weather_get_tooltip_text(const xfceweather_data *data)
     xml_time *conditions;
     struct tm *point_tm, *start_tm, *end_tm, *sunrise_tm, *sunset_tm;
     gchar *text, *sym, *symbol, *alt, *lat, *lon, *temp;
-    gchar *windspeed, *windbeau, *winddir, *winddeg;
+    gchar *windspeed, *windbeau, *winddir, *winddir_trans, *winddeg;
     gchar *pressure, *humidity, *precipitations;
     gchar *fog, *cloudiness, *sunval, *value;
     gchar sunrise[40], sunset[40];
@@ -881,6 +881,7 @@ weather_get_tooltip_text(const xfceweather_data *data)
     DATA_AND_UNIT(windspeed, WIND_SPEED);
     DATA_AND_UNIT(windbeau, WIND_BEAUFORT);
     DATA_AND_UNIT(winddir, WIND_DIRECTION);
+    winddir_trans = translate_wind_direction(winddir);
     DATA_AND_UNIT(winddeg, WIND_DIRECTION_DEG);
     DATA_AND_UNIT(pressure, PRESSURE);
     DATA_AND_UNIT(humidity, HUMIDITY);
@@ -904,7 +905,7 @@ weather_get_tooltip_text(const xfceweather_data *data)
                "<b>Humidity:</b> %s\n"),
              data->location_name, alt,
              translate_desc(sym, data->night_time),
-             temp, windspeed, winddir, pressure, humidity);
+             temp, windspeed, winddir_trans, pressure, humidity);
         break;
 
     case TOOLTIP_VERBOSE:
@@ -935,7 +936,7 @@ weather_get_tooltip_text(const xfceweather_data *data)
              interval_start, interval_end,
              precipitations,
              temp, point,
-             windspeed, windbeau, winddir, winddeg,
+             windspeed, windbeau, winddir_trans, winddeg,
              pressure, humidity,
              fog, cloudiness,
              sunval);
@@ -950,6 +951,7 @@ weather_get_tooltip_text(const xfceweather_data *data)
     g_free(temp);
     g_free(windspeed);
     g_free(windbeau);
+    g_free(winddir_trans);
     g_free(winddir);
     g_free(winddeg);
     g_free(pressure);


More information about the Xfce4-commits mailing list