mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Nicer version number in update notification
This commit is contained in:
parent
78e198a415
commit
148c9fb57a
@ -82,11 +82,14 @@ class UpdateNotification(QDialog):
|
|||||||
self.logo.setMaximumWidth(110)
|
self.logo.setMaximumWidth(110)
|
||||||
self.logo.setPixmap(QPixmap(I('lt.png')).scaled(100, 100,
|
self.logo.setPixmap(QPixmap(I('lt.png')).scaled(100, 100,
|
||||||
Qt.IgnoreAspectRatio, Qt.SmoothTransformation))
|
Qt.IgnoreAspectRatio, Qt.SmoothTransformation))
|
||||||
|
ver = calibre_version
|
||||||
|
if ver.endswith('.0'):
|
||||||
|
ver = ver[:-2]
|
||||||
self.label = QLabel(('<p>'+
|
self.label = QLabel(('<p>'+
|
||||||
_('New version <b>%(ver)s</b> of %(app)s is available for download. '
|
_('New version <b>%(ver)s</b> of %(app)s is available for download. '
|
||||||
'See the <a href="http://calibre-ebook.com/whats-new'
|
'See the <a href="http://calibre-ebook.com/whats-new'
|
||||||
'">new features</a>.'))%dict(
|
'">new features</a>.'))%dict(
|
||||||
app=__appname__, ver=calibre_version))
|
app=__appname__, ver=ver))
|
||||||
self.label.setOpenExternalLinks(True)
|
self.label.setOpenExternalLinks(True)
|
||||||
self.label.setWordWrap(True)
|
self.label.setWordWrap(True)
|
||||||
self.setWindowTitle(_('Update available!'))
|
self.setWindowTitle(_('Update available!'))
|
||||||
@ -169,7 +172,6 @@ class UpdateMixin(object):
|
|||||||
self.status_bar.update_label.setText(msg)
|
self.status_bar.update_label.setText(msg)
|
||||||
self.status_bar.update_label.setVisible(True)
|
self.status_bar.update_label.setVisible(True)
|
||||||
|
|
||||||
|
|
||||||
if has_calibre_update:
|
if has_calibre_update:
|
||||||
if (force or (config.get('new_version_notification') and
|
if (force or (config.get('new_version_notification') and
|
||||||
dynamic.get('update to version %s'%calibre_version, True))):
|
dynamic.get('update to version %s'%calibre_version, True))):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user