[GRASS-SVN] r54700 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jan 18 04:14:01 PST 2013
Author: martinl
Date: 2013-01-18 04:14:00 -0800 (Fri, 18 Jan 2013)
New Revision: 54700
Modified:
grass/trunk/gui/wxpython/gui_core/forms.py
Log:
wxGUI/forms: fix handling bin files & none colors
Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py 2013-01-18 12:06:49 UTC (rev 54699)
+++ grass/trunk/gui/wxpython/gui_core/forms.py 2013-01-18 12:14:00 UTC (rev 54700)
@@ -1129,7 +1129,6 @@
title_txt.SetLabel(title + ':')
# GIS element entry
if p.get('prompt','') not in ('color',
- 'color_none',
'subgroup',
'sigfile',
'dbdriver',
@@ -1365,15 +1364,14 @@
which_sizer.Add(item = win, proportion = 0,
flag = flags, border = 5)
# color entry
- elif prompt in ('color',
- 'color_none'):
+ elif prompt == 'color':
default_color = (200,200,200)
label_color = _("Select Color")
if p.get('default','') != '':
default_color, label_color = utils.color_resolve(p['default'])
if p.get('value','') != '' and p.get('value','') != 'none': # parameter previously set
default_color, label_color = utils.color_resolve(p['value'])
- if prompt == 'color_none':
+ if p.get('element', '') == 'color_none':
this_sizer = wx.BoxSizer(orient = wx.HORIZONTAL)
else:
this_sizer = which_sizer
@@ -1386,7 +1384,7 @@
# the selector proper and either a "transparent" button or None
p['wxId'] = [btn_colour.GetId(),]
btn_colour.Bind(csel.EVT_COLOURSELECT, self.OnColorChange)
- if prompt == 'color_none':
+ if p.get('element', '') == 'color_none':
none_check = wx.CheckBox(which_panel, wx.ID_ANY, _("Transparent"))
if p.get('value','') == "none":
none_check.SetValue(True)
@@ -1432,7 +1430,7 @@
# we have to target the button here
p['wxId'] = [ fbb.GetChildren()[1].GetId() ]
if p.get('age', 'new') == 'old' and \
- p.get('prompt', '') == 'file' and \
+ p.get('prompt', '') == 'file' and p.get('element', '') == 'file' and \
UserSettings.Get(group = 'cmd', key = 'interactiveInput', subkey = 'enabled'):
# widget for interactive input
ifbb = wx.TextCtrl(parent = which_panel, id = wx.ID_ANY,
More information about the grass-commit
mailing list