From 21e94dec99c3ca77c565aeb6ac89cc28cc5b60b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Tue, 8 Mar 2022 21:54:10 +0100 Subject: [PATCH] Geography: Use path from constants --- gramps/plugins/lib/maps/geography.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gramps/plugins/lib/maps/geography.py b/gramps/plugins/lib/maps/geography.py index 3bed70cf1..69719aa4d 100644 --- a/gramps/plugins/lib/maps/geography.py +++ b/gramps/plugins/lib/maps/geography.py @@ -83,7 +83,6 @@ _LOG = logging.getLogger("maps.geography") # # ------------------------------------------------------------------------- _ = glocale.translation.sgettext -GEOGRAPHY_PATH = os.path.join(HOME_DIR, "maps") # ------------------------------------------------------------------------- # @@ -116,7 +115,7 @@ class GeoGraphyView(OsmGps, NavigationView): """ # settings in the config file CONFIGSETTINGS = ( - ('geography.path', GEOGRAPHY_PATH), + ('geography.path', constants.GEOGRAPHY_PATH), ('geography.zoom', 10), ('geography.zoom_when_center', 12), @@ -147,7 +146,7 @@ class GeoGraphyView(OsmGps, NavigationView): self.lock = config.get("geography.lock") tile_path = config.get('geography.path') if tile_path == "": - config.set('geography.path', GEOGRAPHY_PATH) + config.set('geography.path', constants.GEOGRAPHY_PATH) else: # verify is the path always exists if os.path.exists(tile_path) and os.path.isdir(tile_path): @@ -1374,7 +1373,7 @@ class GeoGraphyView(OsmGps, NavigationView): if self.path_entry.get_text().strip(): config.set('geography.path', self.path_entry.get_text()) else: - config.set('geography.path', GEOGRAPHY_PATH) + config.set('geography.path', constants.GEOGRAPHY_PATH) def select_tilepath(self, *obj): """