Added link to github into labelVersion in AboutDialog

This commit is contained in:
Dmitri Bogomolov 2017-10-18 18:42:59 +03:00
parent 62a930c374
commit f3808212b5
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
2 changed files with 9 additions and 5 deletions

View File

@ -39,7 +39,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string notr="true">PyBitmessage</string> <string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/Bitmessage/PyBitmessage/tree/:branch:&quot;&gt;&lt;span style=&quot;text-decoration:none; color:#0000ff;&quot;&gt;PyBitmessage :version:&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

View File

@ -114,11 +114,15 @@ class AboutDialog(QtGui.QDialog, RetranslateMixin):
super(AboutDialog, self).__init__(parent) super(AboutDialog, self).__init__(parent)
widgets.load('about.ui', self) widgets.load('about.ui', self)
commit = paths.lastCommit()[:7] commit = paths.lastCommit()[:7]
label = "PyBitmessage " + softwareVersion version = softwareVersion
if commit: if commit:
label += '-' + commit version += '-' + commit
self.labelVersion.setText(label) self.labelVersion.setText(
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) self.labelVersion.text().replace(
':version:', version
).replace(':branch:', commit or 'v%s' % version)
)
self.labelVersion.setOpenExternalLinks(True)
class IconGlossaryDialog(QtGui.QDialog, RetranslateMixin): class IconGlossaryDialog(QtGui.QDialog, RetranslateMixin):