update new installation paths

svn: r6046
This commit is contained in:
Don Allingham 2006-03-03 00:17:58 +00:00
parent 55c41ac2f8
commit 4efbaaa16c
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>
* src/Config/__init__.py: Add new package.
* src/GrampsGconfKeys.py, src/GrampsIniKeys.py, src/GrampsKeys.py:

View File

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

View File

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

View File

@ -156,7 +156,7 @@ def get_thumbnail_image(path,mtype=None):
return GrampsMime.find_mime_type_pixbuf(mtype)
else:
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):
filename = _build_thumb_path(path)

View File

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

View File

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

View File

@ -62,7 +62,7 @@ class PersonPreviewFrame(PreviewFrameBase):
self._image = gtk.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
label = gtk.Label()
@ -142,7 +142,7 @@ class PersonPreviewFrame(PreviewFrameBase):
pixbuf = ImgManip.get_thumbnail_image(mobj.get_path())
self._image.set_from_pixbuf(pixbuf)
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))
@ -157,7 +157,7 @@ class PersonPreviewFrame(PreviewFrameBase):
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("")

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"
report_options = "~/.gramps/report_options.xml"
tool_options = "~/.gramps/tool_options.xml"
bsddbenv_dir = "~/.gramps/bsddbenv"
icon = os.path.join(rootDir,"images/gramps.png")
logo = os.path.join(rootDir,"images/logo.png")
splash = os.path.join(rootDir,"images/splash.jpg")
license = os.path.join(rootDir,"COPYING")
gladeFile = os.path.join(rootDir,"gramps.glade")
editPersonFile = os.path.join(rootDir,"edit_person.glade")
pluginsFile = os.path.join(rootDir,"plugins.glade")
mergeFile = os.path.join(rootDir,"mergedata.glade")
merge2File = os.path.join(rootDir,"merge.glade")
filterFile = os.path.join(rootDir,"rule.glade")
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 = os.path.join(root_dir,"COPYING")
gladeFile = os.path.join(root_dir,"gramps.glade")
editPersonFile = os.path.join(root_dir,"edit_person.glade")
pluginsFile = os.path.join(root_dir,"plugins.glade")
mergeFile = os.path.join(root_dir,"mergedata.glade")
merge2File = os.path.join(root_dir,"merge.glade")
filterFile = os.path.join(root_dir,"rule.glade")
pluginsDir = os.path.join(rootDir,"plugins")
datesDir = os.path.join(rootDir,"dates")
docgenDir = os.path.join(rootDir,"docgen")
dataDir = os.path.join(rootDir,"data")
template_dir = os.path.join(dataDir,"templates")
papersize = "file:%s/papersize.xml" % dataDir
tipdata = os.path.join(dataDir,"tips.xml")
fdl = os.path.join(dataDir,"fdl.txt")
pluginsDir = os.path.join(root_dir,"plugins")
datesDir = os.path.join(root_dir,"dates")
docgenDir = os.path.join(root_dir,"docgen")
data_dir = os.path.join(root_dir,"data")
template_dir = os.path.join(data_dir,"templates")
papersize = "file:%s/papersize.xml" % data_dir
tipdata = os.path.join(data_dir,"tips.xml")
fdl = os.path.join(data_dir,"fdl.txt")
startup = 1
dnd_images = 1

View File

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

View File

@ -895,9 +895,9 @@ class MediaPage(BasePage):
if photo.get_mime_type():
from_path = ImgManip.get_thumbnail_path(photo.get_path(),photo.get_mime_type())
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:
from_path = os.path.join(const.dataDir,"document.png")
from_path = os.path.join(const.data_dir,"document.png")
if self.archive:
self.archive.add(from_path,to_path)