Updating branch refs/heads/master
to 5325e179a10517713a86fb579eaa8eee56fa3b8b (commit)
from 690fbb915c7e87f935fca2a7cfe8120c2ae67161 (commit)
commit 5325e179a10517713a86fb579eaa8eee56fa3b8b
Author: Harald Judt <[email protected]>
Date: Fri Jan 25 19:10:34 2013 +0100
Config dialog: Set altitude to 0 when detection failed.
panel-plugin/weather-config.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 66273a2..355c781 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -237,15 +237,14 @@ 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 (dialog->pd->units->altitude == FEET)
- alt /= 0.3048;
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->spin_alt),
- alt);
- }
xml_altitude_free(altitude);
}
+ weather_debug("Altitude returned by GeoNames: %.0f meters", alt);
+ if (alt < -420)
+ alt = 0;
+ else if (dialog->pd->units->altitude == FEET)
+ alt /= 0.3048;
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->spin_alt), alt);
}
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits