From: Kaj-Michael Lang Date: Sun, 4 Nov 2007 17:39:03 +0000 (+0200) Subject: Use idle callbacks for updating location info X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9340f21b04a3ee65407005af1c7914121bd475e6;p=mapper Use idle callbacks for updating location info --- diff --git a/src/search.c b/src/search.c index 983dcf8..8e1564a 100644 --- a/src/search.c +++ b/src/search.c @@ -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;