[r21155]Use IMAGE_DIR in geography.py so that map images can be found
when running from source directory. svn: r21288
This commit is contained in:
parent
efdb6e9fd5
commit
a00a5ba32d
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user