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)