Geography: Use path from constants
This commit is contained in:
parent
8b0e5dac6f
commit
21e94dec99
@ -83,7 +83,6 @@ _LOG = logging.getLogger("maps.geography")
|
|||||||
#
|
#
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
_ = glocale.translation.sgettext
|
_ = glocale.translation.sgettext
|
||||||
GEOGRAPHY_PATH = os.path.join(HOME_DIR, "maps")
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -116,7 +115,7 @@ class GeoGraphyView(OsmGps, NavigationView):
|
|||||||
"""
|
"""
|
||||||
# settings in the config file
|
# settings in the config file
|
||||||
CONFIGSETTINGS = (
|
CONFIGSETTINGS = (
|
||||||
('geography.path', GEOGRAPHY_PATH),
|
('geography.path', constants.GEOGRAPHY_PATH),
|
||||||
|
|
||||||
('geography.zoom', 10),
|
('geography.zoom', 10),
|
||||||
('geography.zoom_when_center', 12),
|
('geography.zoom_when_center', 12),
|
||||||
@ -147,7 +146,7 @@ class GeoGraphyView(OsmGps, NavigationView):
|
|||||||
self.lock = config.get("geography.lock")
|
self.lock = config.get("geography.lock")
|
||||||
tile_path = config.get('geography.path')
|
tile_path = config.get('geography.path')
|
||||||
if tile_path == "":
|
if tile_path == "":
|
||||||
config.set('geography.path', GEOGRAPHY_PATH)
|
config.set('geography.path', constants.GEOGRAPHY_PATH)
|
||||||
else:
|
else:
|
||||||
# verify is the path always exists
|
# verify is the path always exists
|
||||||
if os.path.exists(tile_path) and os.path.isdir(tile_path):
|
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():
|
if self.path_entry.get_text().strip():
|
||||||
config.set('geography.path', self.path_entry.get_text())
|
config.set('geography.path', self.path_entry.get_text())
|
||||||
else:
|
else:
|
||||||
config.set('geography.path', GEOGRAPHY_PATH)
|
config.set('geography.path', constants.GEOGRAPHY_PATH)
|
||||||
|
|
||||||
def select_tilepath(self, *obj):
|
def select_tilepath(self, *obj):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user