From 9755c2f794880abeb72da0789b4ce7bc38a08e4c Mon Sep 17 00:00:00 2001 From: John Ralls Date: Wed, 30 Jan 2013 14:54:08 +0000 Subject: [PATCH] Revert "Allow hard-coded paths to be overridden with $XDG_DATA_DIRS" This reverts r21246 svn: r21257 --- gramps/gen/const.py.in | 27 ++++++++++----------------- mac/gramps.bundle | 4 ---- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/gramps/gen/const.py.in b/gramps/gen/const.py.in index 7e7e75cb6..1f142aae4 100644 --- a/gramps/gen/const.py.in +++ b/gramps/gen/const.py.in @@ -93,6 +93,12 @@ APP_GRAMPS_PKG = "application/x-gramps-package" APP_GENEWEB = "application/x-geneweb" APP_VCARD = ["text/x-vcard", "text/x-vcalendar"] +#------------------------------------------------------------------------- +# +# system paths +# +#------------------------------------------------------------------------- +LOCALE_DIR = "@LOCALE_DIR@" #------------------------------------------------------------------------- # # Platforms @@ -199,23 +205,10 @@ else: # Paths to data files. # #------------------------------------------------------------------------- -if "XDG_DATA_DIRS" in os.environ: - share = None - for path in os.environ["XDG_DATA_DIRS"].split(":"): - if os.path.exists(os.path.join(path, "gramps", "tips.xml")): - share = path - break - if not share: - share = os.path.split("@DATA_DIR@")[0] - LOCALE_DIR = os.path.join(share, "locale") - DATA_DIR = os.path.join(share, "gramps") - IMAGE_DIR = os.path.join(DATA_DIR, "icons", "hicolor") - DOC_DIR = os.path.join(share, "doc", "gramps") -else: - LOCALE_DIR = "@LOCALE_DIR@" - DATA_DIR = "@DATA_DIR@" - IMAGE_DIR = "@IMAGE_DIR@" - DOC_DIR = "@DOC_DIR@" +LOCALE_DIR = "@LOCALE_DIR@" +DATA_DIR = "@DATA_DIR@" +IMAGE_DIR = "@IMAGE_DIR@" +DOC_DIR = "@DOC_DIR@" TIP_DATA = os.path.join(DATA_DIR, "tips.xml") PAPERSIZE = os.path.join(DATA_DIR, "papersize.xml") diff --git a/mac/gramps.bundle b/mac/gramps.bundle index 53ec269bc..2a8e5a34f 100644 --- a/mac/gramps.bundle +++ b/mac/gramps.bundle @@ -183,10 +183,6 @@ ${prefix}/lib/graphviz/config6 - - ${prefix}/share/gramps - -