]> err.no Git - mapper/commitdiff
Search: Remove calls to map_update_location_from_center(), we will use the maps locat...
authorKaj-Michael Lang <milang@tal.org>
Wed, 21 May 2008 11:31:23 +0000 (14:31 +0300)
committerKaj-Michael Lang <milang@tal.org>
Wed, 21 May 2008 11:31:23 +0000 (14:31 +0300)
src/search.c

index 7601ffa934079e164a5a945ce3b5091c03ea7fc9..ef6f5983becb5e5824f11cb23a649b6c1120d4d5 100644 (file)
@@ -42,7 +42,7 @@
 #include "utils.h"
 #include "poi.h"
 #include "gps.h"
-#include "map.h"
+#include "gtkmap.h"
 #include "mapper-types.h"
 #include "ui-common.h"
 #include "settings.h"
@@ -227,10 +227,6 @@ gtk_tree_model_get(model, &iter, ITEM_LAT, &lat, -1);
 gtk_tree_model_get(model, &iter, ITEM_LON, &lon, -1);
 
 gtk_map_center_latlon(_map, lat, lon);
-g_idle_add_full(G_PRIORITY_HIGH_IDLE,(GSourceFunc)map_update_location_from_center, NULL, NULL);
-#if 0
-gtk_widget_destroy(s->dialog);
-#endif
 }
 
 gboolean
@@ -356,8 +352,7 @@ while ((res=gtk_dialog_run(GTK_DIALOG(sd.dialog)))!=GTK_RESPONSE_REJECT) {
                        popup_error(sd.dialog, _("Select a location from the list."));
 #endif
                } else {
-                       map_center_latlon(lat, lon);
-                       g_idle_add_full(G_PRIORITY_HIGH_IDLE,(GSourceFunc)map_update_location_from_center, NULL, NULL);
+                       gtk_map_center_latlon(_map, lat, lon);
                }
                continue;
        break;
@@ -370,7 +365,6 @@ while ((res=gtk_dialog_run(GTK_DIALOG(sd.dialog)))!=GTK_RESPONSE_REJECT) {
 #endif
                } else {
                        position_set(_dest, TRUE, lat, lon, 0);
-                       g_idle_add_full(G_PRIORITY_HIGH_IDLE,(GSourceFunc)map_update_location_from_center, NULL, NULL);
                }
                continue;
        break;