From 47265472b2c4e73b3290487c10e8368c7570d4d7 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Tue, 22 Jul 2008 12:38:31 +0300 Subject: [PATCH] Path: rename some path distance displaying functions --- src/cb.c | 4 ++-- src/path-mapper.c | 18 +++++++++++------- src/path-mapper.h | 7 ++++--- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/cb.c b/src/cb.c index 69d2745..adee9b8 100644 --- a/src/cb.c +++ b/src/cb.c @@ -109,7 +109,7 @@ return TRUE; gboolean menu_cb_route_distnext(GtkAction *action) { -path_show_distance_to_next(_route); +path_show_distance_to_next_waypoint(_route); return TRUE; } @@ -706,7 +706,7 @@ switch (_action[custom_key]) { } break; case CUSTOM_ACTION_ROUTE_DISTNEXT: - path_show_distance_to_next(_route); + path_show_distance_to_next_waypoint(_route); break; case CUSTOM_ACTION_ROUTE_DISTLAST: path_show_distance_to_last(_route); diff --git a/src/path-mapper.c b/src/path-mapper.c index 8d2063a..d0bf431 100644 --- a/src/path-mapper.c +++ b/src/path-mapper.c @@ -19,7 +19,7 @@ */ /** - * Contains extra path functions. + * Contains extra path functions, specific to mapper. */ #include @@ -125,7 +125,7 @@ path_show_distance_from(path, path->head); * next waypoint. */ gboolean -route_show_distance_to(Path *route, Point *point) +path_show_distance_to(Path *route, Point *point) { gchar buffer[80]; gdouble lat, lon; @@ -142,24 +142,28 @@ return TRUE; } /** - * route_show_distance_to_next_waypoint: + * path_show_distance_to_next_waypoint: + * + * Display distance to next waypoint in given route * */ void -route_show_distance_to_next_waypoint(Path *route) +path_show_distance_to_next_waypoint(Path *route) { g_return_if_fail(route); -if (!route_show_distance_to(route, NULL)) +if (!path_show_distance_to(route, NULL)) MACRO_BANNER_SHOW_INFO(_window, _("There is no next waypoint.")); } /** - * route_show_distance_to_last: + * path_show_distance_to_last: + * + * Show distance to last point in given route * */ void -route_show_distance_to_last(Path *route) +path_show_distance_to_last(Path *route) { g_return_if_fail(route); diff --git a/src/path-mapper.h b/src/path-mapper.h index 81cc389..27112af 100644 --- a/src/path-mapper.h +++ b/src/path-mapper.h @@ -39,9 +39,10 @@ gboolean path_clear_ask(Path *path, const gchar *msg); gboolean path_insert_mark_ask(Path *track); void route_autoroute_check(Path *route); -gboolean route_show_distance_to(Path *route, Point *point); -void route_show_distance_to_last(Path *route); -void route_show_distance_to_next(Path *route); + +gboolean path_show_distance_to(Path *route, Point *point); +void path_show_distance_to_last(Path *route); +void path_show_distance_to_next(Path *route); gboolean track_save(Path *track); gboolean track_open(Path *track); -- 2.39.5