Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geography: Use path from constants #1361

Merged
merged 1 commit into from
Jul 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions gramps/plugins/lib/maps/geography.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
#
# -------------------------------------------------------------------------
_ = glocale.translation.sgettext
GEOGRAPHY_PATH = os.path.join(HOME_DIR, "maps")

# -------------------------------------------------------------------------
#
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -147,7 +146,7 @@ def __init__(self, title, pdata, dbstate, uistate,
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):
Expand Down Expand Up @@ -1374,7 +1373,7 @@ def set_tilepath(self, *obj):
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):
"""
Expand Down