mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
d1289664b0
commit
e47e410b4e
@ -72,4 +72,9 @@ class InterfacePluginDemo(InterfaceActionBase):
|
|||||||
'''
|
'''
|
||||||
config_widget.save_settings()
|
config_widget.save_settings()
|
||||||
|
|
||||||
|
# Apply the changes
|
||||||
|
ac = self.actual_plugin_
|
||||||
|
if ac is not None:
|
||||||
|
ac.apply_settings()
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@ if False:
|
|||||||
from calibre.gui2.actions import InterfaceAction
|
from calibre.gui2.actions import InterfaceAction
|
||||||
from calibre_plugins.interface_demo.main import DemoDialog
|
from calibre_plugins.interface_demo.main import DemoDialog
|
||||||
|
|
||||||
|
|
||||||
class InterfacePlugin(InterfaceAction):
|
class InterfacePlugin(InterfaceAction):
|
||||||
|
|
||||||
name = 'Interface Plugin Demo'
|
name = 'Interface Plugin Demo'
|
||||||
@ -64,4 +63,9 @@ class InterfacePlugin(InterfaceAction):
|
|||||||
d = DemoDialog(self.gui, self.qaction.icon(), do_user_config)
|
d = DemoDialog(self.gui, self.qaction.icon(), do_user_config)
|
||||||
d.show()
|
d.show()
|
||||||
|
|
||||||
|
def apply_settings(self):
|
||||||
|
from calibre_plugins.interface_demo.config import prefs
|
||||||
|
# In an actual non trivial plugin, you would probably need to
|
||||||
|
# do something based on the settings in prefs
|
||||||
|
prefs
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user