Fixed missing zodbFile and xmlFile constants
svn: r1065
This commit is contained in:
parent
7fbccb0ae7
commit
d84fcbe473
@ -238,7 +238,7 @@ class DelSrcQuery:
|
|||||||
Utils.modified()
|
Utils.modified()
|
||||||
|
|
||||||
for key in self.db.getPersonKeys():
|
for key in self.db.getPersonKeys():
|
||||||
p = self.getPerson(key)
|
p = self.db.getPerson(key)
|
||||||
for v in p.getEventList() + [p.getBirth(), p.getDeath()]:
|
for v in p.getEventList() + [p.getBirth(), p.getDeath()]:
|
||||||
self.delete_source(v)
|
self.delete_source(v)
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ _ = gettext
|
|||||||
# EventEditor class
|
# EventEditor class
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class EventEditor(Sources.SourceTab):
|
class EventEditor:
|
||||||
|
|
||||||
def __init__(self,parent,name,list,trans,event,def_placename,read_only,cb):
|
def __init__(self,parent,name,list,trans,event,def_placename,read_only,cb):
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
|
@ -67,6 +67,7 @@ _imports = []
|
|||||||
_exports = []
|
_exports = []
|
||||||
_success = []
|
_success = []
|
||||||
_failed = []
|
_failed = []
|
||||||
|
_expect = []
|
||||||
_attempt = []
|
_attempt = []
|
||||||
_loaddir = []
|
_loaddir = []
|
||||||
_textdoc = []
|
_textdoc = []
|
||||||
@ -74,6 +75,13 @@ _drawdoc = []
|
|||||||
_failmsg = []
|
_failmsg = []
|
||||||
|
|
||||||
_unavailable = _("No description was provided"),
|
_unavailable = _("No description was provided"),
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Exception Strings
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
MissingLibraries = _("Missing Libraries")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Constants
|
# Constants
|
||||||
@ -243,11 +251,14 @@ class PluginStatus:
|
|||||||
info.write(_("The following modules could not be loaded:"))
|
info.write(_("The following modules could not be loaded:"))
|
||||||
info.write("\n\n")
|
info.write("\n\n")
|
||||||
|
|
||||||
|
for (file,msg) in _expect:
|
||||||
|
info.write("%s: %s\n\n" % (file,msg))
|
||||||
|
|
||||||
for (file,msgs) in _failmsg:
|
for (file,msgs) in _failmsg:
|
||||||
error = str(msgs[0])
|
error = str(msgs[0])
|
||||||
if error[0:11] == "exceptions.":
|
if error[0:11] == "exceptions.":
|
||||||
error = error[11:]
|
error = error[11:]
|
||||||
info.write("%s\t%s\n" % (file,error) )
|
info.write("%s: %s\n" % (file,error) )
|
||||||
traceback.print_exception(msgs[0],msgs[1],msgs[2],None,info)
|
traceback.print_exception(msgs[0],msgs[1],msgs[2],None,info)
|
||||||
info.write('\n')
|
info.write('\n')
|
||||||
info.seek(0)
|
info.seek(0)
|
||||||
@ -298,6 +309,8 @@ def load_plugins(direct):
|
|||||||
try:
|
try:
|
||||||
a = __import__(plugin)
|
a = __import__(plugin)
|
||||||
_success.append(a)
|
_success.append(a)
|
||||||
|
except MissingLibraries,msg:
|
||||||
|
_expect.append((file,msg))
|
||||||
except:
|
except:
|
||||||
_failmsg.append((file,sys.exc_info()))
|
_failmsg.append((file,sys.exc_info()))
|
||||||
|
|
||||||
|
@ -77,11 +77,20 @@ class SubstKeywords:
|
|||||||
if len(person.getFamilyList()) > 0:
|
if len(person.getFamilyList()) > 0:
|
||||||
f = person.getFamilyList()[0]
|
f = person.getFamilyList()[0]
|
||||||
if f.getFather() == person:
|
if f.getFather() == person:
|
||||||
self.s = f.getMother().getPrimaryName().getRegularName()
|
if f.getMother():
|
||||||
self.S = f.getMother().getPrimaryName().getName()
|
self.s = f.getMother().getPrimaryName().getRegularName()
|
||||||
|
self.S = f.getMother().getPrimaryName().getName()
|
||||||
|
else:
|
||||||
|
self.s = ""
|
||||||
|
self.S = ""
|
||||||
else:
|
else:
|
||||||
self.s = ""
|
if f.getFather():
|
||||||
self.S = ""
|
self.s = f.getFather().getPrimaryName().getRegularName()
|
||||||
|
self.S = f.getFather().getPrimaryName().getName()
|
||||||
|
else:
|
||||||
|
self.s = ""
|
||||||
|
self.S = ""
|
||||||
|
|
||||||
self.m = ''
|
self.m = ''
|
||||||
self.M = ''
|
self.M = ''
|
||||||
for e in f.getEventList():
|
for e in f.getEventList():
|
||||||
|
@ -92,7 +92,7 @@ startup = 1
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
progName = "GRAMPS"
|
progName = "GRAMPS"
|
||||||
version = "0.8.0-pre"
|
version = "@VERSIONSTRING@"
|
||||||
copyright = "© 2001-2002 Donald N. Allingham"
|
copyright = "© 2001-2002 Donald N. Allingham"
|
||||||
authors = ["Donald N. Allingham", "David Hampton","Donald A. Peterson"]
|
authors = ["Donald N. Allingham", "David Hampton","Donald A. Peterson"]
|
||||||
comments = _("GRAMPS (Genealogical Research and Analysis "
|
comments = _("GRAMPS (Genealogical Research and Analysis "
|
||||||
@ -106,7 +106,8 @@ comments = _("GRAMPS (Genealogical Research and Analysis "
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
picWidth = 275.0
|
picWidth = 275.0
|
||||||
thumbScale = 96.0
|
thumbScale = 96.0
|
||||||
indexFile = "data.gramps"
|
xmlFile = "data.gramps"
|
||||||
|
zodbFile = "gramps.zodb"
|
||||||
male = _("male")
|
male = _("male")
|
||||||
female = _("female")
|
female = _("female")
|
||||||
unknown = _("unknown")
|
unknown = _("unknown")
|
||||||
|
@ -77,6 +77,7 @@ class HtmlDoc(TextDoc):
|
|||||||
def __init__(self,styles,type,template,orientation,source=None):
|
def __init__(self,styles,type,template,orientation,source=None):
|
||||||
TextDoc.__init__(self,styles,PaperStyle("",0,0),template,None)
|
TextDoc.__init__(self,styles,PaperStyle("",0,0),template,None)
|
||||||
self.year = time.localtime(time.time())[0]
|
self.year = time.localtime(time.time())[0]
|
||||||
|
self.ext = '.html'
|
||||||
if source == None:
|
if source == None:
|
||||||
self.copyright = 'Copyright © %d' % (self.year)
|
self.copyright = 'Copyright © %d' % (self.year)
|
||||||
self.map = None
|
self.map = None
|
||||||
@ -104,7 +105,6 @@ class HtmlDoc(TextDoc):
|
|||||||
self.table_styles = source.table_styles;
|
self.table_styles = source.table_styles;
|
||||||
self.cell_styles = source.cell_styles;
|
self.cell_styles = source.cell_styles;
|
||||||
self.image_dir = source.image_dir
|
self.image_dir = source.image_dir
|
||||||
self.ext = '.html'
|
|
||||||
|
|
||||||
def set_extension(self,val):
|
def set_extension(self,val):
|
||||||
if val[0] != '.':
|
if val[0] != '.':
|
||||||
|
@ -69,11 +69,11 @@ class PSDrawDoc(DrawDoc):
|
|||||||
return "%s findfont %d scalefont setfont\n" % (font_name,font.get_size())
|
return "%s findfont %d scalefont setfont\n" % (font_name,font.get_size())
|
||||||
|
|
||||||
def open(self,filename):
|
def open(self,filename):
|
||||||
if filename[-4:] != ".ps":
|
if filename[-3:] != ".ps":
|
||||||
self.filename = filename + ".ps"
|
self.filename = filename + ".ps"
|
||||||
else:
|
else:
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
self.f = open(filename,"w")
|
self.f = open(self.filename,"w")
|
||||||
self.f.write('%!PS-Adobe-3.0\n')
|
self.f.write('%!PS-Adobe-3.0\n')
|
||||||
self.f.write('%%LanguageLevel: 2\n')
|
self.f.write('%%LanguageLevel: 2\n')
|
||||||
self.f.write('%%Pages: (atend)\n')
|
self.f.write('%%Pages: (atend)\n')
|
||||||
|
@ -43,7 +43,7 @@ try:
|
|||||||
from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
|
from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
|
||||||
import reportlab.lib.styles
|
import reportlab.lib.styles
|
||||||
except:
|
except:
|
||||||
raise _("Missing Libraries"), _("The ReportLab modules are not installed")
|
raise Plugins.MissingLibraries, _("The ReportLab modules are not installed")
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -32,7 +32,7 @@ try:
|
|||||||
from reportlab.lib.units import cm
|
from reportlab.lib.units import cm
|
||||||
from reportlab.lib.colors import Color
|
from reportlab.lib.colors import Color
|
||||||
except:
|
except:
|
||||||
raise _("Missing Libraries"), _("The ReportLab modules are not installed")
|
raise Plugins.MissingLibraries, _("The ReportLab modules are not installed")
|
||||||
|
|
||||||
def make_color(color):
|
def make_color(color):
|
||||||
return Color(float(color[0])/255.0, float(color[1])/255.0,
|
return Color(float(color[0])/255.0, float(color[1])/255.0,
|
||||||
|
@ -30,7 +30,9 @@ class SubString(Filter.Filter):
|
|||||||
"Names that contain a substring"
|
"Names that contain a substring"
|
||||||
|
|
||||||
def match(self,person):
|
def match(self,person):
|
||||||
return string.find(Utils.phonebook_name(person),self.text) >= 0
|
s1 = string.lower(Utils.phonebook_name(person))
|
||||||
|
s2 = string.lower(self.text)
|
||||||
|
return string.find(s1,s2) >= 0
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -55,7 +55,7 @@ class AncestorReport(Report):
|
|||||||
gnome.ui.GnomeErrorDialog(_("Could not open %s") % output + "\n" + msg)
|
gnome.ui.GnomeErrorDialog(_("Could not open %s") % output + "\n" + msg)
|
||||||
|
|
||||||
def filter(self,person,index):
|
def filter(self,person,index):
|
||||||
if person == None or index >= (1 << 31):
|
if person == None or index >= (1 << 30):
|
||||||
return
|
return
|
||||||
self.map[index] = person
|
self.map[index] = person
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ class AncestorReport(Report):
|
|||||||
generation = 0
|
generation = 0
|
||||||
|
|
||||||
for key in keys :
|
for key in keys :
|
||||||
if generation == 0 or key >= ( 1 << 31):
|
if generation == 0 or key >= ( 1 << 30):
|
||||||
if self.pgbrk and generation > 0:
|
if self.pgbrk and generation > 0:
|
||||||
self.doc.page_break()
|
self.doc.page_break()
|
||||||
self.doc.start_paragraph("Generation")
|
self.doc.start_paragraph("Generation")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user