]> err.no Git - mapper/blobdiff - src/config-gconf.c
Move ProgressUpdateInfo struct
[mapper] / src / config-gconf.c
index 2966e958447b919cbacf8f6e52d36f5d56449dba..f3d3c740f3844f89107c1169aa98b80aa374796f 100644 (file)
 #include "utils.h"
 #include "mapper-types.h"
 #include "latlon.h"
-#include "map.h"
-#include "route.h"
 #include "db.h"
 #include "poi.h"
 #include "gps.h"
 #include "ui-common.h"
 #include "settings.h"
-#include "gpx.h"
 #include "filter.h"
 #include "dialogs.h"
 #include "map-tile-repo.h"
@@ -294,7 +291,6 @@ gconf_client_set_float(gconf_client, GCONF_KEY_LAT, _gps->data.lat, NULL);
 gconf_client_set_float(gconf_client, GCONF_KEY_LON, _gps->data.lon, NULL);
 
 /* Save last center latitude/longitude. */
-unit2latlon(_center.unitx, _center.unity, center_lat, center_lon);
 gconf_client_set_float(gconf_client, GCONF_KEY_CENTER_LAT, center_lat, NULL);
 gconf_client_set_float(gconf_client, GCONF_KEY_CENTER_LON, center_lon, NULL);
 
@@ -392,7 +388,7 @@ GConfValue *value;
 gchar *config_dir;
 gchar *str;
 gint i;
-CenterMode _center_mode = CENTER_LEAD;
+GtkMapCenterMode _center_mode = CENTER_LEAD;
 UnitType _units = UNITS_KM;
 guint _degformat = DDPDDDDD;
 InfoFontSize _info_font_size = INFO_FONT_MEDIUM;
@@ -423,7 +419,7 @@ _lead_ratio=mapper_gconf_get_int(GCONF_KEY_LEAD_AMOUNT, 5);
 _draw_width=mapper_gconf_get_int(GCONF_KEY_DRAW_WIDTH, 4);
 
 /* Invalidate destination */
-_dest.valid=FALSE;
+_dest->valid=FALSE;
 
 /* Get Announce Advance Notice - Default is 30. */
 _announce_notice_ratio=mapper_gconf_get_int(GCONF_KEY_ANNOUNCE_NOTICE, 8);
@@ -516,8 +512,8 @@ _gps->data.lat=mapper_gconf_get_float(GCONF_KEY_LAT, 60.20);
 _gps->data.lon=mapper_gconf_get_float(GCONF_KEY_LON, 22.20);
 
 /* Special positions Home and Dest */
-config_load_position(&_home, GCONF_KEY_POSITION_HOME);
-config_load_position(&_dest, GCONF_KEY_POSITION_DEST);
+config_load_position(_home, GCONF_KEY_POSITION_HOME);
+config_load_position(_dest, GCONF_KEY_POSITION_DEST);
 
 /* Get last center point. */
 {
@@ -540,8 +536,6 @@ config_load_position(&_dest, GCONF_KEY_POSITION_DEST);
        } else {
                center_lon = _gps->data.lon;
        }
-
-       latlon2unit(center_lat, center_lon, _center.unitx, _center.unity);
 }
 
 config_load_repo();
@@ -549,13 +543,12 @@ config_load_repo();
 /* Get last Zoom Level.  Default is 12. */
 value = gconf_client_get(gconf_client, GCONF_KEY_ZOOM, NULL);
 if (value) {
-       _zoom = gconf_value_get_int(value) / _curr_repo->view_zoom_steps * _curr_repo->view_zoom_steps;
+       _zoom=gconf_value_get_int(value) / _curr_repo->view_zoom_steps * _curr_repo->view_zoom_steps;
        gconf_value_free(value);
 } else {
-       _zoom = 12 / _curr_repo->view_zoom_steps * _curr_repo->view_zoom_steps;
+       _zoom=12 / _curr_repo->view_zoom_steps * _curr_repo->view_zoom_steps;
 }
-BOUND(_zoom, 0, MAX_ZOOM - 1);
-_world_size_tiles = unit2tile(WORLD_SIZE_UNITS);
+BOUND(_zoom, 0, 20);
 
 /* Get Route Directory.  Default is NULL. */
 _route_dir_uri = gconf_client_get_string(gconf_client, GCONF_KEY_ROUTEDIR, NULL);