summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--portato/gui/exception_handling.py5
-rw-r--r--portato/gui/templates/AboutWindow.ui33
-rw-r--r--portato/gui/windows/about.py8
3 files changed, 44 insertions, 2 deletions
diff --git a/portato/gui/exception_handling.py b/portato/gui/exception_handling.py
index c973e6b..0ec1e9a 100644
--- a/portato/gui/exception_handling.py
+++ b/portato/gui/exception_handling.py
@@ -97,10 +97,13 @@ def convert (version):
return ".".join(map(str, version))
def get_version_infos():
- from ..constants import VERSION
+ from ..constants import VERSION, REVISION
from ..backend import system
from ..db import _TYPE as db_type
+ if REVISION:
+ VERSION = "%s (git: %s)" % (VERSION, REVISION)
+
return "\n".join((
"Portato version: %s" % VERSION,
"System: %s" % " ".join(get_runsystem()),
diff --git a/portato/gui/templates/AboutWindow.ui b/portato/gui/templates/AboutWindow.ui
index ce612b3..ec3ed7e 100644
--- a/portato/gui/templates/AboutWindow.ui
+++ b/portato/gui/templates/AboutWindow.ui
@@ -40,6 +40,39 @@ Turkish - G&#xFC;rkan 'seqizz' G&#xFC;r</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
+ <object class="GtkHBox" id="gitHB">
+ <property name="visible">True</property>
+ <property name="no_show_all">True</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label">&lt;b&gt;Git revision:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="gitLabel">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label">label</property>
+ <property name="use_markup">True</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
<placeholder/>
</child>
<child internal-child="action_area">
diff --git a/portato/gui/windows/about.py b/portato/gui/windows/about.py
index 937ed8b..6c6fec5 100644
--- a/portato/gui/windows/about.py
+++ b/portato/gui/windows/about.py
@@ -15,7 +15,7 @@ from __future__ import absolute_import
import gtk
from .basic import AbstractDialog
-from ...constants import VERSION, APP_ICON
+from ...constants import VERSION, REVISION, APP_ICON
class AboutWindow (AbstractDialog):
"""A window showing the "about"-informations."""
@@ -30,5 +30,11 @@ class AboutWindow (AbstractDialog):
self.window.set_version(VERSION)
self.window.set_logo(img.get_pixbuf())
+ if REVISION:
+ gitlabel = self.tree.get_widget("gitLabel")
+ gitlabel.set_label(REVISION)
+ else:
+ self.tree.get_widget("gitHB").hide()
+
self.window.show_all()