dialog; Convert plugin reloading tool to new API.
svn: r5277
This commit is contained in:
@ -12,7 +12,7 @@
|
|||||||
+ prepend all handles and hlinks with "_" (conform to XML ID)
|
+ prepend all handles and hlinks with "_" (conform to XML ID)
|
||||||
+ replace "aka" with "name", "name" with "name preferred=1"
|
+ replace "aka" with "name", "name" with "name preferred=1"
|
||||||
* src/Plugins.py: Factor out common code for plugins; fix tool
|
* src/Plugins.py: Factor out common code for plugins; fix tool
|
||||||
dialog.
|
dialog; Convert plugin reloading tool to new API.
|
||||||
|
|
||||||
2005-10-05 Julio Sanchez <jsanchez@users.sourceforge.net>
|
2005-10-05 Julio Sanchez <jsanchez@users.sourceforge.net>
|
||||||
* src/plugins/ReorderIds.py: handle more cases correctly
|
* src/plugins/ReorderIds.py: handle more cases correctly
|
||||||
|
@ -584,12 +584,17 @@ class GrampsBookFormatComboBox(gtk.ComboBox):
|
|||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# reload_plugins
|
# Reload plugins
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def reload_plugins(obj=None,junk1=None,junk2=None,junk3=None):
|
class Reload(Tool.Tool):
|
||||||
"""Treated as a callback, causes all plugins to get reloaded. This is
|
def __init__(self,db,person,options_class,name,callback=None,parent=None):
|
||||||
useful when writing and debugging a plugin"""
|
Tool.Tool.__init__(self,db,person,options_class,name)
|
||||||
|
|
||||||
|
"""
|
||||||
|
Treated as a callback, causes all plugins to get reloaded.
|
||||||
|
This is useful when writing and debugging a plugin.
|
||||||
|
"""
|
||||||
|
|
||||||
pymod = re.compile(r"^(.*)\.py$")
|
pymod = re.compile(r"^(.*)\.py$")
|
||||||
|
|
||||||
@ -651,14 +656,26 @@ def reload_plugins(obj=None,junk1=None,junk2=None,junk3=None):
|
|||||||
status_up.close(None)
|
status_up.close(None)
|
||||||
status_up = None
|
status_up = None
|
||||||
|
|
||||||
|
class ReloadOptions(Tool.ToolOptions):
|
||||||
|
"""
|
||||||
|
Defines options and provides handling interface.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self,name,person_id=None):
|
||||||
|
Tool.ToolOptions.__init__(self,name,person_id)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Register the plugin reloading tool
|
# Register the plugin reloading tool
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
## PluginMgr.register_tool(
|
PluginMgr.register_tool(
|
||||||
## reload_plugins,
|
name = 'reload',
|
||||||
## _("Reload plugins"),
|
category = Tool.TOOL_DEBUG,
|
||||||
## category=_("Debug"),
|
tool_class = Reload,
|
||||||
## description=_("Attempt to reload plugins. Note: This tool itself is not reloaded!"),
|
options_class = ReloadOptions,
|
||||||
## )
|
modes = Tool.MODE_GUI,
|
||||||
|
translated_name = _("Reload plugins"),
|
||||||
|
description=_("Attempt to reload plugins. "
|
||||||
|
"Note: This tool itself is not reloaded!"),
|
||||||
|
)
|
||||||
|
Reference in New Issue
Block a user