*** empty log message ***
svn: r955
This commit is contained in:
parent
8f3fb34a07
commit
e2e2070baf
@ -741,19 +741,27 @@ class SingleDate:
|
||||
_format13]
|
||||
|
||||
def display_calendar(self,month_map):
|
||||
d = ''
|
||||
if self.year==UNDEF:
|
||||
if self.month == UNDEF:
|
||||
return ""
|
||||
d = ""
|
||||
elif self.day == UNDEF:
|
||||
return month_map[self.month]
|
||||
d = month_map[self.month]
|
||||
else:
|
||||
return "%02d %s" % (self.day,month_map[self.month])
|
||||
d = "%02d %s" % (self.day,month_map[self.month])
|
||||
elif self.month == UNDEF:
|
||||
return str(self.year)
|
||||
d = str(self.year)
|
||||
elif self.day == UNDEF:
|
||||
return "%s %d" % (month_map[self.month],self.year)
|
||||
d = "%s %d" % (month_map[self.month],self.year)
|
||||
else:
|
||||
return "%02d %s %d" % (self.day,month_map[self.month],self.year)
|
||||
d = "%02d %s %d" % (self.day,month_map[self.month],self.year)
|
||||
if self.mode == SingleDate.about:
|
||||
d = _("about") + ' ' + d
|
||||
elif self.mode == SingleDate.before:
|
||||
d = _("before") + ' ' + d
|
||||
elif self.mode == SingleDate.after:
|
||||
d = _("after") + ' ' + d
|
||||
return d
|
||||
|
||||
def getDate(self):
|
||||
if self.calendar == GREGORIAN:
|
||||
|
@ -912,6 +912,7 @@
|
||||
<widget>
|
||||
<class>GtkCList</class>
|
||||
<name>person_list</name>
|
||||
<width>750</width>
|
||||
<height>350</height>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
|
@ -64,7 +64,7 @@ class AncestorReport(Report):
|
||||
#
|
||||
#--------------------------------------------------------------------
|
||||
def filter(self,person,index):
|
||||
if person == None or index >= 2**self.max_generations:
|
||||
if person == None or index >= (1 << 31):
|
||||
return
|
||||
self.map[index] = person
|
||||
|
||||
@ -93,7 +93,7 @@ class AncestorReport(Report):
|
||||
generation = 0
|
||||
|
||||
for key in keys :
|
||||
if generation == 0 or key >= 2**generation:
|
||||
if generation == 0 or key >= ( 1 << 31):
|
||||
if self.pgbrk and generation > 0:
|
||||
self.doc.page_break()
|
||||
self.doc.start_paragraph("Generation")
|
||||
|
@ -106,13 +106,13 @@ class DescendantReport:
|
||||
def dump(self,level,person):
|
||||
|
||||
if level != 0:
|
||||
self.doc.start_paragraph("Level" + str(level))
|
||||
self.doc.write_text(str(level) + '. ')
|
||||
self.doc.start_paragraph("Level%d" % level)
|
||||
self.doc.write_text("%d." % level)
|
||||
self.doc.write_text(person.getPrimaryName().getRegularName())
|
||||
self.dump_dates(person)
|
||||
self.doc.end_paragraph()
|
||||
|
||||
if (level >= self.max_generations):
|
||||
if level >= self.max_generations:
|
||||
return
|
||||
|
||||
childlist = []
|
||||
@ -172,11 +172,11 @@ class DescendantReportDialog(TextReportDialog):
|
||||
self.default_style.add_style("Title",p)
|
||||
|
||||
f = FontStyle()
|
||||
for i in range(1,10):
|
||||
for i in range(1,32):
|
||||
p = ParagraphStyle()
|
||||
p.set_font(f)
|
||||
p.set_left_margin(float(i-1))
|
||||
self.default_style.add_style("Level" + str(i),p)
|
||||
p.set_left_margin(max(10.0,float(i-1)))
|
||||
self.default_style.add_style("Level%d" % i,p)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -304,6 +304,7 @@ class DetAncestorReport(Report):
|
||||
if len(famList) > 0:
|
||||
for fam in famList:
|
||||
#print "Marriage:fam", fam.__dict__
|
||||
spouse = ''
|
||||
if person.getGender() == RelLib.Person.male:
|
||||
if fam.getMother() != None:
|
||||
spouse= fam.getMother().getPrimaryName().getRegularName()
|
||||
|
@ -97,7 +97,7 @@ lineRE = re.compile(r"\s*(\d+)\s+(\S+)\s*(.*)$")
|
||||
headRE = re.compile(r"\s*(\d+)\s+HEAD")
|
||||
nameRegexp= re.compile(r"/?([^/]*)(/([^/]*)(/([^/]*))?)?")
|
||||
snameRegexp= re.compile(r"/([^/]*)/")
|
||||
calRegexp = re.compile(r"\s*@#D([^@]+)@\s*(.*)$")
|
||||
calRegexp = re.compile(r"\s*(ABT|BEF|AFT)?\s*@#D([^@]+)@\s*(.*)$")
|
||||
fromtoRegexp = re.compile(r"\s*FROM\s+@#D([^@]+)@\s*(.*)\s+TO\s+@#D([^@]+)@\s*(.*)$")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -131,11 +131,13 @@ def importData(database, filename):
|
||||
gnome.ui.GnomeErrorDialog(_("%s could not be opened\n") % filename)
|
||||
return
|
||||
|
||||
g.parse_gedcom_file()
|
||||
close = g.parse_gedcom_file()
|
||||
g.resolve_refns()
|
||||
|
||||
statusTop.get_widget("close").set_sensitive(1)
|
||||
|
||||
if close:
|
||||
statusWindow.destroy()
|
||||
|
||||
Utils.modified()
|
||||
if callback:
|
||||
callback(1)
|
||||
@ -313,8 +315,7 @@ class GedcomParser:
|
||||
self.break_note_links()
|
||||
t = time.time() - t
|
||||
self.error_text_obj.insert_defaults(_('Import Complete: %d seconds') % t)
|
||||
if self.close_done.get_active():
|
||||
self.window.destroy()
|
||||
return self.close_done.get_active()
|
||||
|
||||
def break_note_links(self):
|
||||
for o in self.share_note:
|
||||
@ -609,7 +610,7 @@ class GedcomParser:
|
||||
name = Name()
|
||||
m = snameRegexp.match(matches[2])
|
||||
if m:
|
||||
n = m.groups()
|
||||
n = m.groups()[0]
|
||||
names = ('','',n,'','')
|
||||
else:
|
||||
try:
|
||||
@ -1418,7 +1419,6 @@ class GedcomParser:
|
||||
"""Parses the person's name information"""
|
||||
while 1:
|
||||
matches = self.get_next()
|
||||
|
||||
if int(matches[0]) < level:
|
||||
self.backup()
|
||||
return
|
||||
@ -1690,7 +1690,7 @@ class GedcomParser:
|
||||
|
||||
match = calRegexp.match(text)
|
||||
if match:
|
||||
(cal,data) = match.groups()
|
||||
(abt,cal,data) = match.groups()
|
||||
if cal == "FRENCH R":
|
||||
dateobj.set_calendar(Date.FRENCH)
|
||||
elif cal == "JULIAN":
|
||||
@ -1698,6 +1698,8 @@ class GedcomParser:
|
||||
elif cal == "HEBREW":
|
||||
dateobj.set_calendar(Date.HEBREW)
|
||||
dateobj.set(data)
|
||||
if abt:
|
||||
dateobj.get_start_date().setMode(abt)
|
||||
else:
|
||||
dateobj.set(text)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user