From 85fd9a2d1b8263b88179921c0f9b3db1d040b0c1 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Thu, 27 Dec 2007 21:44:15 +0000 Subject: [PATCH] src/Config/_GrampsConfigKeys.py: Better default for report output. src/gen/db/dbconst.py: Remove constants that are duplicated in const.py. src/GrampsDb/_GrampsBSDDB.py: Use ENV_DIR from const.py. svn: r9601 --- ChangeLog | 5 +++++ src/Config/_GrampsConfigKeys.py | 4 ++-- src/GrampsDb/_GrampsBSDDB.py | 2 +- src/gen/db/dbconst.py | 11 ----------- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2cc7561af..df55d735a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-12-27 Brian Matherly + * src/Config/_GrampsConfigKeys.py: Better default for report output. + * src/gen/db/dbconst.py: Remove constants that are duplicated in const.py. + * src/GrampsDb/_GrampsBSDDB.py: Use ENV_DIR from const.py. + 2007-12-27 Brian Matherly * src/docgen/CairoDoc.py: Fix 0001431: Tried to run a statistics report: diff --git a/src/Config/_GrampsConfigKeys.py b/src/Config/_GrampsConfigKeys.py index bce4fc1a8..a248aa9c2 100644 --- a/src/Config/_GrampsConfigKeys.py +++ b/src/Config/_GrampsConfigKeys.py @@ -236,7 +236,7 @@ default_value = { RECENT_EXPORT_DIR : '', RECENT_EXPORT_TYPE : 1, NAME_FORMAT : 1, - REPORT_DIRECTORY : './', + REPORT_DIRECTORY : const.USER_HOME, RESEARCHER_ADDR : '', RESEARCHER_CITY : '', RESEARCHER_COUNTRY : '', @@ -254,7 +254,7 @@ default_value = { POP_PLUGIN_STATUS : False, VIEW : True, SIDEBAR_TEXT : True, - WEBSITE_DIRECTORY : './', + WEBSITE_DIRECTORY : const.USER_HOME, PORT_WARN : False, TRANSACTIONS : True, LDS_HEIGHT : 450, diff --git a/src/GrampsDb/_GrampsBSDDB.py b/src/GrampsDb/_GrampsBSDDB.py index d12e5be27..6334a0b65 100644 --- a/src/GrampsDb/_GrampsBSDDB.py +++ b/src/GrampsDb/_GrampsBSDDB.py @@ -47,7 +47,7 @@ __LOG = logging.getLogger(".GrampsDb") from gen.lib import * from gen.db.base import * from gen.utils import db_copy -import gen.db.dbconst as const +import const from gen.db.exceptions import FileVersionError from BasicUtils import UpdateCallback diff --git a/src/gen/db/dbconst.py b/src/gen/db/dbconst.py index 571252ad0..50435edb8 100644 --- a/src/gen/db/dbconst.py +++ b/src/gen/db/dbconst.py @@ -32,17 +32,6 @@ import os # constants # #------------------------------------------------------------------------- - -if os.environ.has_key('USERPROFILE'): - USER_HOME = os.environ['USERPROFILE'] - HOME_DIR = os.path.join(USER_HOME,'gramps') -else: - USER_HOME = os.environ['HOME'] - HOME_DIR = os.path.join(USER_HOME,'.gramps') - -ENV_DIR = os.path.join(HOME_DIR,"env") - - APP_GRAMPS = "application/x-gramps" APP_GRAMPS_XML = "application/x-gramps-xml" APP_GEDCOM = "application/x-gedcom"