[GRASS-SVN] r59212 - in grass/trunk/gui/wxpython: lmgr mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 8 05:41:51 PST 2014


Author: martinl
Date: 2014-03-08 05:41:51 -0800 (Sat, 08 Mar 2014)
New Revision: 59212

Modified:
   grass/trunk/gui/wxpython/lmgr/frame.py
   grass/trunk/gui/wxpython/lmgr/layertree.py
   grass/trunk/gui/wxpython/mapdisp/frame.py
   grass/trunk/gui/wxpython/mapdisp/main.py
Log:
wxGUI: show GRASS version in lmgr and mapdisp frame title


Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2014-03-08 10:43:10 UTC (rev 59211)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2014-03-08 13:41:51 UTC (rev 59212)
@@ -8,7 +8,7 @@
 Classes:
  - frame::GMFrame
 
-(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.
@@ -82,11 +82,14 @@
     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)
 
         self.displayIndex    = 0          # index value for map displays and layer trees
@@ -1379,9 +1382,10 @@
             name = dlg.GetValue()
             self.notebookLayers.SetPageText(page = self.currentPageNum, text = name)
             mapdisplay = self.GetMapDisplay()
-            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 OnRasterRules(self, event):

Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py	2014-03-08 10:43:10 UTC (rev 59211)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py	2014-03-08 13:41:51 UTC (rev 59212)
@@ -176,8 +176,9 @@
                                    Map = self.Map)
         
         # title
-        self.mapdisplay.SetTitle(_("GRASS GIS Map Display: %(id)d  - Location: %(loc)s") % \
-                                     { 'id' : self.displayIndex + 1,
+        self.mapdisplay.SetTitle(_("GRASS GIS %(version)s Map Display: %(id)d  - Location: %(loc)s") % \
+                                     { 'version' : grass.version()['version'],
+                                       'id' : self.displayIndex + 1,
                                        'loc' : grass.gisenv()["LOCATION_NAME"] })
         
         # show new display

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2014-03-08 10:43:10 UTC (rev 59211)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2014-03-08 13:41:51 UTC (rev 59212)
@@ -9,7 +9,7 @@
 Classes:
  - mapdisp::MapFrame
 
-(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.

Modified: grass/trunk/gui/wxpython/mapdisp/main.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/main.py	2014-03-08 10:43:10 UTC (rev 59211)
+++ grass/trunk/gui/wxpython/mapdisp/main.py	2014-03-08 13:41:51 UTC (rev 59212)
@@ -14,7 +14,7 @@
 Usage:
 python mapdisp/main.py monitor-identifier /path/to/map/file /path/to/command/file /path/to/env/file
 
-(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.
@@ -57,9 +57,6 @@
 monName = None
 monSize = list(globalvar.MAP_WINDOW_SIZE)
 
-
-
-
 class DMonMap(Map):
     def __init__(self, giface, cmdfile=None, mapfile=None):
         """!Map composition (stack of map layers and overlays)
@@ -448,9 +445,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