Make a separate method to open the plugin update dialog

This commit is contained in:
Kovid Goyal 2024-05-25 09:10:57 +05:30
parent e989b1bcd6
commit 41bb502022
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -231,9 +231,11 @@ class UpdateMixin:
self._update_notification__.show() self._update_notification__.show()
elif has_plugin_updates: elif has_plugin_updates:
if force: if force:
self.show_plugin_update_dialog()
def show_plugin_update_dialog(self):
from calibre.gui2.dialogs.plugin_updater import FILTER_UPDATE_AVAILABLE, PluginUpdaterDialog from calibre.gui2.dialogs.plugin_updater import FILTER_UPDATE_AVAILABLE, PluginUpdaterDialog
d = PluginUpdaterDialog(self, d = PluginUpdaterDialog(self, initial_filter=FILTER_UPDATE_AVAILABLE)
initial_filter=FILTER_UPDATE_AVAILABLE)
d.exec() d.exec()
if d.do_restart: if d.do_restart:
self.quit(restart=True) self.quit(restart=True)