From a00a5ba32d1711409f379fbe782370e8c0cb82d9 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 4 Feb 2013 02:15:55 +0000 Subject: [PATCH] [r21155]Use IMAGE_DIR in geography.py so that map images can be found when running from source directory. svn: r21288 --- gramps/plugins/lib/maps/geography.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gramps/plugins/lib/maps/geography.py b/gramps/plugins/lib/maps/geography.py index d6c84a112..e6c5652e3 100644 --- a/gramps/plugins/lib/maps/geography.py +++ b/gramps/plugins/lib/maps/geography.py @@ -54,7 +54,7 @@ from gramps.gen.display.name import displayer as _nd from gramps.gui.views.navigationview import NavigationView from gramps.gen.utils.libformatting import FormattingHelper from gramps.gen.errors import WindowActiveError -from gramps.gen.const import HOME_DIR, ROOT_DIR +from gramps.gen.const import HOME_DIR, IMAGE_DIR from gramps.gui.managedwindow import ManagedWindow from gramps.gen.config import config from gramps.gui.editors import EditPlace, EditEvent, EditFamily, EditPerson @@ -148,13 +148,13 @@ class GeoGraphyView(OsmGps, NavigationView): self.places_found = [] self.select_fct = None self.geo_mainmap = None - path = os.path.join(ROOT_DIR, "images", "48x48", + path = os.path.join(IMAGE_DIR, "48x48", ('gramps-geo-mainmap' + '.png' )) pathu = path if sys.version_info[0] < 3: pathu = path.encode(sys.getfilesystemencoding()) self.geo_mainmap = cairo.ImageSurface.create_from_png(pathu) - path = os.path.join(ROOT_DIR, "images", "48x48", + path = os.path.join(IMAGE_DIR, "48x48", ('gramps-geo-altmap' + '.png' )) pathu = path if sys.version_info[0] < 3: @@ -171,7 +171,7 @@ class GeoGraphyView(OsmGps, NavigationView): for ident in ( EventType.BIRTH, EventType.DEATH, EventType.MARRIAGE ): - path = os.path.join(ROOT_DIR, "images", "48x48", + path = os.path.join(IMAGE_DIR, "48x48", (constants.ICONS.get(int(ident), default_image) + '.png' )) pathu = path if sys.version_info[0] < 3: