migrate the existing uses to the new run_private_data_option method

This commit is contained in:
Paul Franklin 2014-07-22 12:29:23 -07:00
parent 4a95862d81
commit 0659083568
2 changed files with 5 additions and 12 deletions

View File

@ -45,7 +45,6 @@ from gramps.gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
TableStyle, TableCellStyle, TableStyle, TableCellStyle,
FONT_SANS_SERIF, FONT_SERIF, FONT_SANS_SERIF, FONT_SERIF,
INDEX_TYPE_TOC, PARA_ALIGN_CENTER) INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
from gramps.gen.proxy import PrivateProxyDb
from gramps.gen.sort import Sort from gramps.gen.sort import Sort
from gramps.gen.utils.location import get_main_location from gramps.gen.utils.location import get_main_location
from gramps.gen.lib import PlaceType from gramps.gen.lib import PlaceType
@ -87,10 +86,7 @@ class PlaceReport(Report):
stdoptions.run_name_format_option(self, menu) stdoptions.run_name_format_option(self, menu)
self._nd = self._name_display self._nd = self._name_display
if incl_private: stdoptions.run_private_data_option(self, menu)
self.database = database
else:
self.database = PrivateProxyDb(database)
filter_option = menu.get_option_by_name('filter') filter_option = menu.get_option_by_name('filter')
self.filter = filter_option.get_filter() self.filter = filter_option.get_filter()
@ -387,12 +383,12 @@ class PlaceOptions(MenuReportOptions):
opt.set_filters(filter_list) opt.set_filters(filter_list)
menu.add_option(category_name, "filter", opt) menu.add_option(category_name, "filter", opt)
stdoptions.add_name_format_option(menu, category_name)
places = PlaceListOption(_("Select places individually")) places = PlaceListOption(_("Select places individually"))
places.set_help(_("List of places to report on")) places.set_help(_("List of places to report on"))
menu.add_option(category_name, "places", places) menu.add_option(category_name, "places", places)
stdoptions.add_name_format_option(menu, category_name)
center = EnumeratedListOption(_("Center on"), "Event") center = EnumeratedListOption(_("Center on"), "Event")
center.set_items([ center.set_items([
("Event", _("Event")), ("Event", _("Event")),

View File

@ -133,7 +133,7 @@ from gramps.gen.utils.image import image_size, resize_to_jpeg_buffer
from gramps.gen.mime import get_description from gramps.gen.mime import get_description
from gramps.gen.display.name import displayer as _nd from gramps.gen.display.name import displayer as _nd
from gramps.gen.datehandler import displayer as _dd from gramps.gen.datehandler import displayer as _dd
from gramps.gen.proxy import PrivateProxyDb, LivingProxyDb from gramps.gen.proxy import LivingProxyDb
from gramps.plugins.lib.libhtmlconst import _CHARACTER_SETS, _CC, _COPY_OPTIONS from gramps.plugins.lib.libhtmlconst import _CHARACTER_SETS, _CC, _COPY_OPTIONS
# import HTML Class from src/plugins/lib/libhtml.py # import HTML Class from src/plugins/lib/libhtml.py
@ -6880,10 +6880,7 @@ class NavWebReport(Report):
menuopt = menu.get_option_by_name(optname) menuopt = menu.get_option_by_name(optname)
self.options[optname] = menuopt.get_value() self.options[optname] = menuopt.get_value()
if not self.options['incl_private']: stdoptions.run_private_data_option(self, menu)
self.database = PrivateProxyDb(database)
else:
self.database = database
livinginfo = self.options['living'] livinginfo = self.options['living']
yearsafterdeath = self.options['yearsafterdeath'] yearsafterdeath = self.options['yearsafterdeath']