Nicer version number in update notification

This commit is contained in:
Kovid Goyal 2013-11-22 08:47:09 +05:30
parent 78e198a415
commit 148c9fb57a

View File

@ -82,11 +82,14 @@ class UpdateNotification(QDialog):
self.logo.setMaximumWidth(110)
self.logo.setPixmap(QPixmap(I('lt.png')).scaled(100, 100,
Qt.IgnoreAspectRatio, Qt.SmoothTransformation))
ver = calibre_version
if ver.endswith('.0'):
ver = ver[:-2]
self.label = QLabel(('<p>'+
_('New version <b>%(ver)s</b> of %(app)s is available for download. '
'See the <a href="http://calibre-ebook.com/whats-new'
'">new features</a>.'))%dict(
app=__appname__, ver=calibre_version))
app=__appname__, ver=ver))
self.label.setOpenExternalLinks(True)
self.label.setWordWrap(True)
self.setWindowTitle(_('Update available!'))
@ -169,7 +172,6 @@ class UpdateMixin(object):
self.status_bar.update_label.setText(msg)
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))):