GtkWidget *txt_to;
};
-gboolean route_open_file()
+void
+route_clear(void)
+{
+GtkWidget *confirm;
+
+confirm = hildon_note_new_confirmation(GTK_WINDOW(_window), _("Really clear the route?"));
+
+if (GTK_RESPONSE_OK == gtk_dialog_run(GTK_DIALOG(confirm))) {
+ cancel_autoroute(FALSE);
+ MACRO_PATH_FREE(_route);
+ MACRO_PATH_INIT(_route);
+ route_find_nearest_point();
+ map_force_redraw();
+}
+gtk_widget_destroy(confirm);
+}
+
+gboolean
+route_open_file()
{
gchar *buffer;
gint size;
return FALSE;
}
-gboolean origin_type_selected(GtkWidget * toggle, OriginToggleInfo * oti)
+gboolean
+origin_type_selected(GtkWidget * toggle, OriginToggleInfo * oti)
{
printf("%s()\n", __PRETTY_FUNCTION__);
/**
* Cancel the current auto-route.
*/
-void cancel_autoroute(gboolean temporary)
+void
+cancel_autoroute(gboolean temporary)
{
printf("%s()\n", __PRETTY_FUNCTION__);
return (size * nmemb);
}
-gboolean auto_route_dl_idle()
+gboolean
+auto_route_dl_idle()
{
gchar latstr[32], lonstr[32], *latlonstr;
printf("%s(%f, %f, %s)\n", __PRETTY_FUNCTION__,
* None of the passed strings are freed - that is left to the caller, and it is
* safe to free either string as soon as this function returns.
*/
-gboolean route_download(gchar * to)
+gboolean
+route_download(gchar * to)
{
GtkWidget *dialog;
GtkWidget *table;
return TRUE;
}
-WayPoint *find_nearest_waypoint(guint unitx, guint unity)
+WayPoint *
+find_nearest_waypoint(guint unitx, guint unity)
{
WayPoint *wcurr;
WayPoint *wnear;
* the entire list (starting from _near_point) is searched. Otherwise, we
* stop searching when we find a point that is farther away.
*/
-gboolean route_update_nears(gboolean quick)
+gboolean
+route_update_nears(gboolean quick)
{
gboolean ret = FALSE;
Point *curr, *near;
* Reset the _near_point data by searching the entire route for the nearest
* route point and waypoint.
*/
-void route_find_nearest_point()
+void
+route_find_nearest_point()
{
printf("%s()\n", __PRETTY_FUNCTION__);
* following the route. If point is NULL, then the distance is shown to the
* next waypoint.
*/
-gboolean route_show_distance_to(Point * point)
+gboolean
+route_show_distance_to(Point * point)
{
gchar buffer[80];
gfloat lat1, lon1, lat2, lon2;
printf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
}
-void route_show_distance_to_next()
+void
+route_show_distance_to_next()
{
printf("%s()\n", __PRETTY_FUNCTION__);
printf("%s(): return\n", __PRETTY_FUNCTION__);
}
-void route_show_distance_to_last()
+void
+route_show_distance_to_last()
{
printf("%s()\n", __PRETTY_FUNCTION__);