From 4c3fa14525e44c67b9b3fbf00f86fb24afd44c97 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Fri, 6 Jun 2008 18:49:27 +0300 Subject: [PATCH] More map widget integration changes --- src/cb.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/cb.c b/src/cb.c index 5a8138d..9a5bd68 100644 --- a/src/cb.c +++ b/src/cb.c @@ -249,7 +249,7 @@ gboolean menu_cb_show_velvec(GtkAction *action) { _show_velvec = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)); -gtk_map_set_show_velvec(_map, _show_velvec); +g_object_set(_map, "show-velvec", _show_velvec, NULL); return TRUE; } @@ -257,7 +257,7 @@ gboolean menu_cb_show_poi(GtkAction *action) { _show_poi = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)); -gtk_map_set_show_poi(_map, _show_poi); +g_object_set(_map, "show-markers", _show_poi, NULL); return TRUE; } @@ -331,7 +331,6 @@ menu_cb_goto_gps(GtkAction *action) { if (gtk_map_set_center_mode(_map, CENTER_LATLON)) { MACRO_BANNER_SHOW_INFO(_window, _("At GPS track coordinates.")); - map_update_location_from_center(); } else { MACRO_BANNER_SHOW_INFO(_window, _("No active GPS track.")); } @@ -345,7 +344,7 @@ GtkMapCenterMode cm; g_return_val_if_fail(_route, TRUE); -if (_route->next_way && _route->next_way->point->unity) { +if (_route->next_way && _route->next_way->point && _route->next_way->point->unity && _route->next_way->point->unitx) { g_object_get(_map, "center-mode", &cm); if (cm>0) set_action_activate("autocenter_none", TRUE); @@ -715,7 +714,7 @@ switch (_action[custom_key]) { path_show_distance_to_last(_route); break; case CUSTOM_ACTION_TRACK_BREAK: - path_insert_break(_track); + path_add_break(_track); break; case CUSTOM_ACTION_TRACK_DISTLAST: path_show_distance_from_last(_track); @@ -1029,7 +1028,7 @@ cmenu_cb_loc_set_gps(GtkAction *action) { gtk_map_get_menu_latlon(_map, &_gps->data.lat, &_gps->data.lon); _gps->data.time=time(NULL); -path_add(_track, &_gps->data); +path_add_point(_track, &_gps->data); return TRUE; } -- 2.39.5