]> err.no Git - mapper/commitdiff
Use the new position save function to save home and also destination.
authorKaj-Michael Lang <milang@tal.org>
Fri, 21 Mar 2008 12:42:55 +0000 (14:42 +0200)
committerKaj-Michael Lang <milang@tal.org>
Fri, 21 Mar 2008 12:42:55 +0000 (14:42 +0200)
- Someday we will have a proper bookmarks system but for now this will do.

src/cb.c

index 7a0f8c8f150206011d2fa67a2adbe4271ae8abbb..549ef0dadbce5d816cf1a6787389148c15530f8e 100644 (file)
--- 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;
 }