Put all the plugin management and registration stuff into a class. This new class is named PluginManager. It is a Singleton so that everyone gets access to the same plugin information.
svn: r10741
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2006 Martin Hawlisch, Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -44,7 +45,7 @@ import gtk
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gen.lib
|
||||
from PluginUtils import Tool, register_tool
|
||||
from PluginUtils import Tool, PluginManager
|
||||
import Utils
|
||||
import LdsUtils
|
||||
|
||||
@@ -1389,7 +1390,8 @@ class TestcaseGeneratorOptions(Tool.ToolOptions):
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
if __debug__:
|
||||
register_tool(
|
||||
pmgr = PluginManager.get_instance()
|
||||
pmgr.register_tool(
|
||||
name = 'testcasegenerator',
|
||||
category = Tool.TOOL_DEBUG,
|
||||
tool_class = TestcaseGenerator,
|
||||
|
Reference in New Issue
Block a user