* 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
This commit is contained in:
Alex Roitman 2006-07-20 00:42:20 +00:00
parent 511abf5c6e
commit e3c6406cea
7 changed files with 30 additions and 14 deletions

View File

@ -1,7 +1,18 @@
2006-07-19 Alex Roitman <shura@gramps-project.org>
* 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 <zsolt.foldvari@nokia.com>
* src/GrampsCfg.py: UI improvements.
* src/Config/_GrampsIniKeys.py: Proper key retrieval.

View File

@ -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
# -----------------------------------------------------------------

View File

@ -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

View File

@ -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):
"""

View File

@ -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")

View File

@ -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):
"""

View File

@ -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 [