[Xfce4-commits] <xfce4-weather-plugin:master> Add ft/s to wind speed units.

Harald Judt noreply at xfce.org
Tue Dec 18 17:14:03 CET 2012


Updating branch refs/heads/master
         to f3d85cf4728525a09e2e1a161fb53158f749ce5e (commit)
       from 87414ef544385febfb901f971d01c8411d96101c (commit)

commit f3d85cf4728525a09e2e1a161fb53158f749ce5e
Author: Harald Judt <h.judt at gmx.at>
Date:   Sun Dec 16 02:05:03 2012 +0100

    Add ft/s to wind speed units.

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

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index e1ead51..eb465cc 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -710,6 +710,8 @@ create_units_page(xfceweather_dialog *dialog)
     ADD_COMBO_VALUE(dialog->combo_unit_windspeed,
                     _("Meters per second (m/s)"));
     ADD_COMBO_VALUE(dialog->combo_unit_windspeed,
+                    _("Feet per second (ft/s)"));
+    ADD_COMBO_VALUE(dialog->combo_unit_windspeed,
                     _("International knots (kt)"));
     gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, BORDER);
 
diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c
index 841bc53..c23eec1 100644
--- a/panel-plugin/weather-data.c
+++ b/panel-plugin/weather-data.c
@@ -151,6 +151,9 @@ get_data(const xml_time *timeslice,
         case MPH:
             val *= 2.2369362920544;
             break;
+        case FTS:
+            val *= 3.2808399;
+            break;
         case KNOTS:
             val *= 1.9438445;
             break;
@@ -234,6 +237,8 @@ get_unit(const units_config *units,
             return _("mph");
         case MPS:
             return _("m/s");
+        case FTS:
+            return _("ft/s");
         case KNOTS:
             return _("kt");
         }
diff --git a/panel-plugin/weather-data.h b/panel-plugin/weather-data.h
index be1cc2c..7eff287 100644
--- a/panel-plugin/weather-data.h
+++ b/panel-plugin/weather-data.h
@@ -57,6 +57,7 @@ typedef enum {
     KMH,
     MPH,
     MPS,
+    FTS,
     KNOTS
 } units_windspeed;
 


More information about the Xfce4-commits mailing list