[GRASS-SVN] r39167 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Sep 13 03:44:43 EDT 2009
Author: martinl
Date: 2009-09-13 03:44:42 -0400 (Sun, 13 Sep 2009)
New Revision: 39167
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/georect.py
Log:
wxGUI: use Location/MapsetSelect widget
(merge r39166 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py 2009-09-13 07:42:40 UTC (rev 39166)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py 2009-09-13 07:44:42 UTC (rev 39167)
@@ -109,8 +109,8 @@
size = globalvar.DIALOG_GSELECT_SIZE)
self.element1 = gselect.MapsetSelect(parent = self.panel, id = wx.ID_ANY,
- size = globalvar.DIALOG_GSELECT_SIZE)
- self.element1.SetItems([])
+ size = globalvar.DIALOG_GSELECT_SIZE,
+ setItems = False)
self.PostInit()
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/georect.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/georect.py 2009-09-13 07:42:40 UTC (rev 39166)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/georect.py 2009-09-13 07:44:42 UTC (rev 39167)
@@ -294,22 +294,8 @@
self.xylocation = ''
self.xymapset = ''
-
- tmplist = os.listdir(self.grassdatabase)
- self.locList = []
- self.mapsetList = []
#
- # create a list of valid locations
- #
- for item in tmplist:
- if os.path.isdir(os.path.join(self.grassdatabase, item)) and \
- os.path.exists(os.path.join(self.grassdatabase, item, 'PERMANENT')):
- self.locList.append(item)
-
- utils.ListSortLower(self.locList)
-
- #
# layout
#
self.sizer.AddGrowableCol(2)
@@ -326,9 +312,7 @@
self.sizer.Add(item=wx.StaticText(parent=self, id=wx.ID_ANY, label=_('Select source location:')),
flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL, border=5,
pos=(2, 1))
- self.cb_location = wx.ComboBox(parent=self, id=wx.ID_ANY,
- choices = self.locList, size=(300, -1),
- style=wx.CB_DROPDOWN | wx.CB_READONLY)
+ self.cb_location = gselect.LocationSelect(parent = self, gisdbase = self.grassdatabase)
self.sizer.Add(item=self.cb_location,
flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL, border=5,
pos=(2, 2))
@@ -337,9 +321,8 @@
self.sizer.Add(item=wx.StaticText(parent=self, id=wx.ID_ANY, label=_('Select source mapset:')),
flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL, border=5,
pos=(3, 1))
- self.cb_mapset = wx.ComboBox(parent=self, id=wx.ID_ANY,
- choices = self.mapsetList, size=(300, -1),
- style=wx.CB_DROPDOWN | wx.CB_READONLY)
+ self.cb_mapset = gselect.MapsetSelect(parent = self, gisdbase = self.grassdatabase,
+ setItems = False)
self.sizer.Add(item=self.cb_mapset,
flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL, border=5,
pos=(3,2))
More information about the grass-commit
mailing list