[GRASS-SVN] r46394 - in grass/branches/develbranch_6/gui:
icons/grass2 wxpython wxpython/gui_modules wxpython/icons
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 23 12:37:12 EDT 2011
Author: martinl
Date: 2011-05-23 09:37:12 -0700 (Mon, 23 May 2011)
New Revision: 46394
Added:
grass/branches/develbranch_6/gui/icons/grass2/calculator.png
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
grass/branches/develbranch_6/gui/wxpython/icons/icon.py
grass/branches/develbranch_6/gui/wxpython/wxgui.py
Log:
wxGUI: add new icon for raster map calculator
(merge r46392 from trunk)
Copied: grass/branches/develbranch_6/gui/icons/grass2/calculator.png (from rev 46392, grass/trunk/gui/icons/grass/calculator.png)
===================================================================
(Binary files differ)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py 2011-05-23 16:34:15 UTC (rev 46393)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py 2011-05-23 16:37:12 UTC (rev 46394)
@@ -6,7 +6,7 @@
Classes:
- MapCalcFrame
-(C) 2008, 2010 by the GRASS Development Team
+(C) 2008, 2011 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/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py 2011-05-23 16:34:15 UTC (rev 46393)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py 2011-05-23 16:37:12 UTC (rev 46394)
@@ -1647,9 +1647,12 @@
self.modeler = wx.NewId()
self.vdigit = wx.NewId()
self.mapOutput = wx.NewId()
+ self.mapCalc = wx.NewId()
icons = Icons['layerManager']
- return self._getToolbarData(((self.vdigit, 'vdigit', icons["vdigit"],
+ return self._getToolbarData(((self.mapCalc, 'mapCalc', icons["mapcalc"],
+ self.parent.OnMapCalculator),
+ (self.vdigit, 'vdigit', icons["vdigit"],
self.parent.OnVDigit),
(self.georect, 'georectify', Icons["georectify"]["georectify"],
self.parent.OnGCPManager),
Modified: grass/branches/develbranch_6/gui/wxpython/icons/icon.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/icon.py 2011-05-23 16:34:15 UTC (rev 46393)
+++ grass/branches/develbranch_6/gui/wxpython/icons/icon.py 2011-05-23 16:37:12 UTC (rev 46394)
@@ -267,8 +267,10 @@
label = _('Graphical Modeler')),
'layerOptions' : MetaIcon(img = iconSet.get('options', wx.ART_ERROR),
label = _('Set options')),
- 'mapOutput' : MetaIcon(img = iconSet.get('print-compose', wx.ART_ERROR),
- label = _('Hardcopy Map Ouput Utility')),
+ 'mapOutput' : MetaIcon(img = iconSet.get('print-compose', wx.ART_ERROR),
+ label = _('Hardcopy Map Ouput Utility')),
+ 'mapcalc' : MetaIcon(img = iconSet.get('calculator', wx.ART_ERROR),
+ label = _('Raster Map Calculator')),
},
'vdigit' : {
'addPoint' : MetaIcon(img = iconSet.get('point-create', wx.ART_ERROR),
Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py 2011-05-23 16:34:15 UTC (rev 46393)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py 2011-05-23 16:37:12 UTC (rev 46394)
@@ -1098,8 +1098,11 @@
"""!Init map calculator for interactive creation of mapcalc statements
"""
if event:
- cmd = self.GetMenuCmd(event)
-
+ try:
+ cmd = self.GetMenuCmd(event)
+ except KeyError:
+ cmd = ['r.mapcalc']
+
win = mapcalculator.MapCalcFrame(parent = self,
cmd = cmd[0])
win.CentreOnScreen()
More information about the grass-commit
mailing list