mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Fix #8176 (Expose configuration dialog for a plugin via API)
This commit is contained in:
parent
691838b2b2
commit
3e1a531444
@ -36,6 +36,11 @@ class InterfaceAction(QObject):
|
||||
|
||||
self.gui.iactions['Save To Disk']
|
||||
|
||||
To access the actual plugin, use the :attr:`interface_action_base_plugin`
|
||||
attribute, this attribute only becomes available after the plugin has been
|
||||
initialized. Useful if you want to use methods from the plugin class like
|
||||
do_user_config().
|
||||
|
||||
The QAction specified by :attr:`action_spec` is automatically create and
|
||||
made available as ``self.qaction``.
|
||||
|
||||
@ -83,6 +88,7 @@ class InterfaceAction(QObject):
|
||||
self.setObjectName(self.name)
|
||||
self.gui = parent
|
||||
self.site_customization = site_customization
|
||||
self.interface_action_base_plugin = None
|
||||
|
||||
def do_genesis(self):
|
||||
self.Dispatcher = partial(Dispatcher, parent=self)
|
||||
|
@ -105,6 +105,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
|
||||
for action in interface_actions():
|
||||
ac = action.load_actual_plugin(self)
|
||||
ac.plugin_path = action.plugin_path
|
||||
ac.interface_action_base_plugin = action
|
||||
if ac.name in acmap:
|
||||
if ac.priority >= acmap[ac.name].priority:
|
||||
acmap[ac.name] = ac
|
||||
|
Loading…
x
Reference in New Issue
Block a user