gboolean
menu_cb_route_download(GtkAction *action)
{
-route_download(_route, NULL);
+route_download_dialog(_route, NULL);
route_menu_set_sensitive(path_tree_view_update_store(route_tree_view, _route));
return TRUE;
}
gboolean
menu_cb_maps_select(GtkAction *action, gpointer new_repo)
{
-gtk_map_set_repo(_map, new_repo);
+gtk_map_set_tile_repository(_map, new_repo);
return TRUE;
}
g_ascii_formatd(strlon, 32, "%.06f", lon);
g_snprintf(buffer, sizeof(buffer), "%s, %s", strlat, strlon);
-route_download(_route, buffer);
+route_download_dialog(_route, buffer);
}
void
gtk_map_get_menu_latlon(_map, &lat, &lon);
if ((way = path_find_nearest_waypoint(_route, lat, lon)))
- route_show_distance_to(_route, way->point);
+ path_show_distance_to(_route, way->point);
return TRUE;
}
void
path_show_distance_from_last(Path *path)
{
-path_show_distance_from(path, path_find_last_point(path));
+Point *point;
+
+g_return_if_fail(path);
+
+point=path_find_last_point(path);
+g_return_if_fail(point);
+
+path_show_distance_from(path, point);
}
/**
void
path_show_distance_from_first(Path *path)
{
+g_return_if_fail(path);
+
path_show_distance_from(path, path->head);
}
/**
- * route_show_distance_to:
+ * path_show_distance_to:
*
* Show the distance from the current GPS location to the given point,
* following the route. If point is NULL, then the distance is shown to the
g_return_if_fail(route);
if (route->head != route->tail) {
- route_show_distance_to(route, path_find_last_point(route));
+ path_show_distance_to(route, path_find_last_point(route));
} else {
MACRO_BANNER_SHOW_INFO(_window, _("The current route is empty."));
}
MACRO_BANNER_SHOW_INFO(_window, _("Route Opened"));
/* Find the nearest route point, if we're connected. */
path_find_nearest_point(route, _gps->data.lat, _gps->data.lon);
- route_set_destination_from_last(route, &_dest);
+ path_set_destination_from_last(route, &_dest);
return TRUE;
} else {
popup_error(_window, _("Error parsing route GPX file."));
* safe to free either string as soon as this function returns.
*/
gboolean
-route_download(Path *route, gchar *to)
+route_download_dialog(Path *route, gchar *to)
{
GtkWidget *dialog;
GtkWidget *table;
}
g_free(rdl_data.bytes);
- route_set_destination_from_last(route, &_dest);
+ path_set_destination_from_last(route, &_dest);
MACRO_BANNER_SHOW_INFO(_window, _("Route Downloaded"));