This commit is contained in:
Kovid Goyal 2011-03-27 17:47:20 -06:00
parent d1289664b0
commit e47e410b4e
2 changed files with 10 additions and 1 deletions

View File

@ -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()

View File

@ -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