[GRASS-SVN] r47982 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 30 12:52:20 EDT 2011
Author: martinl
Date: 2011-08-30 09:52:20 -0700 (Tue, 30 Aug 2011)
New Revision: 47982
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py
Log:
wxGUI/about: use grass.version()
(merge r47981 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py 2011-08-30 16:41:39 UTC (rev 47981)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py 2011-08-30 16:52:20 UTC (rev 47982)
@@ -35,6 +35,7 @@
import wx.lib.flatnotebook as FN
import wx.lib.scrolledpanel as scrolled
+import grass.script as grass
from grass.script import task as gtask
import menudata
@@ -487,9 +488,7 @@
self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
# get version and web site
- version, svn_gis_h_rev, svn_gis_h_date = gcmd.RunCommand('g.version',
- flags = 'r',
- read = True).splitlines()
+ vInfo = grass.version()
infoTxt = wx.Panel(parent = panel, id = wx.ID_ANY)
infoSizer = wx.BoxSizer(wx.VERTICAL)
@@ -504,30 +503,43 @@
flag = wx.ALL | wx.ALIGN_CENTER, border = 25)
info = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
- label = version.replace('GRASS', 'GRASS GIS').strip() + '\n\n')
+ label = 'GRASS GIS ' + vInfo['version'] + '\n\n')
info.SetFont(wx.Font(13, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
infoSizer.Add(item = info, proportion = 0,
flag = wx.BOTTOM | wx.ALIGN_CENTER, border = 15)
+ row = 0
infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
label = _('Official GRASS site:')),
- pos = (0, 0),
+ pos = (row, 0),
flag = wx.ALIGN_RIGHT)
infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
label = 'http://grass.osgeo.org'),
- pos = (0, 1),
+ pos = (row, 1),
flag = wx.ALIGN_LEFT)
+
+ row += 2
+ infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
+ label = _('SVN Revision:')),
+ pos = (row, 0),
+ flag = wx.ALIGN_RIGHT)
infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
+ label = vInfo['revision']),
+ pos = (row, 1),
+ flag = wx.ALIGN_LEFT)
+
+ row += 1
+ infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
label = _('GIS Library Revision:')),
- pos = (2, 0),
+ pos = (row, 0),
flag = wx.ALIGN_RIGHT)
infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
- label = svn_gis_h_rev.split(' ')[1] + ' (' +
- svn_gis_h_date.split(' ')[1] + ')'),
- pos = (2, 1),
+ label = vInfo['libgis_revision'] + ' (' +
+ vInfo['libgis_date'].split(' ')[0] + ')'),
+ pos = (row, 1),
flag = wx.ALIGN_LEFT)
infoSizer.Add(item = infoGridSizer,
More information about the grass-commit
mailing list