[GRASS-SVN] r33955 - in grass/trunk: gui/wxpython/gui_modules
raster/r.stats
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Oct 21 16:57:58 EDT 2008
Author: martinl
Date: 2008-10-21 16:57:57 -0400 (Tue, 21 Oct 2008)
New Revision: 33955
Modified:
grass/trunk/gui/wxpython/gui_modules/gdialogs.py
grass/trunk/gui/wxpython/gui_modules/menuform.py
grass/trunk/raster/r.stats/main.c
Log:
wxGUI: use description instead of value for checkbox
r.report: suppress "r.stats complete"
(merge from devbr6, r33954)
Modified: grass/trunk/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gdialogs.py 2008-10-21 20:55:09 UTC (rev 33954)
+++ grass/trunk/gui/wxpython/gui_modules/gdialogs.py 2008-10-21 20:57:57 UTC (rev 33955)
@@ -753,7 +753,8 @@
list.append(layer)
self.layers.Set(list)
-
+ self.OnSelectAll(None)
+
event.Skip()
def GetMapLayers(self):
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2008-10-21 20:55:09 UTC (rev 33954)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2008-10-21 20:57:57 UTC (rev 33955)
@@ -1006,7 +1006,8 @@
p['value'] = p.get('default','')
if ( len(p.get('values', []) ) > 0):
- valuelist=map( str, p.get('values',[]) )
+ valuelist = map(str, p.get('values',[]))
+ valuelist_desc = map(str, p.get('values_desc',[]))
if p.get('multiple', 'no') == 'yes' and \
p.get('gisprompt',False) == False and \
@@ -1027,14 +1028,23 @@
# for multi checkboxes, this is an array of all wx IDs
# for each individual checkbox
p[ 'wxId' ] = []
+ idx = 0
for val in valuelist:
- chkbox = wx.CheckBox( parent=which_panel, label = text_beautify(val) )
+ try:
+ label = valuelist_desc[idx]
+ except IndexError:
+ label = val
+
+ chkbox = wx.CheckBox( parent=which_panel, label = text_beautify(label) )
p[ 'wxId' ].append( chkbox.GetId() )
if isEnabled.has_key(val):
chkbox.SetValue( True )
hSizer.Add( item=chkbox, proportion=0,
flag=wx.ADJUST_MINSIZE | wx.ALL, border=1 )
chkbox.Bind(wx.EVT_CHECKBOX, self.OnCheckBoxMulti)
+
+ idx += 1
+
which_sizer.Add( item=hSizer, proportion=0,
flag=wx.EXPAND | wx.TOP | wx.RIGHT | wx.LEFT, border=5 )
elif p.get('gisprompt',False) == False:
Modified: grass/trunk/raster/r.stats/main.c
===================================================================
--- grass/trunk/raster/r.stats/main.c 2008-10-21 20:55:09 UTC (rev 33954)
+++ grass/trunk/raster/r.stats/main.c 2008-10-21 20:57:57 UTC (rev 33955)
@@ -337,7 +337,5 @@
cell_stats(fd, with_percents, with_counts, with_areas, with_labels,
fmt);
- G_done_msg(" ");
-
exit(EXIT_SUCCESS);
}
More information about the grass-commit
mailing list