update new installation paths

svn: r6046
This commit is contained in:
Don Allingham 2006-03-03 00:17:58 +00:00
parent f97b172092
commit 4a04791292
10 changed files with 49 additions and 36 deletions

View File

@ -1,3 +1,14 @@
2006-03-02 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_GedcomInfo.py: update to new data path
* src/const.py.in: new data, image path defintions
* src/gramps_main.py: update to new install paths
* src/Assistant.py: update to new install paths
* src/ImgManip.py: update to new install paths
* src/ObjectSelector/_FamilyPreviewFrame.py: update to new install paths
* src/ObjectSelector/_OjbectSelectorWindow.py: update to new install paths
* src/ObjectSelector/_PersonPreviewFrame.py: update to new install paths
* src/plugins/NavWebPage.py: update to new install paths
2006-03-02 Alex Roitman <shura@gramps-project.org> 2006-03-02 Alex Roitman <shura@gramps-project.org>
* src/Config/__init__.py: Add new package. * src/Config/__init__.py: Add new package.
* src/GrampsGconfKeys.py, src/GrampsIniKeys.py, src/GrampsKeys.py: * src/GrampsGconfKeys.py, src/GrampsIniKeys.py, src/GrampsKeys.py:

View File

@ -26,6 +26,7 @@
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gettext import gettext as _ from gettext import gettext as _
import os
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -48,8 +49,8 @@ import const
# Constants # Constants
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
_gramps_png = "%s/images/gramps.png" % const.rootDir _gramps_png = os.path.join(const.image_dir,"gramps.png")
_splash_jpg = "%s/images/splash.jpg" % const.rootDir _splash_jpg = os.path.join(const.image_dir,"splash.jpg")
_format = '<span weight="bold" size="xx-large">%s</span>' _format = '<span weight="bold" size="xx-large">%s</span>'
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

@ -152,7 +152,7 @@ class GedcomInfoDB:
self.standard.set_dest("GEDCOM 5.5") self.standard.set_dest("GEDCOM 5.5")
try: try:
filepath = "%s/gedcom.xml" % const.dataDir filepath = os.path.join(const.data_dir,"gedcom.xml")
f = open(filepath.encode('iso8859-1'),"r") f = open(filepath.encode('iso8859-1'),"r")
except: except:
return return

View File

@ -156,7 +156,7 @@ def get_thumbnail_image(path,mtype=None):
return GrampsMime.find_mime_type_pixbuf(mtype) return GrampsMime.find_mime_type_pixbuf(mtype)
else: else:
return gtk.gdk.pixbuf_new_from_file(os.path.join( return gtk.gdk.pixbuf_new_from_file(os.path.join(
const.dataDir,"images/document.png")) const.data_dir,"document.png"))
def get_thumbnail_path(path,mtype=None): def get_thumbnail_path(path,mtype=None):
filename = _build_thumb_path(path) filename = _build_thumb_path(path)

View File

@ -105,16 +105,16 @@ class FamilyPreviewFrame(PreviewFrameBase):
image[image_no].set_from_pixbuf(pixbuf) image[image_no].set_from_pixbuf(pixbuf)
image_no += 1 image_no += 1
else: else:
self._image_l.set_from_file(os.path.join(const.rootDir,"person.svg")) self._image_l.set_from_file(os.path.join(const.image_dir,"person.svg"))
self._image_r.set_from_file(os.path.join(const.rootDir,"person.svg")) self._image_r.set_from_file(os.path.join(const.image_dir,"person.svg"))
except: except:
log.warn("Failed to generate preview for family", exc_info=True) log.warn("Failed to generate preview for family", exc_info=True)
self.clear_object() self.clear_object()
def clear_object(self): def clear_object(self):
self._image_l.set_from_file(os.path.join(const.rootDir,"person.svg")) self._image_l.set_from_file(os.path.join(const.image_dir,"person.svg"))
self._image_r.set_from_file(os.path.join(const.rootDir,"person.svg")) self._image_r.set_from_file(os.path.join(const.image_dir,"person.svg"))
if gtk.pygtk_version < (2,8,0): if gtk.pygtk_version < (2,8,0):

View File

@ -156,8 +156,8 @@ class ObjectSelectorWindow(gtk.Window,ManagedWindow):
self.__class__.__default_border_width) self.__class__.__default_border_width)
person_pixbuf = gtk.gdk.pixbuf_new_from_file(os.path.join(const.rootDir,"person.svg")) person_pixbuf = gtk.gdk.pixbuf_new_from_file(os.path.join(const.image_dir,"person.svg"))
flist_pixbuf = gtk.gdk.pixbuf_new_from_file(os.path.join(const.rootDir,"flist.svg")) flist_pixbuf = gtk.gdk.pixbuf_new_from_file(os.path.join(const.image_dir,"flist.svg"))
self._tool_list = gtk.ListStore(gtk.gdk.Pixbuf, str,int) self._tool_list = gtk.ListStore(gtk.gdk.Pixbuf, str,int)

View File

@ -62,7 +62,7 @@ class PersonPreviewFrame(PreviewFrameBase):
self._image = gtk.Image() self._image = gtk.Image()
# test image # test image
self._image.set_from_file(os.path.join(const.rootDir,"person.svg")) self._image.set_from_file(os.path.join(const.image_dir,"person.svg"))
# Text # Text
label = gtk.Label() label = gtk.Label()
@ -142,7 +142,7 @@ class PersonPreviewFrame(PreviewFrameBase):
pixbuf = ImgManip.get_thumbnail_image(mobj.get_path()) pixbuf = ImgManip.get_thumbnail_image(mobj.get_path())
self._image.set_from_pixbuf(pixbuf) self._image.set_from_pixbuf(pixbuf)
else: else:
self._image.set_from_file(os.path.join(const.rootDir,"person.svg")) self._image.set_from_file(os.path.join(const.image_dir,"person.svg"))
self._label.set_markup(self._get_text_preview(person)) self._label.set_markup(self._get_text_preview(person))
@ -157,7 +157,7 @@ class PersonPreviewFrame(PreviewFrameBase):
def clear_object(self): def clear_object(self):
self._image.set_from_file(os.path.join(const.rootDir,"person.svg")) self._image.set_from_file(os.path.join(const.image_dir,"person.svg"))
self._label.set_markup("") self._label.set_markup("")

View File

@ -89,32 +89,33 @@ no_gconf = False
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
rootDir = os.path.abspath(os.path.dirname(__file__)) root_dir = os.path.abspath(os.path.dirname(__file__))
image_dir = os.path.join(root_dir,"images")
system_filters = os.path.join(rootDir,"system_filters.xml") system_filters = os.path.join(root_dir,"system_filters.xml")
custom_filters = "~/.gramps/custom_filters.xml" custom_filters = "~/.gramps/custom_filters.xml"
report_options = "~/.gramps/report_options.xml" report_options = "~/.gramps/report_options.xml"
tool_options = "~/.gramps/tool_options.xml" tool_options = "~/.gramps/tool_options.xml"
bsddbenv_dir = "~/.gramps/bsddbenv" bsddbenv_dir = "~/.gramps/bsddbenv"
icon = os.path.join(rootDir,"images/gramps.png") icon = os.path.join(root_dir,"images","gramps.png")
logo = os.path.join(rootDir,"images/logo.png") logo = os.path.join(root_dir,"images","logo.png")
splash = os.path.join(rootDir,"images/splash.jpg") splash = os.path.join(root_dir,"images","splash.jpg")
license = os.path.join(rootDir,"COPYING") license = os.path.join(root_dir,"COPYING")
gladeFile = os.path.join(rootDir,"gramps.glade") gladeFile = os.path.join(root_dir,"gramps.glade")
editPersonFile = os.path.join(rootDir,"edit_person.glade") editPersonFile = os.path.join(root_dir,"edit_person.glade")
pluginsFile = os.path.join(rootDir,"plugins.glade") pluginsFile = os.path.join(root_dir,"plugins.glade")
mergeFile = os.path.join(rootDir,"mergedata.glade") mergeFile = os.path.join(root_dir,"mergedata.glade")
merge2File = os.path.join(rootDir,"merge.glade") merge2File = os.path.join(root_dir,"merge.glade")
filterFile = os.path.join(rootDir,"rule.glade") filterFile = os.path.join(root_dir,"rule.glade")
pluginsDir = os.path.join(rootDir,"plugins") pluginsDir = os.path.join(root_dir,"plugins")
datesDir = os.path.join(rootDir,"dates") datesDir = os.path.join(root_dir,"dates")
docgenDir = os.path.join(rootDir,"docgen") docgenDir = os.path.join(root_dir,"docgen")
dataDir = os.path.join(rootDir,"data") data_dir = os.path.join(root_dir,"data")
template_dir = os.path.join(dataDir,"templates") template_dir = os.path.join(data_dir,"templates")
papersize = "file:%s/papersize.xml" % dataDir papersize = "file:%s/papersize.xml" % data_dir
tipdata = os.path.join(dataDir,"tips.xml") tipdata = os.path.join(data_dir,"tips.xml")
fdl = os.path.join(dataDir,"fdl.txt") fdl = os.path.join(data_dir,"fdl.txt")
startup = 1 startup = 1
dnd_images = 1 dnd_images = 1

View File

@ -60,7 +60,7 @@ import TipOfDay
from GrampsMime import mime_type_is_defined from GrampsMime import mime_type_is_defined
from QuestionDialog import ErrorDialog from QuestionDialog import ErrorDialog
iconpaths = [".",const.rootDir] iconpaths = [".",const.image_dir]
def register_stock_icons (): def register_stock_icons ():
import os import os

View File

@ -895,9 +895,9 @@ class MediaPage(BasePage):
if photo.get_mime_type(): if photo.get_mime_type():
from_path = ImgManip.get_thumbnail_path(photo.get_path(),photo.get_mime_type()) from_path = ImgManip.get_thumbnail_path(photo.get_path(),photo.get_mime_type())
if not os.path.isfile(from_path): if not os.path.isfile(from_path):
from_path = os.path.join(const.dataDir,"document.png") from_path = os.path.join(const.data_dir,"document.png")
else: else:
from_path = os.path.join(const.dataDir,"document.png") from_path = os.path.join(const.data_dir,"document.png")
if self.archive: if self.archive:
self.archive.add(from_path,to_path) self.archive.add(from_path,to_path)