[Xfce4-commits] <xfce4-weather-plugin:master> Do altitude unit conversion after location has been chosen.
Harald Judt
noreply at xfce.org
Wed Nov 28 20:16:01 CET 2012
Updating branch refs/heads/master
to 8c0775a66d471cedce80c32d02c3c5e7ad00d3e5 (commit)
from a109997fa3e987b0aa35f475db3185e96c73c22a (commit)
commit 8c0775a66d471cedce80c32d02c3c5e7ad00d3e5
Author: Harald Judt <h.judt at gmx.at>
Date: Wed Nov 28 20:12:44 2012 +0100
Do altitude unit conversion after location has been chosen.
The altitude unit preference was not respected, this fixes it.
panel-plugin/weather-config.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 8cbf708..d2c5652 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -196,9 +196,12 @@ cb_lookup_altitude(SoupSession *session,
if (altitude) {
alt = string_to_double(altitude->altitude, -9999);
weather_debug("Altitude returned by GeoNames: %.0f meters", alt);
- if (alt >= -420)
+ if (alt >= -420) {
+ if (dialog->wd->units->altitude == FEET)
+ alt /= 0.3048;
gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->spin_alt),
alt);
+ }
xml_altitude_free(altitude);
}
}
More information about the Xfce4-commits
mailing list