[GRASS-SVN] r48897 - in grass/trunk/gui/wxpython: . gui_modules xml

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Oct 21 06:42:42 EDT 2011


Author: martinl
Date: 2011-10-21 03:42:42 -0700 (Fri, 21 Oct 2011)
New Revision: 48897

Modified:
   grass/trunk/gui/wxpython/gui_modules/gdialogs.py
   grass/trunk/gui/wxpython/wxgui.py
   grass/trunk/gui/wxpython/xml/menudata.xml
Log:
wxGUI: minor changes in gdialog.GroupDialog


Modified: grass/trunk/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2011-10-21 10:00:49 UTC (rev 48896)
+++ grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2011-10-21 10:42:42 UTC (rev 48897)
@@ -11,6 +11,7 @@
  - SavedRegion
  - DecorationDialog
  - TextLayerDialog 
+ - GroupDialog
  - MapLayersDialog
  - ImportDialog
  - GdalImportDialog
@@ -916,9 +917,7 @@
         
         # buttons
         btnApply = wx.Button(parent = self, id = wx.ID_APPLY)
-        btnClose = wx.Button(parent = self, id = wx.ID_CANCEL)
-        # workaround, problem to place ID_CLOSE 
-        btnClose.SetLabel(_("&Close"))
+        btnClose = wx.Button(parent = self, id = wx.ID_CLOSE)
         
         btnApply.SetToolTipString(_("Apply changes to selected group."))
         btnClose.SetToolTipString(_("Close dialog, changes are not applied."))
@@ -926,21 +925,21 @@
         btnApply.SetDefault()
         
         # sizers & do layout
-        btnSizer = wx.StdDialogButtonSizer()
-        btnSizer.AddButton(btnApply)
-        btnSizer.AddButton(btnClose)
-
-        btnSizer.Realize()
+        btnSizer = wx.BoxSizer(wx.HORIZONTAL)
+        btnSizer.Add(item = btnClose, proportion = 0,
+                     flag = wx.RIGHT | wx.ALIGN_RIGHT | wx.EXPAND, border = 5)
+        btnSizer.Add(item = btnApply, proportion = 0,
+                     flag = wx.LEFT, border = 5)
         
         mainSizer = wx.BoxSizer(wx.VERTICAL)
         mainSizer.Add(item = self.bodySizer, proportion = 1,
-                      flag = wx.EXPAND | wx.ALL, border = 10)
+                      flag = wx.EXPAND | wx.LEFT | wx.RIGHT, border = 10)
         mainSizer.Add(item = wx.StaticLine(parent = self, id = wx.ID_ANY,
                       style = wx.LI_HORIZONTAL), proportion = 0,
                       flag = wx.EXPAND | wx.LEFT | wx.RIGHT, border = 10) 
         
         mainSizer.Add(item = btnSizer, proportion = 0,
-                      flag = wx.EXPAND | wx.ALL | wx.ALIGN_CENTER, border = 10)
+                      flag = wx.ALL | wx.ALIGN_RIGHT, border = 10)
 
         self.SetSizer(mainSizer)
         mainSizer.Fit(self)
@@ -958,34 +957,33 @@
         bodySizer.Add(item = wx.StaticText(parent = self, id = wx.ID_ANY,
                                            label = _("Select the group you want to edit or "
                                                      "enter name of new group:")),
-                      flag = wx.ALIGN_CENTER_VERTICAL | wx.TOP, border = 5)
+                      flag = wx.ALIGN_CENTER_VERTICAL | wx.TOP, border = 10)
         self.groupSelect = gselect.Select(parent = self, type = 'group',
                                           mapsets = [grass.gisenv()['MAPSET']],
                                           size = globalvar.DIALOG_GSELECT_SIZE) # searchpath?
             
         bodySizer.Add(item = self.groupSelect, flag = wx.TOP | wx.EXPAND, border = 5)
         
-        bodySizer.AddSpacer(20)
+        bodySizer.AddSpacer(10)
         # layers in group
         bodySizer.Add(item = wx.StaticText(parent = self, label = _("Layers in selected group:")),
                       flag = wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM, border = 5)
         
         gridSizer = wx.GridBagSizer(vgap = 5, hgap = 5)
         gridSizer.AddGrowableCol(0)
-        gridSizer.AddGrowableRow(1)
         
         self.layerBox = wx.ListBox(parent = self,  id = wx.ID_ANY, size = (-1, 150),
                                    style = wx.LB_MULTIPLE | wx.LB_NEEDED_SB)
         
-        gridSizer.Add(item = self.layerBox, pos = (0,0), span = (4, 1), flag = wx.EXPAND)
+        gridSizer.Add(item = self.layerBox, pos = (0, 0), span = (2, 1), flag = wx.EXPAND)
         
-        self.addLayer = wx.Button(self, id = wx.ID_ANY, label = _("Add..."))
+        self.addLayer = wx.Button(self, id = wx.ID_ADD)
         self.addLayer.SetToolTipString(_("Select map layers and add them to the list."))
-        gridSizer.Add(item = self.addLayer, pos = (0,1))
+        gridSizer.Add(item = self.addLayer, pos = (0, 1))
         
-        self.removeLayer = wx.Button(self, id = wx.ID_ANY, label = _("Remove"))
+        self.removeLayer = wx.Button(self, id = wx.ID_REMOVE)
         self.removeLayer.SetToolTipString(_("Remove selected layer(s) from list."))
-        gridSizer.Add(item = self.removeLayer, pos = (1,1))
+        gridSizer.Add(item = self.removeLayer, pos = (1, 1))
         
         bodySizer.Add(item = gridSizer, proportion = 1, flag = wx.EXPAND)
         
@@ -993,7 +991,6 @@
         bodySizer.Add(item = self.infoLabel, 
                       flag = wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM, border = 5)
         
-        
         # bindings
         self.groupSelect.GetTextCtrl().Bind(wx.EVT_TEXT, self.OnGroupSelected)
         self.addLayer.Bind(wx.EVT_BUTTON, self.OnAddLayer)

Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2011-10-21 10:00:49 UTC (rev 48896)
+++ grass/trunk/gui/wxpython/wxgui.py	2011-10-21 10:42:42 UTC (rev 48897)
@@ -1091,7 +1091,7 @@
         ctable.CentreOnScreen()
         ctable.Show()
         
-    def OnEditImageryGroups(self, event):
+    def OnEditImageryGroups(self, event, cmd = None):
         """!Show dialog for creating and editing groups.
         """
         dlg = gdialogs.GroupDialog(self)

Modified: grass/trunk/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/menudata.xml	2011-10-21 10:00:49 UTC (rev 48896)
+++ grass/trunk/gui/wxpython/xml/menudata.xml	2011-10-21 10:42:42 UTC (rev 48897)
@@ -787,7 +787,7 @@
 	    <menuitem>
 	      <label>User access</label>
 	      <help>Controls access to the current mapset for other users on the system.</help>
-	      <keywords>general,map management</keywords>
+	      <keywords>general,map management,permission</keywords>
               <handler>OnMenuCmd</handler>
 	      <command>g.access</command>
 	    </menuitem>
@@ -1832,7 +1832,7 @@
 	    </menuitem>
 	    <menuitem>
 	      <label>Sum area by raster map and category</label>
-	      <help>Reports statistics for raster map layers.</help>
+	      <help>Reports statistics for raster maps.</help>
 	      <keywords>raster,statistics</keywords>
 	      <handler>OnMenuCmd</handler>
 	      <command>r.report</command>
@@ -1846,8 +1846,8 @@
 	    </menuitem>
 	    <menuitem>
 	      <label>Total corrected area</label>
-	      <help>Surface area estimation for rasters.</help>
-	      <keywords>raster,surface,statistics</keywords>
+	      <help>Prints estimation of surface area for raster map.</help>
+	      <keywords>raster,surface,statistics,area estimation</keywords>
 	      <handler>OnMenuCmd</handler>
 	      <command>r.surf.area</command>
 	    </menuitem>
@@ -2537,6 +2537,7 @@
 	      <help>Creates, edits, and lists groups of imagery files.</help>
 	      <keywords>imagery,map management</keywords>
 	      <handler>OnEditImageryGroups</handler>
+	      <command>i.group</command>
 	    </menuitem>
 	    <menuitem>
 	      <label>Target group</label>
@@ -3082,8 +3083,8 @@
 	    <separator />
 	    <menuitem>
 	      <label>Drop table</label>
-	      <help>Removes a table from database.</help>
-	      <keywords>database,SQL</keywords>
+	      <help>Drops an attribute table.</help>
+	      <keywords>database,attribute table</keywords>
 	      <handler>OnMenuCmd</handler>
 	      <command>db.droptable</command>
 	    </menuitem>



More information about the grass-commit mailing list