diff --git a/src/calibre/gui2/update.py b/src/calibre/gui2/update.py index 6b8f9aa7b7..f6bf18540f 100644 --- a/src/calibre/gui2/update.py +++ b/src/calibre/gui2/update.py @@ -101,6 +101,12 @@ class CheckForUpdates(Thread): self.shutdown_event.set() +def version_key(calibre_version): + if calibre_version.count('.') > 1: + calibre_version = calibre_version.rpartition('.')[0] + return 'update to version %s' % calibre_version + + class UpdateNotification(QDialog): def __init__(self, calibre_version, plugin_updates, parent=None): @@ -143,7 +149,7 @@ class UpdateNotification(QDialog): self.l.addWidget(self.bb, 2, 0, 1, -1) self.bb.accepted.connect(self.accept) self.bb.rejected.connect(self.reject) - dynamic.set('update to version %s'%calibre_version, False) + dynamic.set(version_key(calibre_version), False) def get_plugins(self): from calibre.gui2.dialogs.plugin_updater import (PluginUpdaterDialog, @@ -208,8 +214,7 @@ 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(version_key(calibre_version), True))): if not no_show_popup: self._update_notification__ = UpdateNotification(calibre_version, number_of_plugin_updates, parent=self)