2007-02-06 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_ReadGedcom.py: fix cal/est parsing * src/DisplayTabs/_ButtonTab.py: catch window already being open * example/gedcom/sample.ged: Add est/cal samples svn: r8063
This commit is contained in:
parent
f4c7a9fee9
commit
4be7ac543c
@ -1,3 +1,8 @@
|
|||||||
|
2007-02-06 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/GrampsDb/_ReadGedcom.py: fix cal/est parsing
|
||||||
|
* src/DisplayTabs/_ButtonTab.py: catch window already being open
|
||||||
|
* example/gedcom/sample.ged: Add est/cal samples
|
||||||
|
|
||||||
2007-02-04 Don Allingham <don@gramps-project.org>
|
2007-02-04 Don Allingham <don@gramps-project.org>
|
||||||
* src/DataViews/_RelationView.py: default Relationship buttons to insenstive.
|
* src/DataViews/_RelationView.py: default Relationship buttons to insenstive.
|
||||||
Setting an active person will reenable them.
|
Setting an active person will reenable them.
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
2 FORM jpeg
|
2 FORM jpeg
|
||||||
2 FILE O0.jpg
|
2 FILE O0.jpg
|
||||||
1 BIRT Edwin Michael Smith's Birth event
|
1 BIRT Edwin Michael Smith's Birth event
|
||||||
2 DATE 24 MAY 1961
|
2 DATE EST 24 MAY 1961
|
||||||
2 PLAC San Jose, Santa Clara Co., CA
|
2 PLAC San Jose, Santa Clara Co., CA
|
||||||
3 FORM city, county, state
|
3 FORM city, county, state
|
||||||
2 FAMC @F02@
|
2 FAMC @F02@
|
||||||
@ -78,7 +78,7 @@
|
|||||||
2 DATE BET. 1979 - 1984
|
2 DATE BET. 1979 - 1984
|
||||||
2 PLAC UC Berkeley
|
2 PLAC UC Berkeley
|
||||||
1 RESI
|
1 RESI
|
||||||
2 DATE 1 JAN 1985
|
2 DATE CAL 1 JAN 1985
|
||||||
2 ADDR Address Line 0
|
2 ADDR Address Line 0
|
||||||
3 ADR1 Adr1 line
|
3 ADR1 Adr1 line
|
||||||
3 ADR2 Adr2 line
|
3 ADR2 Adr2 line
|
||||||
|
@ -41,6 +41,7 @@ import gtk
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from GrampsWidgets import SimpleButton
|
from GrampsWidgets import SimpleButton
|
||||||
from _GrampsTab import GrampsTab
|
from _GrampsTab import GrampsTab
|
||||||
|
import Errors
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -124,7 +125,10 @@ class ButtonTab(GrampsTab):
|
|||||||
the Edit button handler is called
|
the Edit button handler is called
|
||||||
"""
|
"""
|
||||||
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
||||||
|
try:
|
||||||
self.edit_button_clicked(obj)
|
self.edit_button_clicked(obj)
|
||||||
|
except Errors.WindowActiveError:
|
||||||
|
pass
|
||||||
|
|
||||||
def add_button_clicked(self, obj):
|
def add_button_clicked(self, obj):
|
||||||
"""
|
"""
|
||||||
|
@ -2390,12 +2390,13 @@ class GedcomParser(UpdateCallback):
|
|||||||
int_val = False
|
int_val = False
|
||||||
|
|
||||||
match = modRegexp.match(text)
|
match = modRegexp.match(text)
|
||||||
|
qual = None
|
||||||
if match:
|
if match:
|
||||||
(mod, text) = match.groups()
|
(mod, text) = match.groups()
|
||||||
if mod == "CAL":
|
if mod == "CAL":
|
||||||
dateobj.set_quality(RelLib.Date.QUAL_CALCULATED)
|
qual = RelLib.Date.QUAL_CALCULATED
|
||||||
elif mod == "EST":
|
elif mod == "EST":
|
||||||
dateobj.set_quality(RelLib.Date.QUAL_ESTIMATED)
|
qual = RelLib.Date.QUAL_ESTIMATED
|
||||||
|
|
||||||
match = rangeRegexp.match(text)
|
match = rangeRegexp.match(text)
|
||||||
if match:
|
if match:
|
||||||
@ -2418,6 +2419,8 @@ class GedcomParser(UpdateCallback):
|
|||||||
start.get_start_date() + stop.get_start_date())
|
start.get_start_date() + stop.get_start_date())
|
||||||
if int_val:
|
if int_val:
|
||||||
dateobj.set_text_value(comment)
|
dateobj.set_text_value(comment)
|
||||||
|
if qual:
|
||||||
|
dateobj.set_quality(qual)
|
||||||
return dateobj
|
return dateobj
|
||||||
|
|
||||||
match = spanRegexp.match(text)
|
match = spanRegexp.match(text)
|
||||||
@ -2441,6 +2444,8 @@ class GedcomParser(UpdateCallback):
|
|||||||
start.get_start_date() + stop.get_start_date())
|
start.get_start_date() + stop.get_start_date())
|
||||||
if int_val:
|
if int_val:
|
||||||
dateobj.set_text_value(comment)
|
dateobj.set_text_value(comment)
|
||||||
|
if qual:
|
||||||
|
dateobj.set_quality(qual)
|
||||||
return dateobj
|
return dateobj
|
||||||
|
|
||||||
match = calRegexp.match(text)
|
match = calRegexp.match(text)
|
||||||
@ -2453,11 +2458,15 @@ class GedcomParser(UpdateCallback):
|
|||||||
dateobj.set_calendar(RelLib.Date.CAL_JULIAN)
|
dateobj.set_calendar(RelLib.Date.CAL_JULIAN)
|
||||||
elif cal == "HEBREW":
|
elif cal == "HEBREW":
|
||||||
dateobj.set_calendar(RelLib.Date.CAL_HEBREW)
|
dateobj.set_calendar(RelLib.Date.CAL_HEBREW)
|
||||||
|
if qual:
|
||||||
|
dateobj.set_quality(qual)
|
||||||
return dateobj
|
return dateobj
|
||||||
else:
|
else:
|
||||||
dval = self.dp.parse(text)
|
dval = self.dp.parse(text)
|
||||||
if int_val:
|
if int_val:
|
||||||
dateobj.set_text_value(comment)
|
dateobj.set_text_value(comment)
|
||||||
|
if qual:
|
||||||
|
dateobj.set_quality(qual)
|
||||||
return dval
|
return dval
|
||||||
except IOError:
|
except IOError:
|
||||||
return self.dp.set_text(text)
|
return self.dp.set_text(text)
|
||||||
|
Loading…
Reference in New Issue
Block a user