static void button_bookmark(GtkWidget *widget, struct search_param *search) { struct coord *c=NULL; GtkTreeIter iter; char *desc; gtk_tree_model_get_iter_first (GTK_TREE_MODEL (search->liststore2), &iter); gtk_tree_model_get (GTK_TREE_MODEL (search->liststore2), &iter, COL_COUNT, &c, -1); if (c) { desc=description(search, &iter); navit_add_bookmark(search->nav, c, desc); g_free(desc); } }
static void popup_set_bookmark(struct navit *nav, struct pcoord *pc) { struct coord c; struct coord_geo g; char buffer[1024]; char buffer_geo[1024]; c.x = pc->x; c.y = pc->y; transform_to_geo(pc->pro, &c, &g); transform_geo_text(&g, buffer_geo); sprintf(buffer,"Map Point %s", buffer_geo); if (!gui_add_bookmark(navit_get_gui(nav), pc, buffer)) navit_add_bookmark(nav, pc, buffer); }
static void popup_set_bookmark(struct navit *nav, struct pcoord *pc) { struct coord c; struct coord_geo g; char buffer[1024]; char buffer_geo[1024]; c.x = pc->x; c.y = pc->y; transform_to_geo(pc->pro, &c, &g); coord_format(g.lat,g.lng,DEGREES_MINUTES_SECONDS,buffer_geo,sizeof(buffer_geo)); sprintf(buffer,"Map Point %s", buffer_geo); if (!gui_add_bookmark(navit_get_gui(nav), pc, buffer)) navit_add_bookmark(nav, pc, buffer); }