* src/GenericFilter.py (IsSiblingOfFilterMatch): Match only sibling, not the filterMatch; (HasEvent,HasFamilyEvent): Dont crash in filter editor.

svn: r4592
This commit is contained in:
Martin Hawlisch 2005-05-14 10:03:36 +00:00
parent 5934f15111
commit 9a1dece0db
2 changed files with 19 additions and 13 deletions

View File

@ -1,3 +1,8 @@
2005-05-14 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/GenericFilter.py (IsSiblingOfFilterMatch): Match only sibling,
not the filterMatch; (HasEvent,HasFamilyEvent): Dont crash in filter
editor.
2005-05-13 Don Allingham <don@gramps-project.org>
* src/plugins/ScratchPad.py: fix GdkAtom index problem with pygtk2.4

View File

@ -650,6 +650,7 @@ class IsSiblingOfFilterMatch(Rule):
fam = self.db.get_family_from_handle(fam_id)
if fam:
for child_handle in fam.get_child_handle_list():
if child_handle != p_id:
self.map[child_handle] = 1
#-------------------------------------------------------------------------
@ -1074,12 +1075,12 @@ class HasEvent(Rule):
labels = [ _('Personal event:'), _('Date:'), _('Place:'), _('Description:') ]
def __init__(self,list):
Rule.__init__(self,list)
def prepare(self,list):
self.date = None
try:
if self.list and self.list[1]:
self.date = DateHandler.parser.parse(self.list[1])
else:
self.date = None
except: pass
def name(self):
return 'Has the personal event'
@ -1127,12 +1128,12 @@ class HasFamilyEvent(Rule):
labels = [ _('Family event:'), _('Date:'), _('Place:'), _('Description:') ]
def __init__(self,list):
Rule.__init__(self,list)
def prepare(self,list):
self.date = None
try:
if self.list and self.list[1]:
self.date = DateHandler.parser.parse(self.list[1])
else:
self.date = None
except: pass
def name(self):
return 'Has the family event'