[Xfce4-commits] <xfce4-weather-plugin:master> Always try to detect location by IP when lat/lon unset.

Harald Judt noreply at xfce.org
Wed Jul 18 13:22:01 CEST 2012


Updating branch refs/heads/master
         to e892eb2008ab68c2feaf8583bdffcf42ebe64e06 (commit)
       from 494ddf8643f1627354be3088b1f14b5176476307 (commit)

commit e892eb2008ab68c2feaf8583bdffcf42ebe64e06
Author: Harald Judt <h.judt at gmx.at>
Date:   Wed Jul 18 13:20:28 2012 +0200

    Always try to detect location by IP when lat/lon unset.
    
    Also need to check for empty strings here.

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

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 8725e9e..fdc576e 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -498,7 +498,8 @@ create_config_dialog (xfceweather_data *data,
                                gtk_entry_get_text (GTK_ENTRY (dialog->txt_loc_name)));
 #endif
 
-  if (dialog->wd->lat == NULL || dialog->wd->lon == NULL) {
+  if ((dialog->wd->lat == NULL || dialog->wd->lon == NULL)
+      || (! strlen(dialog->wd->lat) || ! strlen(dialog->wd->lon))) {
     start_auto_locate(dialog);
   }
   gtk_size_group_add_widget (sg, label);


More information about the Xfce4-commits mailing list