[GRASS-SVN] r46392 - in grass/trunk/gui: icons/grass wxpython
wxpython/gui_modules wxpython/icons
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 23 12:30:02 EDT 2011
Author: martinl
Date: 2011-05-23 09:30:02 -0700 (Mon, 23 May 2011)
New Revision: 46392
Added:
grass/trunk/gui/icons/grass/calculator.png
Modified:
grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py
grass/trunk/gui/wxpython/gui_modules/toolbars.py
grass/trunk/gui/wxpython/icons/icon.py
grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: add new icon for raster map calculator
Added: grass/trunk/gui/icons/grass/calculator.png
===================================================================
(Binary files differ)
Property changes on: grass/trunk/gui/icons/grass/calculator.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Modified: grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py 2011-05-23 16:29:32 UTC (rev 46391)
+++ grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py 2011-05-23 16:30:02 UTC (rev 46392)
@@ -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/trunk/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/toolbars.py 2011-05-23 16:29:32 UTC (rev 46391)
+++ grass/trunk/gui/wxpython/gui_modules/toolbars.py 2011-05-23 16:30:02 UTC (rev 46392)
@@ -1638,9 +1638,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/trunk/gui/wxpython/icons/icon.py
===================================================================
--- grass/trunk/gui/wxpython/icons/icon.py 2011-05-23 16:29:32 UTC (rev 46391)
+++ grass/trunk/gui/wxpython/icons/icon.py 2011-05-23 16:30:02 UTC (rev 46392)
@@ -234,8 +234,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/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2011-05-23 16:29:32 UTC (rev 46391)
+++ grass/trunk/gui/wxpython/wxgui.py 2011-05-23 16:30:02 UTC (rev 46392)
@@ -1039,8 +1039,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