[GRASS-SVN] r59876 - grass/branches/releasebranch_7_0/gui/wxpython
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Apr 21 05:01:48 PDT 2014
Author: martinl
Date: 2014-04-21 05:01:48 -0700 (Mon, 21 Apr 2014)
New Revision: 59876
Modified:
grass/branches/releasebranch_7_0/gui/wxpython/gis_set.py
Log:
wxGUI: show revision number also in welcome screen
(merge r59850 + r59852 from trunk)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gis_set.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gis_set.py 2014-04-21 12:01:16 UTC (rev 59875)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gis_set.py 2014-04-21 12:01:48 UTC (rev 59876)
@@ -11,7 +11,7 @@
- gis_set::GListBox
- gis_set::StartUp
-(C) 2006-2013 by the GRASS Development Team
+(C) 2006-2014 by the GRASS Development Team
This program is free software under the GNU General Public License
(>=v2). Read the file COPYING that comes with GRASS for details.
@@ -93,9 +93,19 @@
# labels
### crashes when LOCATION doesn't exist
+ # get version & revision
versionFile = open(os.path.join(globalvar.ETCDIR, "VERSIONNUMBER"))
- grassVersion = versionFile.readline().split(' ')[0].rstrip('\n')
+ versionLine = versionFile.readline().rstrip('\n')
versionFile.close()
+ try:
+ grassVersion, grassRevision = versionLine.split(' ', 1)
+ if grassVersion.endswith('svn'):
+ grassRevisionStr = ' (%s)' % grassRevision
+ else:
+ grassRevisionStr = ''
+ except ValueError:
+ grassVersion = versionLine
+ grassRevisionStr = ''
self.select_box = wx.StaticBox (parent = self.panel, id = wx.ID_ANY,
label = " %s " % _("Choose project location and mapset"))
@@ -103,8 +113,8 @@
self.manage_box = wx.StaticBox (parent = self.panel, id = wx.ID_ANY,
label = " %s " % _("Manage"))
self.lwelcome = wx.StaticText(parent = self.panel, id = wx.ID_ANY,
- label = _("Welcome to GRASS GIS %s\n"
- "The world's leading open source GIS") % grassVersion,
+ label = _("Welcome to GRASS GIS %s%s\n"
+ "The world's leading open source GIS") % (grassVersion, grassRevisionStr),
style = wx.ALIGN_CENTRE)
self.ltitle = wx.StaticText(parent = self.panel, id = wx.ID_ANY,
label = _("Select an existing project location and mapset\n"
More information about the grass-commit
mailing list