2007-04-20 Don Allingham <don@gramps-project.org>
* src/DisplayModels/_BaseModel.py (BaseModel.add_row_by_handle): if search not defined, do an insert * src/GrampsDb/_ReadGedcom.py: fix calendar parsing * src/GrampsDb/_WriteGedcom.py: fix calendar generation svn: r8413
This commit is contained in:
parent
1c2514d9b2
commit
dc2afe8f55
@ -1,3 +1,9 @@
|
|||||||
|
2007-04-20 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/DisplayModels/_BaseModel.py (BaseModel.add_row_by_handle):
|
||||||
|
if search not defined, do an insert
|
||||||
|
* src/GrampsDb/_ReadGedcom.py: fix calendar parsing
|
||||||
|
* src/GrampsDb/_WriteGedcom.py: fix calendar generation
|
||||||
|
|
||||||
2007-04-19 Brian Matherly <brian@gramps-project.org>
|
2007-04-19 Brian Matherly <brian@gramps-project.org>
|
||||||
* src/docgen/ODFDoc.py: PROPERLY escape ampersands
|
* src/docgen/ODFDoc.py: PROPERLY escape ampersands
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -64,7 +64,7 @@ import QuestionDialog
|
|||||||
# constants
|
# constants
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
DEFAULT_DIR = os.path.join(const.home_dir,"grampsdb")
|
DEFAULT_DIR = os.path.join(const.home_dir, "grampsdb")
|
||||||
DEFAULT_TITLE = _("Family Tree")
|
DEFAULT_TITLE = _("Family Tree")
|
||||||
NAME_FILE = "name.txt"
|
NAME_FILE = "name.txt"
|
||||||
META_NAME = "meta_data.db"
|
META_NAME = "meta_data.db"
|
||||||
|
@ -254,7 +254,7 @@ class BaseModel(gtk.GenericTreeModel):
|
|||||||
self.node_map.clear_map()
|
self.node_map.clear_map()
|
||||||
|
|
||||||
def add_row_by_handle(self,handle):
|
def add_row_by_handle(self,handle):
|
||||||
if self.search and self.search.match(handle):
|
if not self.search or (self.search and self.search.match(handle)):
|
||||||
|
|
||||||
data = self.map(handle)
|
data = self.map(handle)
|
||||||
key = locale.strxfrm(self.sort_func(data))
|
key = locale.strxfrm(self.sort_func(data))
|
||||||
|
@ -79,9 +79,9 @@ for __val in personalConstantAttributes.keys():
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
MOD = re.compile(r"\s*(INT|EST|CAL)\s+(.*)$")
|
MOD = re.compile(r"\s*(INT|EST|CAL)\s+(.*)$")
|
||||||
CAL = re.compile(r"\s*(ABT|BEF|AFT)?\s*@#D([^@]+)@\s*(.*)$")
|
CAL = re.compile(r"\s*(ABT|BEF|AFT)?\s*@#D?([^@]+)@\s*(.*)$")
|
||||||
RANGE = re.compile(r"\s*BET\s+@#D([^@]+)@\s*(.*)\s+AND\s+@#D([^@]+)@\s*(.*)$")
|
RANGE = re.compile(r"\s*BET\s+@#D?([^@]+)@\s*(.*)\s+AND\s+@#D?([^@]+)@\s*(.*)$")
|
||||||
SPAN = re.compile(r"\s*FROM\s+@#D([^@]+)@\s*(.*)\s+TO\s+@#D([^@]+)@\s*(.*)$")
|
SPAN = re.compile(r"\s*FROM\s+@#D?([^@]+)@\s*(.*)\s+TO\s+@#D?([^@]+)@\s*(.*)$")
|
||||||
|
|
||||||
CALENDAR_MAP = {
|
CALENDAR_MAP = {
|
||||||
"FRENCH R" : RelLib.Date.CAL_FRENCH,
|
"FRENCH R" : RelLib.Date.CAL_FRENCH,
|
||||||
@ -296,7 +296,10 @@ def extract_date(text):
|
|||||||
match = CAL.match(text)
|
match = CAL.match(text)
|
||||||
if match:
|
if match:
|
||||||
(abt, cal, data) = match.groups()
|
(abt, cal, data) = match.groups()
|
||||||
dateobj = DATE_CNV.parse("%s %s" % (abt, data))
|
if abt:
|
||||||
|
dateobj = DATE_CNV.parse("%s %s" % (abt, data))
|
||||||
|
else:
|
||||||
|
dateobj = DATE_CNV.parse(data)
|
||||||
dateobj.set_calendar(CALENDAR_MAP.get(cal,
|
dateobj.set_calendar(CALENDAR_MAP.get(cal,
|
||||||
RelLib.Date.CAL_GREGORIAN))
|
RelLib.Date.CAL_GREGORIAN))
|
||||||
dateobj.set_quality(qual)
|
dateobj.set_quality(qual)
|
||||||
|
@ -105,9 +105,9 @@ _month = [
|
|||||||
"JUL", "AUG", "SEP", "OCT", "NOV", "DEC" ]
|
"JUL", "AUG", "SEP", "OCT", "NOV", "DEC" ]
|
||||||
|
|
||||||
_calmap = {
|
_calmap = {
|
||||||
RelLib.Date.CAL_HEBREW : (_hmonth, '@#HEBREW@'),
|
RelLib.Date.CAL_HEBREW : (_hmonth, '@#DHEBREW@'),
|
||||||
RelLib.Date.CAL_FRENCH : (_fmonth, '@#FRENCH R@'),
|
RelLib.Date.CAL_FRENCH : (_fmonth, '@#DFRENCH R@'),
|
||||||
RelLib.Date.CAL_JULIAN : (_month, '@#JULIAN@'),
|
RelLib.Date.CAL_JULIAN : (_month, '@#DJULIAN@'),
|
||||||
}
|
}
|
||||||
|
|
||||||
_caldef = {
|
_caldef = {
|
||||||
|
Loading…
Reference in New Issue
Block a user