summaryrefslogtreecommitdiff
path: root/navit/navit.c
diff options
context:
space:
mode:
authormdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-11-23 21:25:30 +0000
committermdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-11-23 21:25:30 +0000
commit669edfcd220a3bd8e69e352578a8fc369477ac08 (patch)
tree36bb26b158d93beead3b9c526cc67a896a9386d9 /navit/navit.c
parent10608d12fc25cae72f8ad3ce67f2310a70988159 (diff)
downloadnavit-669edfcd220a3bd8e69e352578a8fc369477ac08.tar.gz
Fix:gui_internal:Do not allow duplicate entries in the list of former destinations. Fixes #955. Thank you sleske.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4847 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/navit.c')
-rw-r--r--navit/navit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/navit/navit.c b/navit/navit.c
index baddb777a..452b84c6e 100644
--- a/navit/navit.c
+++ b/navit/navit.c
@@ -1480,7 +1480,7 @@ navit_set_destination(struct navit *this_, struct pcoord *c, const char *descrip
} else
this_->destination_valid=0;
destination_file = bookmarks_get_destination_file(TRUE);
- bookmarks_append_coord(this_->bookmarks, destination_file, c, 1, "former_destination", description, NULL, this_->recentdest_count);
+ bookmarks_append_coord(this_->former_destination, destination_file, c, type_former_destination, description, this_->recentdest_count);
g_free(destination_file);
callback_list_call_attr_0(this_->attr_cbl, attr_destination);
if (this_->route) {
@@ -1509,7 +1509,7 @@ navit_set_destinations(struct navit *this_, struct pcoord *c, int count, const c
} else
this_->destination_valid=0;
destination_file = bookmarks_get_destination_file(TRUE);
- bookmarks_append_coord(this_->bookmarks, destination_file, c, count, "former_itinerary", description, NULL, this_->recentdest_count);
+ bookmarks_append_coord(this_->former_destination, destination_file, c, type_former_itinerary, description, this_->recentdest_count);
g_free(destination_file);
callback_list_call_attr_0(this_->attr_cbl, attr_destination);
if (this_->route) {
@@ -2841,7 +2841,7 @@ navit_vehicle_update(struct navit *this_, struct navit_vehicle *nv)
route_remove_waypoint(this_->route);
count=route_get_destinations(this_->route, pc, 16);
destination_file = bookmarks_get_destination_file(TRUE);
- bookmarks_append_coord(this_->bookmarks, destination_file, pc, count, "former_itinerary_part", NULL, NULL, this_->recentdest_count);
+ bookmarks_append_coord(this_->former_destination, destination_file, pc, type_former_itinerary_part, NULL, this_->recentdest_count);
break;
case 2:
navit_set_destination(this_, NULL, NULL, 0);