commands: Add logging to the commit and staging commands
[git-cola.git] / cola / views / about.py
blobd6b51634c9709e8876bb43db2c2b2eda83ce5355
1 from PyQt4 import QtGui
3 from cola import version
4 from cola.gui.about import Ui_about
6 def launch_about_dialog():
7 """Launches the Help -> About dialog"""
8 app = QtGui.QApplication.instance()
9 view = AboutView(app.activeWindow())
10 style = app.styleSheet()
11 if style:
12 view.setStyleSheet(style)
13 view.show()
14 view.set_version(version.version())
17 class AboutView(Ui_about, QtGui.QDialog):
18 """A custom dialog for displaying git-cola information
19 """
20 def __init__(self, parent):
21 QtGui.QDialog.__init__(self, parent)
22 Ui_about.__init__(self)
23 self.setupUi(self)
25 def set_version(self, version):
26 """Sets the version field in the 'about' dialog"""
27 self.spam.setText(self.spam.text().replace('$VERSION', version))