3292: register plugins, load on need, not on start of GRAMPS - GEPS 014

svn: r13400
This commit is contained in:
Benny Malengier
2009-10-24 13:53:20 +00:00
parent d1fbb2bff9
commit ed619cfdd6
195 changed files with 4123 additions and 3371 deletions

View File

@ -274,17 +274,12 @@ class CLIManager(object):
RecentFiles.recent_files(filename, name)
self.file_loaded = True
def do_load_plugins(self):
def do_reg_plugins(self):
"""
Loads the plugins at initialization time. The plugin status window is
opened on an error if the user has requested.
Register the plugins at initialization time.
"""
# load plugins
error = self._pmgr.load_plugins(const.PLUGINS_DIR)
error |= self._pmgr.load_plugins(const.USER_PLUGINS)
return error
self._pmgr.reg_plugins(const.PLUGINS_DIR)
self._pmgr.reg_plugins(const.USER_PLUGINS)
def startcli(errors, argparser):
"""
@ -309,7 +304,7 @@ def startcli(errors, argparser):
#we need a manager for the CLI session
climanager = CLIManager(dbstate, True)
#load the plugins
climanager.do_load_plugins()
climanager.do_reg_plugins()
# handle the arguments
from arghandler import ArgHandler
handler = ArgHandler(dbstate, argparser, climanager)