2008-01-15 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/PluginUtils/_Tool.py (Tool.__init__): pass in dbstate * src/PluginUtils/__init__.py (MenuToolOptions.__init__): pass in dbstate * src/plugins/Calendar.py (CalendarOptions.add_menu_options): standard defaults svn: r9830
This commit is contained in:
parent
646ad2a772
commit
e304069be8
@ -1,3 +1,10 @@
|
|||||||
|
2008-01-15 Douglas S. Blank <dblank@cs.brynmawr.edu>
|
||||||
|
* src/PluginUtils/_Tool.py (Tool.__init__): pass in dbstate
|
||||||
|
* src/PluginUtils/__init__.py (MenuToolOptions.__init__):
|
||||||
|
pass in dbstate
|
||||||
|
* src/plugins/Calendar.py (CalendarOptions.add_menu_options):
|
||||||
|
standard defaults
|
||||||
|
|
||||||
2008-01-15 Benny Malengier <benny.malengier@gramps-project.org>
|
2008-01-15 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
* src/GrampsDbUtils/_GrampsDbWriteXML.py: import gzip
|
* src/GrampsDbUtils/_GrampsDbWriteXML.py: import gzip
|
||||||
|
|
||||||
|
@ -86,9 +86,13 @@ class Tool:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, dbstate, options_class, name):
|
def __init__(self, dbstate, options_class, name):
|
||||||
|
from PluginUtils import MenuToolOptions
|
||||||
self.db = dbstate.db
|
self.db = dbstate.db
|
||||||
self.person = dbstate.active
|
self.person = dbstate.active
|
||||||
if type(options_class) == ClassType:
|
if issubclass(options_class, MenuToolOptions):
|
||||||
|
# FIXME: pass in person_id
|
||||||
|
self.options = options_class(name, None, dbstate)
|
||||||
|
elif type(options_class) == ClassType:
|
||||||
self.options = options_class(name)
|
self.options = options_class(name)
|
||||||
elif type(options_class) == InstanceType:
|
elif type(options_class) == InstanceType:
|
||||||
self.options = options_class
|
self.options = options_class
|
||||||
|
@ -58,8 +58,8 @@ class MenuToolOptions(MenuOptions,Tool.ToolOptions):
|
|||||||
add_menu_options function. The user can add options to the menu
|
add_menu_options function. The user can add options to the menu
|
||||||
and the MenuToolOptions class will worry about setting up the GUI.
|
and the MenuToolOptions class will worry about setting up the GUI.
|
||||||
"""
|
"""
|
||||||
def __init__(self,name,person_id=None):
|
def __init__(self, name, person_id=None, dbstate=None):
|
||||||
Tool.ToolOptions.__init__(self,name, person_id)
|
Tool.ToolOptions.__init__(self,name, person_id)
|
||||||
MenuOptions.__init__(self,None)
|
MenuOptions.__init__(self, dbstate)
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ class CalcEstDateOptions(MenuToolOptions):
|
|||||||
""" Adds the options """
|
""" Adds the options """
|
||||||
category_name = _("Options")
|
category_name = _("Options")
|
||||||
|
|
||||||
filter = PersonFilterOption(_("Filter"), dbstate, 3)
|
filter = PersonFilterOption(_("Filter"), dbstate, 0, False)
|
||||||
filter.set_help(_("Select filter to restrict people"))
|
filter.set_help(_("Select filter to restrict people"))
|
||||||
menu.add_option(category_name,"filter", filter)
|
menu.add_option(category_name,"filter", filter)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user