Updating branch refs/heads/master
to c1afebf13a652e80624f9639a828afe804dfc621 (commit)
from d3ccfcfff7b0682944a11f56d1a86a6794a9a8d3 (commit)
commit c1afebf13a652e80624f9639a828afe804dfc621
Author: Harald Judt <[email protected]>
Date: Tue Nov 27 18:59:37 2012 +0100
Fix wrong windspeed and pressure calculation for certain units.
Caused by missing break statements.
panel-plugin/weather-data.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c
index 5f610d7..9fb2c64 100644
--- a/panel-plugin/weather-data.c
+++ b/panel-plugin/weather-data.c
@@ -115,10 +115,13 @@ get_data(const xml_time *timeslice,
switch (units->pressure) {
case INCH_MERCURY:
val *= 0.03;
+ break;
case PSI:
val *= 0.01450378911491;
+ break;
case TORR:
val /= 1.333224;
+ break;
}
return g_strdup_printf(ROUND_TO_INT("%.1f"), val);
@@ -127,8 +130,10 @@ get_data(const xml_time *timeslice,
switch (units->windspeed) {
case KMH:
val *= 3.6;
+ break;
case MPH:
val *= 2.2369362920544;
+ break;
}
return g_strdup_printf(ROUND_TO_INT("%.1f"), val);
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits