static gboolean show_directions=TRUE;
+static WayPoint *announced_waypoint=NULL;
+
typedef struct _OriginToggleInfo OriginToggleInfo;
struct _OriginToggleInfo {
GtkWidget *rad_use_gps;
if (GTK_RESPONSE_OK == gtk_dialog_run(GTK_DIALOG(confirm))) {
route_cancel_autoroute(FALSE);
+ announced_waypoint=NULL;
path_free(_route);
_route=path_new();
route_find_nearest_point();
map_force_redraw();
}
-_dest.valid=FALSE;
+
gtk_widget_destroy(confirm);
}
announce_thres_unsquared=(20+(guint)gps->speed)*_announce_notice_ratio*3;
-if (_next_way_dist_squared < (announce_thres_unsquared * announce_thres_unsquared))
+if (_next_way_dist_squared<(announce_thres_unsquared * announce_thres_unsquared) && _next_way!=announced_waypoint) {
announce_waypoint(_next_way->desc);
+ announced_waypoint=_next_way;
+}
+
}
/**