0000970: _IsBookmarked.py causes crash
svn: r8416
This commit is contained in:
parent
eeda8e68fe
commit
c36c05775e
@ -1,3 +1,7 @@
|
|||||||
|
2007-04-21 Brian Matherly <brian@gramps-project.org>
|
||||||
|
* src/Filters/Rules/Person/_IsBookmarked.py:
|
||||||
|
0000970: _IsBookmarked.py causes crash
|
||||||
|
|
||||||
2007-04-21 Benny Malengier <bm@cage.ugent.be>
|
2007-04-21 Benny Malengier <bm@cage.ugent.be>
|
||||||
* src/Editors/_EditFamily.py : add up down arraw on children list
|
* src/Editors/_EditFamily.py : add up down arraw on children list
|
||||||
* src/DisplayTabs/_EmbeddedList.py : generalize select method for
|
* src/DisplayTabs/_EmbeddedList.py : generalize select method for
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2002-2006 Donald N. Allingham
|
# Copyright (C) 2002-2006 Donald N. Allingham
|
||||||
|
# Copyright (C) 2007 Brian Matherly
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -27,11 +28,6 @@
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
try:
|
|
||||||
set()
|
|
||||||
except:
|
|
||||||
from sets import Set as set
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
@ -52,12 +48,7 @@ class IsBookmarked(Rule):
|
|||||||
description = _("Matches the people on the bookmark list")
|
description = _("Matches the people on the bookmark list")
|
||||||
|
|
||||||
def prepare(self,db):
|
def prepare(self,db):
|
||||||
bookmarks = db.get_bookmarks()
|
self.bookmarks = db.get_bookmarks().get()
|
||||||
if len(bookmarks) == 0:
|
|
||||||
self.apply = lambda db,p : False
|
|
||||||
else:
|
|
||||||
self.bookmarks = set(bookmarks)
|
|
||||||
self.apply = self.apply_real
|
|
||||||
|
|
||||||
def apply_real(self,db,person):
|
def apply(self,db,person):
|
||||||
return person.handle in self.bookmarks
|
return person.handle in self.bookmarks
|
||||||
|
Loading…
Reference in New Issue
Block a user