diff --git a/gramps/cli/arghandler.py b/gramps/cli/arghandler.py index 7a4517c08..3a99a8415 100644 --- a/gramps/cli/arghandler.py +++ b/gramps/cli/arghandler.py @@ -650,8 +650,13 @@ class ArgHandler(object): category = pdata.category tool_class = eval('mod.' + pdata.toolclass) options_class = eval('mod.' + pdata.optionclass) - tool.cli_tool(self.dbstate, name, category, tool_class, - options_class, options_str_dict) + tool.cli_tool( + dbstate=self.dbstate, + name=name, + category=category, + tool_class=tool_class, + options_class=options_class, + options_str_dict=options_str_dict) return msg = _("Unknown tool name.") else: diff --git a/gramps/gui/plug/_dialogs.py b/gramps/gui/plug/_dialogs.py index 73790c123..12a9a07fa 100644 --- a/gramps/gui/plug/_dialogs.py +++ b/gramps/gui/plug/_dialogs.py @@ -248,11 +248,15 @@ class PluginDialog(ManagedWindow): pdata.name, pdata.id, pdata.category, pdata.require_active) else: - tool.gui_tool(self.state, self.uistate, - eval('mod.' + pdata.toolclass), - eval('mod.' + pdata.optionclass), - pdata.name, pdata.id, pdata.category, - self.state.db.request_rebuild) + tool.gui_tool( + dbstate = self.state, + uistate = self.uistate, + tool_class = eval('mod.' + pdata.toolclass), + options_class = eval('mod.' + pdata.optionclass), + translated_name = pdata.name, + name = pdata.id, + category = pdata.category, + callback = self.state.db.request_rebuild) #------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/tool.py b/gramps/gui/plug/tool.py index 8d67632cb..62f9e1ccf 100644 --- a/gramps/gui/plug/tool.py +++ b/gramps/gui/plug/tool.py @@ -253,7 +253,9 @@ def gui_tool(dbstate, uistate, tool_class, options_class, translated_name, """ try: - tool_class(dbstate, uistate, options_class, name, callback) + tool_class(dbstate = dbstate, uistate = uistate, + options_class = options_class, name = name, + callback = callback) except WindowActiveError: pass except: @@ -272,7 +274,8 @@ def cli_tool(dbstate, name, category, tool_class, options_class, options_str_dic # run tool try: - tool_class(dbstate, None, clt.option_class, name, None) + tool_class(dbstate = dbstate, uistate = None, + options_class = clt.option_class, name = name, callback = None) except: log.error("Failed to start tool.", exc_info=True) diff --git a/gramps/gui/viewmanager.py b/gramps/gui/viewmanager.py index 43beaee8f..aec579a73 100644 --- a/gramps/gui/viewmanager.py +++ b/gramps/gui/viewmanager.py @@ -1628,11 +1628,13 @@ def run_plugin(pdata, dbstate, uistate): pdata.category, pdata.require_active, ) else: - tool.gui_tool(dbstate, uistate, - getattr(mod, pdata.toolclass), - getattr(mod, pdata.optionclass), - pdata.name, pdata.id, pdata.category, - dbstate.db.request_rebuild) + tool.gui_tool(dbstate = dbstate, uistate = uistate, + tool_class = getattr(mod, pdata.toolclass), + options_class = getattr(mod, pdata.optionclass), + translated_name = pdata.name, + name = pdata.id, + category = pdata.category, + callback = dbstate.db.request_rebuild) def make_plugin_callback(pdata, dbstate, uistate): """