[Xfce4-commits] <xfce4-weather-plugin:master> Remove translate_wind_speed function.

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


Updating branch refs/heads/master
         to a5b33f7c3187cd4ffff547144d62512c53ee6fba (commit)
       from 0a4c9c0cd68e54b211042285667e4a087495108d (commit)

commit a5b33f7c3187cd4ffff547144d62512c53ee6fba
Author: Harald Judt <h.judt at gmx.at>
Date:   Tue Nov 27 10:45:26 2012 +0100

    Remove translate_wind_speed function.

 panel-plugin/weather-summary.c   |    4 +---
 panel-plugin/weather-translate.c |   19 -------------------
 panel-plugin/weather-translate.h |    3 ---
 panel-plugin/weather.c           |    3 ---
 4 files changed, 1 insertions(+), 28 deletions(-)

diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c
index 49ecd0e..1053601 100644
--- a/panel-plugin/weather-summary.c
+++ b/panel-plugin/weather-summary.c
@@ -410,9 +410,7 @@ create_summary_tab(xfceweather_data *data)
 
     /* wind */
     APPEND_BTEXT(_("\nWind\n"));
-    rawvalue = get_data(conditions, data->units, WIND_SPEED, FALSE);
-    wind = translate_wind_speed(rawvalue, data->units);
-    g_free(rawvalue);
+    wind = get_data(conditions, data->units, WIND_SPEED, FALSE);
     rawvalue = get_data(conditions, data->units, WIND_BEAUFORT, FALSE);
     value = g_strdup_printf(_("\t%s: %s (%s on the Beaufort scale)\n"),
                             _("Speed"), wind, rawvalue);
diff --git a/panel-plugin/weather-translate.c b/panel-plugin/weather-translate.c
index b92867b..06b9d6b 100644
--- a/panel-plugin/weather-translate.c
+++ b/panel-plugin/weather-translate.c
@@ -273,22 +273,3 @@ translate_wind_direction(const gchar *wdir)
     }
     return wdir_loc;
 }
-
-
-/* Return "calm", "N/A" or a number */
-gchar *
-translate_wind_speed(const gchar *wspeed,
-                     const units_config *units)
-{
-    gchar *wspeed_loc;
-
-    if (g_ascii_strcasecmp(wspeed, "calm") == 0)
-        wspeed_loc = g_strdup(_("calm"));
-    else if (g_ascii_strcasecmp(wspeed, "N/A") == 0)
-        wspeed_loc = g_strdup(_("N/A"));
-    else {
-        wspeed_loc =
-            g_strdup_printf("%s %s", wspeed, get_unit(units, WIND_SPEED));
-    }
-    return wspeed_loc;
-}
diff --git a/panel-plugin/weather-translate.h b/panel-plugin/weather-translate.h
index 042e03f..399d96c 100644
--- a/panel-plugin/weather-translate.h
+++ b/panel-plugin/weather-translate.h
@@ -34,9 +34,6 @@ gchar *translate_day(gint weekday);
 
 gchar *translate_wind_direction(const gchar *wdir);
 
-gchar *translate_wind_speed(const gchar *wspeed,
-                            const units_config *units);
-
 G_END_DECLS
 
 #endif
diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index 37af707..b6477b0 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -132,9 +132,6 @@ make_label(const xfceweather_data *data,
     case WIND_DIRECTION:
         value = translate_wind_direction(rawvalue);
         break;
-    case WIND_SPEED:
-        value = translate_wind_speed(rawvalue, data->units);
-        break;
     default:
         value = NULL;
         break;


More information about the Xfce4-commits mailing list