From 039eb8be081efa5b1fefa947ade2ee05b4a2ba9f Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Fri, 21 Mar 2008 14:42:55 +0200 Subject: [PATCH] Use the new position save function to save home and also destination. - Someday we will have a proper bookmarks system but for now this will do. --- src/cb.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/cb.c b/src/cb.c index 7a0f8c8..549ef0d 100644 --- a/src/cb.c +++ b/src/cb.c @@ -63,6 +63,7 @@ #include "filter-gui.h" #include "help.h" #include "map-repo.h" +#include "config-gconf.h" static void path_tree_view_update_store(GtkWidget *tree_view, Path *path) @@ -1058,7 +1059,9 @@ unity = y2unit(_cmenu_position_y); unit2latlon(unitx, unity, _home.lat, _home.lon); _home.valid=TRUE; -config_save_home(); +if (!config_save_position(&_home, GCONF_KEY_POSITION_HOME)) + popup_error(_window, _("Failed to save home position.")); + map_render_data(); return TRUE; } @@ -1072,9 +1075,9 @@ unitx = x2unit(_cmenu_position_x); unity = y2unit(_cmenu_position_y); unit2latlon(unitx, unity, _dest.lat, _dest.lon); _dest.valid=TRUE; -#if 0 -map_update_location_from_center(); -#endif +if (!config_save_position(&_dest, GCONF_KEY_POSITION_DEST)) + popup_error(_window, _("Failed to save destination.")); + return TRUE; } -- 2.39.5