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>
</property>
<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 name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

View File

@ -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):