* src/plugins/FilterEditor.py (ShowResults.__init__):

Use gramps IDs instead of handles for display.


svn: r3530
This commit is contained in:
Alex Roitman 2004-09-09 02:59:48 +00:00
parent 4c3a6b9167
commit 2074bec9ce
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2004-09-08 Alex Roitman <shura@alex.neuro.umn.edu>
* src/plugins/FilterEditor.py (ShowResults.__init__):
Use gramps IDs instead of handles for display.
2004-09-01 Alex Roitman <shura@alex.neuro.umn.edu> 2004-09-01 Alex Roitman <shura@alex.neuro.umn.edu>
* src/EditPlace.py (on_web_go_clicked): Typo. * src/EditPlace.py (on_web_go_clicked): Typo.

View File

@ -355,8 +355,8 @@ class FilterEditor:
store,iter = self.clist.get_selected() store,iter = self.clist.get_selected()
if iter: if iter:
filt = self.clist.get_object(iter) filt = self.clist.get_object(iter)
id_list = filt.apply(self.db,self.db.get_person_handles(sort_handles=False)) handle_list = filt.apply(self.db,self.db.get_person_handles(sort_handles=False))
ShowResults(self,self.db,id_list,filt.get_name()) ShowResults(self,self.db,handle_list,filt.get_name())
def delete_filter(self,obj): def delete_filter(self,obj):
store,iter = self.clist.get_selected() store,iter = self.clist.get_selected()
@ -769,7 +769,7 @@ class EditRule:
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class ShowResults: class ShowResults:
def __init__(self,parent,db,id_list,filtname): def __init__(self,parent,db,handle_list,filtname):
self.parent = parent self.parent = parent
self.win_key = self self.win_key = self
self.filtname = filtname self.filtname = filtname
@ -786,9 +786,10 @@ class ShowResults:
}) })
n = [] n = []
for p_id in id_list: for p_handle in handle_list:
p = db.get_person_from_handle(p_id) p = db.get_person_from_handle(p_handle)
n.append ("%s [%s]\n" % (p.get_primary_name().get_name(),p.get_handle())) n.append ("%s [%s]\n" %
(p.get_primary_name().get_name(),p.get_gramps_id()))
n.sort () n.sort ()
text.get_buffer().set_text(string.join (n, '')) text.get_buffer().set_text(string.join (n, ''))