def install_new_plugins(): from calibre.utils.config import JSONConfig prefs = JSONConfig('newly-installed-editor-plugins') pl = prefs.get('newly_installed_plugins', ()) if pl: for name in pl: plugin = find_plugin(name) if plugin is not None: install_plugin(plugin) prefs['newly_installed_plugins'] = []
def check_for_add_to_editor_toolbar(self, plugin, previously_installed): if not previously_installed: from calibre.gui2.tweak_book.plugin import install_plugin install_plugin(plugin)
def check_for_add_to_editor_toolbar(self, plugin, previously_installed): if not previously_installed: from calibre.gui2.tweak_book.plugin import install_plugin install_plugin(plugin)