]> err.no Git - mapper/commitdiff
Use idle callbacks for updating location info
authorKaj-Michael Lang <milang@onion.tal.org>
Sun, 4 Nov 2007 17:39:03 +0000 (19:39 +0200)
committerKaj-Michael Lang <milang@onion.tal.org>
Sun, 4 Nov 2007 17:39:03 +0000 (19:39 +0200)
src/search.c

index 983dcf816667a6b526b59f9a4913cba7dc3f0ba7..8e1564a972fc4c1739f2f98c50be3b693e5f20bf 100644 (file)
@@ -214,7 +214,7 @@ gtk_tree_model_get(model, &iter, ITEM_LAT, &lat, -1);
 gtk_tree_model_get(model, &iter, ITEM_LON, &lon, -1);
 
 map_center_latlon(lat, lon);
-map_update_location_from_center();
+g_idle_add_full(G_PRIORITY_HIGH_IDLE,(GSourceFunc)map_update_location_from_center, NULL, NULL);
 #if 0
 gtk_widget_destroy(s->dialog);
 #endif
@@ -320,7 +320,7 @@ while ((res=gtk_dialog_run(GTK_DIALOG(sd.dialog)))!=GTK_RESPONSE_REJECT) {
                        popup_error(sd.dialog, _("Select a location from the list."));
                } else {
                        map_center_latlon(lat, lon);
-                       map_update_location_from_center();
+                       g_idle_add_full(G_PRIORITY_HIGH_IDLE,(GSourceFunc)map_update_location_from_center, NULL, NULL);
                }
                continue;
        break;
@@ -329,7 +329,7 @@ while ((res=gtk_dialog_run(GTK_DIALOG(sd.dialog)))!=GTK_RESPONSE_REJECT) {
                        popup_error(sd.dialog, _("Select a location from the list."));
                } else {
                        _dest.valid=TRUE;
-                       map_update_location_from_center();
+                       g_idle_add_full(G_PRIORITY_HIGH_IDLE,(GSourceFunc)map_update_location_from_center, NULL, NULL);
                }
                continue;
        break;