gtk_tree_model_get(model, &iter, POI_LON, &lon, -1);
map_center_latlon(lat, lon);
+map_update_location_from_center();
return TRUE;
}
static gboolean
poi_route_to_cb(GtkWidget *widget, gpointer data)
{
+GtkTreeIter iter;
+GtkTreeView *tree=GTK_TREE_VIEW(data);
+GtkTreeModel *model = GTK_TREE_MODEL(data);
+
+if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)), NULL, &iter))
+ return TRUE;
+
+model=gtk_tree_view_get_model(GTK_TREE_VIEW(tree));
+if (!model)
+ return TRUE;
+
+_dest.valid=TRUE;
+gtk_tree_model_get(model, &iter, POI_LAT, &_dest.lat, -1);
+gtk_tree_model_get(model, &iter, POI_LON, &_dest.lon, -1);
+
+map_update_location_from_center();
+
return TRUE;
}