[GRASS-SVN] r42575 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jun 17 11:27:59 EDT 2010
Author: martinl
Date: 2010-06-17 15:27:59 +0000 (Thu, 17 Jun 2010)
New Revision: 42575
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI/dialog: generate interactive input area only for old_file
(merge r42574 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2010-06-17 15:13:22 UTC (rev 42574)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2010-06-17 15:27:59 UTC (rev 42575)
@@ -1451,27 +1451,29 @@
which_sizer.Add(item=fbb, proportion=0,
flag=wx.EXPAND | wx.RIGHT, border=5)
- # widget for interactive input
- ifbb = wx.TextCtrl(parent = which_panel, id = wx.ID_ANY,
- style = wx.TE_MULTILINE,
- size = (-1, 75))
- if p.get('value', '') and os.path.isfile(p['value']):
- f = open(p['value'])
- ifbb.SetValue(''.join(f.readlines()))
- f.close()
-
- ifbb.Bind(wx.EVT_TEXT, self.OnFileText)
- which_sizer.Add(item = wx.StaticText(parent = which_panel, id = wx.ID_ANY,
- label = _('or enter values interactively')),
- proportion=0,
- flag=wx.EXPAND | wx.RIGHT | wx.LEFT | wx.BOTTOM, border=5)
- which_sizer.Add(item=ifbb, proportion=0,
- flag=wx.EXPAND | wx.RIGHT | wx.LEFT, border=5)
-
# A file browse button is a combobox with two children:
# a textctl and a button;
# we have to target the button here
- p['wxId'] = [ fbb.GetChildren()[1].GetId(), ifbb.GetId() ]
+ p['wxId'] = [ fbb.GetChildren()[1].GetId() ]
+
+ if p.get('age', 'new_file') == 'old_file':
+ # widget for interactive input
+ ifbb = wx.TextCtrl(parent = which_panel, id = wx.ID_ANY,
+ style = wx.TE_MULTILINE,
+ size = (-1, 75))
+ if p.get('value', '') and os.path.isfile(p['value']):
+ f = open(p['value'])
+ ifbb.SetValue(''.join(f.readlines()))
+ f.close()
+
+ ifbb.Bind(wx.EVT_TEXT, self.OnFileText)
+ which_sizer.Add(item = wx.StaticText(parent = which_panel, id = wx.ID_ANY,
+ label = _('or enter values interactively')),
+ proportion=0,
+ flag=wx.EXPAND | wx.RIGHT | wx.LEFT | wx.BOTTOM, border=5)
+ which_sizer.Add(item=ifbb, proportion=0,
+ flag=wx.EXPAND | wx.RIGHT | wx.LEFT, border=5)
+ p['wxId'].append(ifbb.GetId())
if self.parent.GetName() == 'MainFrame' and self.parent.modeler:
parChk = wx.CheckBox(parent = which_panel, id = wx.ID_ANY,
More information about the grass-commit
mailing list