diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-10-24 00:10:31 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-10-24 00:10:31 +0200 |
commit | b243b009bb094c06ca9d60e81cf4700e48dc2947 (patch) | |
tree | 70413ee919d642770eb6275158a25f605f3a2d08 /portato | |
parent | c9190e0f9e1969607be5ddf2c59cd2d75b12bdc0 (diff) | |
download | portato-b243b009bb094c06ca9d60e81cf4700e48dc2947.tar.gz portato-b243b009bb094c06ca9d60e81cf4700e48dc2947.tar.bz2 portato-b243b009bb094c06ca9d60e81cf4700e48dc2947.zip |
Adding revison info to version output.
As the revision is no longer encoded in the version, it needs to be
printed whereever it is useful. This commit adds it to the 'About'
window and to the exception infos.
Diffstat (limited to '')
-rw-r--r-- | portato/gui/exception_handling.py | 5 | ||||
-rw-r--r-- | portato/gui/templates/AboutWindow.ui | 33 | ||||
-rw-r--r-- | portato/gui/windows/about.py | 8 |
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ürkan 'seqizz' Gü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"><b>Git revision:</b></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() |