faaaf7e858
* src/docgen/CairoDoc.py (fontstyle_to_fontdescription): Fix deprecated warning. * src/ReportBase/_PaperMenu.py: * src/data/papersize.xml: Fix "C" and "D" paper size values. * src/const.py.in: Correct PAPERSIZE path constant. svn: r9026
223 lines
7.0 KiB
Python
223 lines
7.0 KiB
Python
# -*- python -*-
|
||
# -*- coding: iso-8859-1 -*-
|
||
#
|
||
# Gramps - a GTK+/GNOME based genealogy program
|
||
#
|
||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||
#
|
||
# This program is free software; you can redistribute it and/or modify
|
||
# it under the terms of the GNU General Public License as published by
|
||
# the Free Software Foundation; either version 2 of the License, or
|
||
# (at your option) any later version.
|
||
#
|
||
# This program is distributed in the hope that it will be useful,
|
||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
# GNU General Public License for more details.
|
||
#
|
||
# You should have received a copy of the GNU General Public License
|
||
# along with this program; if not, write to the Free Software
|
||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||
#
|
||
|
||
# $Id$
|
||
|
||
"""
|
||
Provides constants for other modules
|
||
"""
|
||
|
||
#-------------------------------------------------------------------------
|
||
#
|
||
# Standard python modules
|
||
#
|
||
#-------------------------------------------------------------------------
|
||
import os
|
||
from gettext import gettext as _
|
||
|
||
#-------------------------------------------------------------------------
|
||
#
|
||
# Standard GRAMPS Websites
|
||
#
|
||
#-------------------------------------------------------------------------
|
||
URL_HOMEPAGE = "http://gramps-project.org/"
|
||
URL_MAILINGLIST = "http://sourceforge.net/mail/?group_id=25770"
|
||
URL_BUGTRACKER = "http://bugs.gramps-project.org/bug_report_advanced_page.php"
|
||
URL_MANUAL = "http://gramps-project.org/gramps-manual/2.2/"
|
||
|
||
#-------------------------------------------------------------------------
|
||
#
|
||
# Mime Types
|
||
#
|
||
#-------------------------------------------------------------------------
|
||
APP_GRAMPS = "application/x-gramps"
|
||
APP_GRAMPS_XML = "application/x-gramps-xml"
|
||
APP_GEDCOM = "application/x-gedcom"
|
||
APP_GRAMPS_PKG = "application/x-gramps-package"
|
||
APP_GENEWEB = "application/x-geneweb"
|
||
APP_VCARD = ["text/x-vcard", "text/x-vcalendar"]
|
||
|
||
#-------------------------------------------------------------------------
|
||
#
|
||
# system paths
|
||
#
|
||
#-------------------------------------------------------------------------
|
||
PREFIXDIR = "@prefix@"
|
||
SYSCONFDIR = "@sysconfdir@"
|
||
|
||
#-------------------------------------------------------------------------
|
||
#
|
||
# Determine the home directory. According to Wikipedia, most UNIX like
|
||
# systems use HOME. I'm assuming that this would apply to OS X as well.
|
||
# Windows apparently uses USERPROFILE
|
||
#
|
||
#-------------------------------------------------------------------------
|
||
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')
|
||
|
||
#-------------------------------------------------------------------------
|
||
#
|
||
# Paths to files - assumes that files reside in the same directory as
|
||
# this one, and that the plugins directory is in a directory below this.
|
||
#
|
||
#-------------------------------------------------------------------------
|
||
ROOT_DIR = os.path.abspath(os.path.dirname(__file__))
|
||
IMAGE_DIR = os.path.join(ROOT_DIR, "images")
|
||
|
||
CUSTOM_FILTERS = os.path.join(HOME_DIR, "custom_filters.xml")
|
||
REPORT_OPTIONS = os.path.join(HOME_DIR, "report_options.xml")
|
||
TOOL_OPTIONS = os.path.join(HOME_DIR, "tool_options.xml")
|
||
THUMB_DIR = os.path.join(HOME_DIR, "thumb")
|
||
ENV_DIR = os.path.join(HOME_DIR, "env")
|
||
|
||
ICON = os.path.join(ROOT_DIR, "images", "gramps.png")
|
||
LOGO = os.path.join(ROOT_DIR, "images", "logo.png")
|
||
SPLASH = os.path.join(ROOT_DIR, "images", "splash.jpg")
|
||
LICENSE_FILE = os.path.join(ROOT_DIR, "COPYING")
|
||
|
||
#
|
||
# Glade files
|
||
#
|
||
|
||
GLADE_DIR = os.path.join(ROOT_DIR, "glade")
|
||
GLADE_FILE = os.path.join(GLADE_DIR, "gramps.glade")
|
||
PERSON_GLADE = os.path.join(GLADE_DIR, "edit_person.glade")
|
||
PLUGINS_GLADE = os.path.join(GLADE_DIR, "plugins.glade")
|
||
MERGE_GLADE = os.path.join(GLADE_DIR, "mergedata.glade")
|
||
RULE_GLADE = os.path.join(GLADE_DIR, "rule.glade")
|
||
|
||
|
||
PLUGINS_DIR = os.path.join(ROOT_DIR, "plugins")
|
||
DOCGEN_DIR = os.path.join(ROOT_DIR, "docgen")
|
||
DATA_DIR = os.path.join(ROOT_DIR, "data")
|
||
SYSTEM_FILTERS = os.path.join(DATA_DIR, "system_filters.xml")
|
||
TEMPLATE_DIR = os.path.join(DATA_DIR, "templates")
|
||
TIP_DATA = os.path.join(DATA_DIR, "tips.xml")
|
||
|
||
PAPERSIZE = os.path.join(DATA_DIR, "papersize.xml")
|
||
|
||
USE_TIPS = False
|
||
|
||
if os.sys.platform == "win32":
|
||
USE_THUMBNAILER = False
|
||
else:
|
||
USE_THUMBNAILER = True
|
||
|
||
#-------------------------------------------------------------------------
|
||
#
|
||
# About box information
|
||
#
|
||
#-------------------------------------------------------------------------
|
||
PROGRAM_NAME = "GRAMPS"
|
||
VERSION = "@VERSIONSTRING@"
|
||
COPYRIGHT_MSG = unicode("<EFBFBD> 2001-2006 Donald N. Allingham", "iso-8859-1")
|
||
COMMENTS = _("GRAMPS (Genealogical Research and Analysis "
|
||
"Management Programming System) is a personal "
|
||
"genealogy program.")
|
||
AUTHORS = [
|
||
"Donald N. Allingham",
|
||
"Alexander Roitman",
|
||
"Richard Taylor",
|
||
"Martin Hawlisch",
|
||
"Brian Matherly",
|
||
"Tim Waugh",
|
||
"Donald A. Peterson",
|
||
"David Hampton",
|
||
]
|
||
|
||
DOCUMENTERS = [
|
||
'Alexander Roitman',
|
||
]
|
||
|
||
TRANSLATORS = _('TRANSLATORS: Translate this to your '
|
||
'name in your native language')
|
||
|
||
#-------------------------------------------------------------------------
|
||
#
|
||
# Constants
|
||
#
|
||
#-------------------------------------------------------------------------
|
||
THUMBSCALE = 96.0
|
||
XMLFILE = "data.gramps"
|
||
|
||
#-------------------------------------------------------------------------
|
||
#
|
||
# Options Constants
|
||
#
|
||
#-------------------------------------------------------------------------
|
||
|
||
# (longName, shortName, type , default, flags, descrip , argDescrip)
|
||
POPT_TABLE = [
|
||
("open", 'O', str, None, 0, "Open file", "FILENAME"),
|
||
("import", 'i', str, None, 0, "Import file", "FILENAME"),
|
||
("output", 'o', str, None, 0, "Write file", "FILENAME"),
|
||
("format", 'f', str, None, 0, 'Specify format', "FORMAT"),
|
||
("action", 'a', str, None, 0, 'Specify action', "ACTION"),
|
||
("options", 'p', str, None, 0, 'Specify options', "OPTIONS_STRING"),
|
||
("debug", 'd', str, None, 0, 'Enable debug logs', "LOGGER_NAME"),
|
||
]
|
||
|
||
LONGOPTS = [
|
||
"load-modules=",
|
||
"help",
|
||
"usage",
|
||
"oaf-ior-fd=",
|
||
"oaf-activate-iid=",
|
||
"oaf-private",
|
||
"disable-sound",
|
||
"enable-sound",
|
||
"espeaker=",
|
||
"version",
|
||
"gdk-debug=",
|
||
"gdk-no-debug=",
|
||
"display=",
|
||
"screen=",
|
||
"sync",
|
||
"name=",
|
||
"class=",
|
||
"gtk-debug=",
|
||
"gtk-no-debug=",
|
||
"g-fatal-warnings",
|
||
"gtk-module=",
|
||
"sm-client-id=",
|
||
"sm-config-prefix=",
|
||
"sm-disable",
|
||
"disable-crash-dialog",
|
||
"disable-sound",
|
||
"enable-sound",
|
||
"espeaker=",
|
||
"open=",
|
||
"import=",
|
||
"output=",
|
||
"format=",
|
||
"action=",
|
||
"options=",
|
||
"debug=",
|
||
]
|
||
|
||
SHORTOPTS = "O:i:o:f:a:p:d:?"
|
||
|