gramps/src/const.py.in

230 lines
7.2 KiB
Python
Raw Normal View History

# -*- python -*-
# -*- coding: utf-8 -*-
#
2002-10-20 19:55:16 +05:30
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
2002-10-20 19:55:16 +05:30
#
# 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$
#-------------------------------------------------------------------------
#
* src/AddrEdit.py: remove already_exist check in favor of exception * src/AttrEdit.py: remove already_exist check in favor of exception * src/DisplayState.py: remove already_exist variable * src/DisplayTabs.py: handle exception * src/EditEventRef.py: remove already_exist check in favor of exception * src/EditFamily.py: update to derive from EditPrimary * src/EditMedia.py: update to derive from EditPrimary * src/EditMediaRef.py: remove already_exist check in favor of exception * src/EditPerson.py: update to derive from EditPrimary * src/EditPlace.py: update to derive from EditPrimary * src/EditRepository.py:update to derive from EditPrimary * src/EditSource.py: update to derive from EditPrimary * src/EditSourceRef.py: remove already_exist check in favor of exception * src/Errors.py: new exception * src/EventEdit.py: update to derive from EditPrimary * src/EventView.py: catch exception of window already exists * src/FamilyList.py: catch exception of window already exists * src/FamilyView.py: catch exception of window already exists * src/GrampsWidgets.py: typos * src/NameEdit.py: remove already_exist check in favor of exception * src/PedView.py: catch exception of window already exists * src/PersonView.py: catch exception of window already exists * src/PlaceView.py: catch exception of window already exists * src/Plugins.py: catch exception of window already exists * src/UrlEdit.py: remove already_exist check in favor of exception * src/const.py.in: dynamically determine path * src/gramps.glade: name changes * src/gramps.py: set path svn: r6014
2006-03-01 10:38:11 +05:30
# Standard python modules
#
#-------------------------------------------------------------------------
* src/AddrEdit.py: remove already_exist check in favor of exception * src/AttrEdit.py: remove already_exist check in favor of exception * src/DisplayState.py: remove already_exist variable * src/DisplayTabs.py: handle exception * src/EditEventRef.py: remove already_exist check in favor of exception * src/EditFamily.py: update to derive from EditPrimary * src/EditMedia.py: update to derive from EditPrimary * src/EditMediaRef.py: remove already_exist check in favor of exception * src/EditPerson.py: update to derive from EditPrimary * src/EditPlace.py: update to derive from EditPrimary * src/EditRepository.py:update to derive from EditPrimary * src/EditSource.py: update to derive from EditPrimary * src/EditSourceRef.py: remove already_exist check in favor of exception * src/Errors.py: new exception * src/EventEdit.py: update to derive from EditPrimary * src/EventView.py: catch exception of window already exists * src/FamilyList.py: catch exception of window already exists * src/FamilyView.py: catch exception of window already exists * src/GrampsWidgets.py: typos * src/NameEdit.py: remove already_exist check in favor of exception * src/PedView.py: catch exception of window already exists * src/PersonView.py: catch exception of window already exists * src/PlaceView.py: catch exception of window already exists * src/Plugins.py: catch exception of window already exists * src/UrlEdit.py: remove already_exist check in favor of exception * src/const.py.in: dynamically determine path * src/gramps.glade: name changes * src/gramps.py: set path svn: r6014
2006-03-01 10:38:11 +05:30
import os
from gettext import gettext as _
2002-10-20 19:55:16 +05:30
#-------------------------------------------------------------------------
#
* src/AddrEdit.py: remove already_exist check in favor of exception * src/AttrEdit.py: remove already_exist check in favor of exception * src/DisplayState.py: remove already_exist variable * src/DisplayTabs.py: handle exception * src/EditEventRef.py: remove already_exist check in favor of exception * src/EditFamily.py: update to derive from EditPrimary * src/EditMedia.py: update to derive from EditPrimary * src/EditMediaRef.py: remove already_exist check in favor of exception * src/EditPerson.py: update to derive from EditPrimary * src/EditPlace.py: update to derive from EditPrimary * src/EditRepository.py:update to derive from EditPrimary * src/EditSource.py: update to derive from EditPrimary * src/EditSourceRef.py: remove already_exist check in favor of exception * src/Errors.py: new exception * src/EventEdit.py: update to derive from EditPrimary * src/EventView.py: catch exception of window already exists * src/FamilyList.py: catch exception of window already exists * src/FamilyView.py: catch exception of window already exists * src/GrampsWidgets.py: typos * src/NameEdit.py: remove already_exist check in favor of exception * src/PedView.py: catch exception of window already exists * src/PersonView.py: catch exception of window already exists * src/PlaceView.py: catch exception of window already exists * src/Plugins.py: catch exception of window already exists * src/UrlEdit.py: remove already_exist check in favor of exception * src/const.py.in: dynamically determine path * src/gramps.glade: name changes * src/gramps.py: set path svn: r6014
2006-03-01 10:38:11 +05:30
# Standard GRAMPS Websites
2002-10-20 19:55:16 +05:30
#
#-------------------------------------------------------------------------
* src/AddrEdit.py: remove already_exist check in favor of exception * src/AttrEdit.py: remove already_exist check in favor of exception * src/DisplayState.py: remove already_exist variable * src/DisplayTabs.py: handle exception * src/EditEventRef.py: remove already_exist check in favor of exception * src/EditFamily.py: update to derive from EditPrimary * src/EditMedia.py: update to derive from EditPrimary * src/EditMediaRef.py: remove already_exist check in favor of exception * src/EditPerson.py: update to derive from EditPrimary * src/EditPlace.py: update to derive from EditPrimary * src/EditRepository.py:update to derive from EditPrimary * src/EditSource.py: update to derive from EditPrimary * src/EditSourceRef.py: remove already_exist check in favor of exception * src/Errors.py: new exception * src/EventEdit.py: update to derive from EditPrimary * src/EventView.py: catch exception of window already exists * src/FamilyList.py: catch exception of window already exists * src/FamilyView.py: catch exception of window already exists * src/GrampsWidgets.py: typos * src/NameEdit.py: remove already_exist check in favor of exception * src/PedView.py: catch exception of window already exists * src/PersonView.py: catch exception of window already exists * src/PlaceView.py: catch exception of window already exists * src/Plugins.py: catch exception of window already exists * src/UrlEdit.py: remove already_exist check in favor of exception * src/const.py.in: dynamically determine path * src/gramps.glade: name changes * src/gramps.py: set path svn: r6014
2006-03-01 10:38:11 +05:30
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"
2006-10-29 09:20:17 +05:30
url_manual = "http://gramps-project.org/gramps-manual/2.2/"
2002-10-20 19:55:16 +05:30
#-------------------------------------------------------------------------
#
# Mime Types
#
#-------------------------------------------------------------------------
app_gramps = "application/x-gramps"
app_gramps_xml = "application/x-gramps-xml"
app_gedcom = "application/x-gedcom"
app_gramps_package = "application/x-gramps-package"
app_geneweb = "application/x-geneweb"
app_vcard = ["text/x-vcard","text/x-vcalendar"]
2002-10-20 19:55:16 +05:30
#-------------------------------------------------------------------------
#
# Paths to external programs
#
#-------------------------------------------------------------------------
editor = "gimp"
convert = "convert"
pixdir = "/usr/share/pixmaps"
nautdir = "/usr/share/pixmaps/nautilus"
2003-03-31 07:03:40 +05:30
prefixdir = "@GPREFIX@"
#-------------------------------------------------------------------------
#
# Configuration database options - True means drop down to .INI files
#
#-------------------------------------------------------------------------
no_gconf = False
2006-03-21 11:53:45 +05:30
#-------------------------------------------------------------------------
#
# 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'):
2006-03-29 09:41:17 +05:30
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')
2006-03-21 11:53:45 +05:30
2002-10-20 19:55:16 +05:30
#-------------------------------------------------------------------------
#
# 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")
2002-10-20 19:55:16 +05:30
2006-03-21 11:53:45 +05:30
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")
2006-03-29 08:51:29 +05:30
thumb_dir = os.path.join(home_dir,"thumb")
2006-03-21 11:53:45 +05:30
bsddbenv_dir = os.path.join(home_dir,"bsddbenv")
2006-03-05 04:23:46 +05:30
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")
2006-03-21 11:53:45 +05:30
license_file = os.path.join(root_dir,"COPYING")
2006-03-05 04:23:46 +05:30
#
# Glade files
#
glade_dir = os.path.join(root_dir,"glade")
gladeFile = os.path.join(glade_dir,"gramps.glade")
person_glade = os.path.join(glade_dir,"edit_person.glade")
2006-03-05 10:01:24 +05:30
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")
2006-03-05 04:23:46 +05:30
pluginsDir = os.path.join(root_dir,"plugins")
docgenDir = os.path.join(root_dir,"docgen")
data_dir = os.path.join(root_dir,"data")
2006-03-05 04:23:46 +05:30
system_filters = os.path.join(data_dir,"system_filters.xml")
template_dir = os.path.join(data_dir,"templates")
tipdata = os.path.join(data_dir,"tips.xml")
fdl = os.path.join(data_dir,"fdl.txt")
2002-10-20 19:55:16 +05:30
2006-03-21 11:53:45 +05:30
papersize = "file:%s/papersize.xml" % data_dir
2002-10-20 19:55:16 +05:30
startup = 1
2003-05-17 08:50:50 +05:30
dnd_images = 1
use_tips = False
if os.sys.platform == "win32":
use_thumbnailer = False
else:
use_thumbnailer= True
2002-10-20 19:55:16 +05:30
#-------------------------------------------------------------------------
#
# About box information
#
#-------------------------------------------------------------------------
2006-03-21 11:53:45 +05:30
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",
2006-05-31 08:53:55 +05:30
"Brian Matherly",
"Tim Waugh",
"Donald A. Peterson",
2003-02-14 09:25:20 +05:30
"David Hampton",
]
2006-03-21 11:53:45 +05:30
documenters = [
2003-04-18 01:07:23 +05:30
'Alexander Roitman',
2003-02-14 09:25:20 +05:30
]
2003-04-06 05:09:22 +05:30
translators = _('TRANSLATORS: Translate this to your name in your native language')
2002-10-20 19:55:16 +05:30
#-------------------------------------------------------------------------
#
# Constants
#
#-------------------------------------------------------------------------
thumbScale = 96.0
xmlFile = "data.gramps"
2003-05-17 09:44:13 +05:30
#-------------------------------------------------------------------------
#
# Options Constants
#
#-------------------------------------------------------------------------
# (longName, shortName, type , default, flags, descrip , argDescrip)
popt_table = [
("open", 'O', str, None, 0, "Open file", "FILENAME"),
2004-12-22 07:26:37 +05:30
("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"),
]
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=",
2004-12-22 07:26:37 +05:30
"options=",
]
2003-05-17 09:44:13 +05:30
shortopts = "O:i:o:f:a:p:?"
2003-05-17 09:44:13 +05:30