mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update notification: When both calibre and plugin updates are available and the user updates only the plugins, fix the restart calibre button not working. Fixes #1774059 [restart after updating plugins does't work. Selecting "automatically restart" leaves the menu to update plugins or calibre.](https://bugs.launchpad.net/calibre/+bug/1774059)
This commit is contained in:
parent
bd7c8bba60
commit
4a77d32a0e
@ -151,6 +151,12 @@ class UpdateNotification(QDialog):
|
||||
d = PluginUpdaterDialog(self.parent(),
|
||||
initial_filter=FILTER_UPDATE_AVAILABLE)
|
||||
d.exec_()
|
||||
if d.do_restart:
|
||||
QDialog.accept(self)
|
||||
from calibre.gui2.ui import get_gui
|
||||
gui = get_gui()
|
||||
if gui is not None:
|
||||
gui.quit(restart=True)
|
||||
|
||||
def show_future(self, *args):
|
||||
config.set('new_version_notification', bool(self.cb.isChecked()))
|
||||
@ -202,8 +208,8 @@ class UpdateMixin(object):
|
||||
self.status_bar.update_label.setVisible(True)
|
||||
|
||||
if has_calibre_update:
|
||||
if (force or (config.get('new_version_notification') and
|
||||
dynamic.get('update to version %s'%calibre_version, True))):
|
||||
if (force or (config.get('new_version_notification') and dynamic.get(
|
||||
'update to version %s'%calibre_version, True))):
|
||||
if not no_show_popup:
|
||||
self._update_notification__ = UpdateNotification(calibre_version,
|
||||
number_of_plugin_updates, parent=self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user