[GRASS-SVN] r58427 - in grass/trunk/gui/wxpython: gui_core iclass
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 9 04:26:51 PST 2013
Author: martinl
Date: 2013-12-09 04:26:50 -0800 (Mon, 09 Dec 2013)
New Revision: 58427
Modified:
grass/trunk/gui/wxpython/gui_core/dialogs.py
grass/trunk/gui/wxpython/iclass/dialogs.py
Log:
wxGUI/iclass: clean-up IClassGroupDialog layout
Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py 2013-12-09 12:00:10 UTC (rev 58426)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py 2013-12-09 12:26:50 UTC (rev 58427)
@@ -70,6 +70,7 @@
self.btnCancel = wx.Button(parent = self.panel, id = wx.ID_CANCEL)
self.btnOK = wx.Button(parent = self.panel, id = wx.ID_OK)
self.btnOK.SetDefault()
+
self.__layout()
self.warning = _("Required item is not set.")
@@ -91,7 +92,7 @@
# self.sizer.Add(item = self.informLabel, proportion = 0, flag = wx.ALL, border = 5)
self.sizer.Add(item = btnSizer, proportion = 0,
- flag = wx.EXPAND | wx.ALL | wx.ALIGN_CENTER, border = 5)
+ flag = wx.EXPAND | wx.ALL, border = 5)
def ValidatorCallback(self, win):
GMessage(parent = self, message = self.warning)
Modified: grass/trunk/gui/wxpython/iclass/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/dialogs.py 2013-12-09 12:00:10 UTC (rev 58426)
+++ grass/trunk/gui/wxpython/iclass/dialogs.py 2013-12-09 12:26:50 UTC (rev 58427)
@@ -56,11 +56,10 @@
size = globalvar.DIALOG_GSELECT_SIZE,
validator = SimpleValidator(callback = self.ValidatorCallback))
- self.subg_panel = wx.Panel(self.panel)
# TODO use when subgroup will be optional
#self.subg_chbox = wx.CheckBox(parent = self.panel, id = wx.ID_ANY,
# label = _("Use subgroup"))
- self.subGroupSelect = gselect.SubGroupSelect(parent = self.subg_panel)
+ self.subGroupSelect = gselect.SubGroupSelect(parent = self.panel)
self.groupSelect.SetFocus()
if group:
@@ -82,8 +81,6 @@
def _layout(self):
"""!Do layout"""
- mainSizer = wx.BoxSizer(wx.VERTICAL)
-
self.dataSizer.Add(wx.StaticText(self.panel, id = wx.ID_ANY,
label = _("Name of imagery group:")),
proportion = 0,
@@ -96,27 +93,17 @@
#self.dataSizer.Add(self.subg_chbox, proportion = 0,
# flag = wx.EXPAND | wx.TOP | wx.LEFT | wx.RIGHT, border = 5)
- subg_sizer = wx.BoxSizer(wx.VERTICAL)
- subg_sizer.Add(wx.StaticText(self.subg_panel, id = wx.ID_ANY,
- label = _("Name of imagery subgroup:")),
- proportion = 0, flag = wx.EXPAND | wx.BOTTOM,
- border = 5)
- subg_sizer.Add(self.subGroupSelect, proportion = 0,
- flag = wx.EXPAND)
+ self.dataSizer.Add(wx.StaticText(self.panel, id = wx.ID_ANY,
+ label = _("Name of imagery subgroup:")),
+ proportion = 0, flag = wx.EXPAND | wx.EXPAND | wx.BOTTOM | wx.LEFT | wx.RIGHT,
+ border = 5)
+ self.dataSizer.Add(self.subGroupSelect, proportion = 0,
+ flag = wx.EXPAND | wx.ALL, border = 5)
- self.subg_panel.SetSizer(subg_sizer)
- self.dataSizer.Add(self.subg_panel, proportion = 0,
- flag = wx.EXPAND | wx.LEFT | wx.RIGHT, border = 5)
-
self.dataSizer.Add(self.editGroup, proportion = 0,
flag = wx.ALL, border = 5)
self.panel.SetSizer(self.sizer)
-
- mainSizer.Add(self.panel, proportion = 1,
- flag = wx.ALL, border = 5)
-
- self.SetSizer(mainSizer)
self.sizer.Fit(self)
#TODO use when subgroup will be optional
More information about the grass-commit
mailing list