[GRASS-SVN] r33954 - in grass/branches/develbranch_6:
gui/wxpython/gui_modules raster/r.stats
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Oct 21 16:55:10 EDT 2008
Author: martinl
Date: 2008-10-21 16:55:09 -0400 (Tue, 21 Oct 2008)
New Revision: 33954
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
grass/branches/develbranch_6/raster/r.stats/main.c
Log:
wxGUI: use description instead of value for checkbox
r.report: suppress "r.stats complete"
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2008-10-21 19:00:37 UTC (rev 33953)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2008-10-21 20:55:09 UTC (rev 33954)
@@ -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/branches/develbranch_6/raster/r.stats/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.stats/main.c 2008-10-21 19:00:37 UTC (rev 33953)
+++ grass/branches/develbranch_6/raster/r.stats/main.c 2008-10-21 20:55:09 UTC (rev 33954)
@@ -345,7 +345,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