From f3808212b5547d709f0de085d583f64c4603772f Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Wed, 18 Oct 2017 18:42:59 +0300 Subject: [PATCH] Added link to github into labelVersion in AboutDialog --- src/bitmessageqt/about.ui | 2 +- src/bitmessageqt/dialogs.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/bitmessageqt/about.ui b/src/bitmessageqt/about.ui index d09cbc4d..099875c0 100644 --- a/src/bitmessageqt/about.ui +++ b/src/bitmessageqt/about.ui @@ -39,7 +39,7 @@ - PyBitmessage + <html><head/><body><p><a href="https://github.com/Bitmessage/PyBitmessage/tree/:branch:"><span style="text-decoration:none; color:#0000ff;">PyBitmessage :version:</span></a></p></body></html> Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/src/bitmessageqt/dialogs.py b/src/bitmessageqt/dialogs.py index 5e0d9718..0fffd01a 100644 --- a/src/bitmessageqt/dialogs.py +++ b/src/bitmessageqt/dialogs.py @@ -114,11 +114,15 @@ class AboutDialog(QtGui.QDialog, RetranslateMixin): super(AboutDialog, self).__init__(parent) widgets.load('about.ui', self) commit = paths.lastCommit()[:7] - label = "PyBitmessage " + softwareVersion + version = softwareVersion if commit: - label += '-' + commit - self.labelVersion.setText(label) - QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) + version += '-' + commit + self.labelVersion.setText( + self.labelVersion.text().replace( + ':version:', version + ).replace(':branch:', commit or 'v%s' % version) + ) + self.labelVersion.setOpenExternalLinks(True) class IconGlossaryDialog(QtGui.QDialog, RetranslateMixin):