[Xfce4-commits] <xfce4-weather-plugin:master> Round altitude (feet) too.

Harald Judt noreply at xfce.org
Wed Nov 28 20:16:02 CET 2012


Updating branch refs/heads/master
         to 753dc089d10f6aac15e8eba49de5b83bc96d269b (commit)
       from 8c0775a66d471cedce80c32d02c3c5e7ad00d3e5 (commit)

commit 753dc089d10f6aac15e8eba49de5b83bc96d269b
Author: Harald Judt <h.judt at gmx.at>
Date:   Wed Nov 28 20:13:12 2012 +0100

    Round altitude (feet) too.
    
    Meters are available in integers only, so no need to round then.

 panel-plugin/weather-data.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c
index 9fb2c64..8311e69 100644
--- a/panel-plugin/weather-data.c
+++ b/panel-plugin/weather-data.c
@@ -90,7 +90,7 @@ get_data(const xml_time *timeslice,
         case FEET:
             val = string_to_double(loc->altitude, 0);
             val /= 0.3048;
-            return g_strdup_printf("%.2f", val);
+            return g_strdup_printf(ROUND_TO_INT("%.2f"), val);
         }
 
     case LATITUDE:


More information about the Xfce4-commits mailing list