From 805a82bcabca52e9878be013328845014d57166e Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 20 Jul 2006 00:42:20 +0000 Subject: [PATCH] * src/plugins/StatisticsChart.py (StatisticsChartOptions.get_report_filters): Add custom filters. * src/plugins/Calendar.py (FilterWidget.get_filters): Add custom filters. * src/plugins/TimeLine.py (TimeLineOptions.get_report_filters): Add custom filters. * src/plugins/IndivComplete.py (IndivCompleteOptions.get_report_filters): Add custom filters. * src/plugins/NarrativeWeb.py (WebReportOptions.get_report_filters): Add custom filters. encoding errors; (GraphVizOptions.get_report_filters): Add custom filters. svn: r7048 --- ChangeLog | 15 +++++++++++++-- src/plugins/Calendar.py | 3 ++- src/plugins/GraphViz.py | 5 +++-- src/plugins/IndivComplete.py | 5 +++-- src/plugins/NarrativeWeb.py | 5 +++-- src/plugins/StatisticsChart.py | 6 +++--- src/plugins/TimeLine.py | 5 +++-- 7 files changed, 30 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d1cc3af4..6d8ad8269 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,18 @@ 2006-07-19 Alex Roitman + * src/plugins/StatisticsChart.py + (StatisticsChartOptions.get_report_filters): Add custom filters. + * src/plugins/Calendar.py (FilterWidget.get_filters): Add custom + filters. + * src/plugins/TimeLine.py (TimeLineOptions.get_report_filters): + Add custom filters. + * src/plugins/IndivComplete.py + (IndivCompleteOptions.get_report_filters): Add custom filters. + * src/plugins/NarrativeWeb.py + (WebReportOptions.get_report_filters): Add custom filters. * src/plugins/GraphViz.py (GraphViz.__init__): Take care of the - encoding errors. - + encoding errors; + (GraphVizOptions.get_report_filters): Add custom filters. + 2006-07-19 Zsolt Foldvari * src/GrampsCfg.py: UI improvements. * src/Config/_GrampsIniKeys.py: Proper key retrieval. diff --git a/src/plugins/Calendar.py b/src/plugins/Calendar.py index e8c4120af..13fdb8c47 100644 --- a/src/plugins/Calendar.py +++ b/src/plugins/Calendar.py @@ -249,7 +249,6 @@ class Calendar(Report): """ filter_num = self.options_class.get_filter_number() filters = self.options_class.get_report_filters(self.start_person) - filters.extend(CustomFilters.get_filters()) self.filter = filters[filter_num] people = self.filter.apply(self.database, self.database.get_person_handles(sort_handles=False)) @@ -545,6 +544,8 @@ class FilterWidget(Widget): f.set_name(_("People with a Calendar attribute")) f.add_rule(Rules.Person.HasTextMatchingSubstringOf(['Calendar',0,0])) retval.append(f) + + retval.extend(CustomFilters.get_filters('Person')) return retval # ----------------------------------------------------------------- diff --git a/src/plugins/GraphViz.py b/src/plugins/GraphViz.py index 2798f219c..afd525944 100644 --- a/src/plugins/GraphViz.py +++ b/src/plugins/GraphViz.py @@ -240,7 +240,6 @@ class GraphViz: filter_num = options_class.get_filter_number() filters = options_class.get_report_filters(person) - filters.extend(CustomFilters.get_filters()) self.filter = filters[filter_num] the_buffer = self.get_report() @@ -698,7 +697,9 @@ class GraphVizOptions(ReportOptions): com.set_name(_("People with common ancestor with %s") % name) com.add_rule(Rules.Person.HasCommonAncestorWith([gramps_id])) - return [all,des,ans,com] + the_filters = [all,des,ans,com] + the_filters.extend(CustomFilters.get_filters('Person')) + return the_filters def make_doc_menu(self,dialog,active=None): pass diff --git a/src/plugins/IndivComplete.py b/src/plugins/IndivComplete.py index 1a6a80d32..3a93ab053 100644 --- a/src/plugins/IndivComplete.py +++ b/src/plugins/IndivComplete.py @@ -82,7 +82,6 @@ class IndivCompleteReport(Report): filter_num = options_class.get_filter_number() filters = options_class.get_report_filters(person) - filters.extend(CustomFilters.get_filters()) self.filter = filters[filter_num] def define_table_styles(self): @@ -565,7 +564,9 @@ class IndivCompleteOptions(ReportOptions): com.set_name(_("People with common ancestor with %s") % name) com.add_rule(Rules.Person.HasCommonAncestorWith([gramps_id])) - return [filt_id,all,des,ans,com] + the_filters = [filt_id,all,des,ans,com] + the_filters.extend(CustomFilters.get_filters('Person')) + return the_filters def add_user_options(self,dialog): """ diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py index ed16dee59..cf068ab41 100644 --- a/src/plugins/NarrativeWeb.py +++ b/src/plugins/NarrativeWeb.py @@ -1997,7 +1997,6 @@ class WebReport(Report): filter_num = options.get_filter_number() filters = options.get_report_filters(person) - filters.extend(CustomFilters.get_filters()) self.filter = filters[filter_num] self.target_path = options.handler.options_dict['NWEBod'] @@ -2376,7 +2375,9 @@ class WebReportOptions(ReportOptions): com.set_name(_("People with common ancestor with %s") % name) com.add_rule(Rules.Person.HasCommonAncestorWith([gramps_id])) - return [all,des,df,ans,com] + the_filters = [all,des,df,ans,com] + the_filters.extend(CustomFilters.get_filters('Person')) + return the_filters def add_user_options(self,dialog): priv_msg = _("Do not include records marked private") diff --git a/src/plugins/StatisticsChart.py b/src/plugins/StatisticsChart.py index 17c53c2e7..376f812f5 100644 --- a/src/plugins/StatisticsChart.py +++ b/src/plugins/StatisticsChart.py @@ -489,7 +489,6 @@ class StatisticsChart(Report): filter_num = options_class.get_filter_number() filters = options_class.get_report_filters(person) - filters.extend(CustomFilters.get_filters()) filterfun = filters[filter_num] options = options_class.handler.options_dict @@ -859,8 +858,9 @@ class StatisticsChartOptions(ReportOptions): com.set_name(_("People with common ancestor with %s") % name) com.add_rule(Rules.Person.HasCommonAncestorWith([gramps_id])) - return [all, des, ans, com] - + the_filters = [all, des, ans, com] + the_filters.extend(CustomFilters.get_filters('Person')) + return the_filters def add_user_options(self, dialog): """ diff --git a/src/plugins/TimeLine.py b/src/plugins/TimeLine.py index 2000c5c13..314dccd74 100644 --- a/src/plugins/TimeLine.py +++ b/src/plugins/TimeLine.py @@ -86,7 +86,6 @@ class TimeLine(Report): filter_num = options_class.get_filter_number() filters = options_class.get_report_filters(person) - filters.extend(CustomFilters.get_filters()) self.filter = filters[filter_num] name = NameDisplay.displayer.display_formal(person) @@ -430,7 +429,9 @@ class TimeLineOptions(ReportOptions): com.set_name(_("People with common ancestor with %s") % name) com.add_rule(Rules.Person.HasCommonAncestorWith([gramps_id])) - return [all,des,ans,com] + the_filters = [all,des,ans,com] + the_filters.extend(CustomFilters.get_filters('Person')) + return the_filters def get_sort_functions(self,sort): return [