[Xfce4-commits] <xfce4-weather-plugin:master> Really fix too long latitude/longitude from search results.

Harald Judt noreply at xfce.org
Mon Dec 10 19:58:01 CET 2012


Updating branch refs/heads/master
         to 84b595ba41a2cdd9a1969469e7bec79abe5dfe1a (commit)
       from 7918026fe7a732cebbae73a2e29406af639bc1fa (commit)

commit 84b595ba41a2cdd9a1969469e7bec79abe5dfe1a
Author: Harald Judt <h.judt at gmx.at>
Date:   Mon Dec 10 18:55:00 2012 +0100

    Really fix too long latitude/longitude from search results.
    
    Latitude and longitude spin buttons only have 6 digits, but we format
    them to 7 digits. This error got introduced during rebase of the cache-data
    branch.

 panel-plugin/weather-config.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 924f28d..91d170f 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -350,18 +350,18 @@ cb_findlocation(GtkButton *button,
     xfceweather_dialog *dialog = (xfceweather_dialog *) user_data;
     search_dialog *sdialog;
     gchar *loc_name, *lat, *lon;
-    gchar latbuf[15], lonbuf[15];
+    gchar latbuf[10], lonbuf[10];
 
     sdialog = create_search_dialog(NULL, dialog->pd->session);
 
     gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE);
     if (run_search_dialog(sdialog)) {
         /* limit digit precision of coordinates from search results */
-        lat = g_ascii_formatd(latbuf, 15, "%.7f",
+        lat = g_ascii_formatd(latbuf, 10, "%.6f",
                               string_to_double(sdialog->result_lat, 0));
         gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->spin_lat),
                                   string_to_double(lat, 0));
-        lon = g_ascii_formatd(lonbuf, 15, "%.7f",
+        lon = g_ascii_formatd(lonbuf, 10, "%.6f",
                               string_to_double(sdialog->result_lon, 0));
         gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->spin_lon),
                                   string_to_double(lon, 0));


More information about the Xfce4-commits mailing list