From 187ed06537f140e3f419bf7c0e98e9e1b80f1cb8 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 24 Aug 2006 04:38:06 +0000 Subject: [PATCH] * src/DataViews/_PersonView.py (person_removed): Properly create and pass the filter when searchbar is enabled (not sidebar). svn: r7251 --- ChangeLog | 2 ++ src/DataViews/_PersonView.py | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9cda9cf0..23c5ff378 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ 2006-08-23 Alex Roitman + * src/DataViews/_PersonView.py (person_removed): Properly create + and pass the filter when searchbar is enabled (not sidebar). * src/FilterEditor/_FilterEditor.py (clone_filter): Add method; Support clone-and-edit functionality. * src/glade/rule.glade (filter_list): Add clone button. diff --git a/src/DataViews/_PersonView.py b/src/DataViews/_PersonView.py index f21660ebf..8dac083a7 100644 --- a/src/DataViews/_PersonView.py +++ b/src/DataViews/_PersonView.py @@ -60,7 +60,7 @@ import Config import const from Editors import EditPerson -from Filters import SearchBar +from Filters import SearchBar, SearchFilter from Filters.SideBar import PersonSidebarFilter from DdTargets import DdTargets @@ -678,16 +678,18 @@ class PersonView(PageView.PersonNavView): return if Config.get(Config.FILTER): - filter_info = (PeopleModel.GENERIC, self.generic_filter) + data_filter = self.generic_filter else: - filter_info = (PeopleModel.SEARCH, self.search_bar.get_value()) + col,text,inv = self.search_bar.get_value() + func = lambda x: self.model.on_get_value(x, col) or u"" + data_filter = SearchFilter(func, text, inv) self.model.clear_cache() for node in handle_list: person = self.dbstate.db.get_person_from_handle(node) top = person.get_primary_name().get_group_name() mylist = self.model.sname_sub.get(top,[]) - self.model.calculate_data(filter_info[1], skip=set(handle_list)) + self.model.calculate_data(data_filter, skip=set(handle_list)) if mylist: try: path = self.model.on_get_path(node)