[GRASS-SVN] r59239 - in grass/branches/releasebranch_6_4/gui/wxpython: lmgr mapdisp
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Mar 12 15:21:54 PDT 2014
Author: neteler
Date: 2014-03-12 15:21:54 -0700 (Wed, 12 Mar 2014)
New Revision: 59239
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/lmgr/frame.py
grass/branches/releasebranch_6_4/gui/wxpython/lmgr/layertree.py
grass/branches/releasebranch_6_4/gui/wxpython/mapdisp/main.py
Log:
wxGUI: show GRASS version in lmgr and mapdisp frame title (backport of r59212)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/lmgr/frame.py 2014-03-12 22:21:34 UTC (rev 59238)
+++ grass/branches/releasebranch_6_4/gui/wxpython/lmgr/frame.py 2014-03-12 22:21:54 UTC (rev 59239)
@@ -7,7 +7,7 @@
Classes:
- frame::GMFrame
-(C) 2006-2012 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.
@@ -73,16 +73,18 @@
GIS. Includes command console page for typing GRASS (and other)
commands, tree widget page for managing map layers.
"""
- def __init__(self, parent, id = wx.ID_ANY, title = _("GRASS GIS Layer Manager"),
+ def __init__(self, parent, id = wx.ID_ANY, title = None,
workspace = None,
size = globalvar.GM_WINDOW_SIZE, style = wx.DEFAULT_FRAME_STYLE, **kwargs):
self.parent = parent
- self.baseTitle = title
+ if title:
+ self.baseTitle = title
+ else:
+ self.baseTitle = _("GRASS GIS %s Layer Manager") % grass.version()['version']
self.iconsize = (16, 16)
wx.Frame.__init__(self, parent = parent, id = id, size = size,
style = style, **kwargs)
-
self.SetTitle(self.baseTitle)
self.SetName("LayerManager")
@@ -399,7 +401,7 @@
win.Show()
def OnDone(self, cmd, returncode):
- """Command execution finised"""
+ """Command execution finished"""
if hasattr(self, "model"):
self.model.DeleteIntermediateData(log = self.goutput)
del self.model
@@ -1164,9 +1166,10 @@
name = dlg.GetValue()
self.gm_cb.SetPageText(page = self.curr_pagenum, text = name)
mapdisplay = self.curr_page.maptree.mapdisplay
- mapdisplay.SetTitle(_("GRASS GIS Map Display: %(name)s - Location: %(loc)s") % \
- { 'name' : name,
- 'loc' : grass.gisenv()["LOCATION_NAME"] })
+ mapdisplay.SetTitle(_("GRASS GIS %(version) Map Display: %(name)s - Location: %(loc)s") % \
+ { 'version' : grass.version()['version'],
+ 'name' : name,
+ 'loc' : grass.gisenv()["LOCATION_NAME"] })
dlg.Destroy()
def RulesCmd(self, event):
Modified: grass/branches/releasebranch_6_4/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/lmgr/layertree.py 2014-03-12 22:21:34 UTC (rev 59238)
+++ grass/branches/releasebranch_6_4/gui/wxpython/lmgr/layertree.py 2014-03-12 22:21:54 UTC (rev 59239)
@@ -6,7 +6,7 @@
Classes:
- layertree::LayerTree
-(C) 2007-2011 by the GRASS Development Team
+(C) 2007-2013 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.
@@ -158,8 +158,9 @@
Map = self.Map, auimgr = self.auimgr)
# title
- self.mapdisplay.SetTitle(_("GRASS GIS Map Display: %(id)d - Location: %(loc)s") % \
- { 'id' : self.disp_idx + 1,
+ self.mapdisplay.SetTitle(_("GRASS GIS %(version)s Map Display: %(id)d - Location: %(loc)s") % \
+ { 'version' : grass.version()['version'],
+ 'id' : self.disp_idx + 1,
'loc' : grass.gisenv()["LOCATION_NAME"] })
# show new display
Modified: grass/branches/releasebranch_6_4/gui/wxpython/mapdisp/main.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/mapdisp/main.py 2014-03-12 22:21:34 UTC (rev 59238)
+++ grass/branches/releasebranch_6_4/gui/wxpython/mapdisp/main.py 2014-03-12 22:21:54 UTC (rev 59239)
@@ -9,7 +9,7 @@
Usage:
python mapdisp/main.py monitor-identifier /path/to/map/file /path/to/command/file /path/to/env/file
-(C) 2006-2011 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.
@@ -121,9 +121,10 @@
gmMap = MapApp(0)
# set title
- gmMap.mapFrm.SetTitle(_("GRASS GIS Map Display: " +
- monName +
- " - Location: " + grass.gisenv()["LOCATION_NAME"]))
+ gmMap.mapFrm.SetTitle(_("GRASS GIS %(version)s Map Display: %(name)s - Location: %(location)s") % \
+ { 'version' : grass.version()['version'],
+ 'name' : monName,
+ 'location' : grass.gisenv()["LOCATION_NAME"] })
gmMap.MainLoop()
More information about the grass-commit
mailing list