[GRASS-SVN] r54618 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jan 13 10:02:40 PST 2013


Author: martinl
Date: 2013-01-13 10:02:39 -0800 (Sun, 13 Jan 2013)
New Revision: 54618

Modified:
   grass/trunk/gui/wxpython/gui_core/dialogs.py
Log:
wxGUI: remove 'command dialog' btn from import/link dialogs


Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py	2013-01-13 18:02:05 UTC (rev 54617)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py	2013-01-13 18:02:39 UTC (rev 54618)
@@ -1670,10 +1670,6 @@
         self.btn_run.SetDefault()
         self.btn_run.Enable(False)
         self.btn_run.Bind(wx.EVT_BUTTON, self.OnRun)
-        # run command dialog
-        self.btn_cmd = wx.Button(parent = self.panel, id = wx.ID_ANY,
-                                 label = _("Command dialog"))
-        self.btn_cmd.Bind(wx.EVT_BUTTON, self.OnCmdDialog)
         
     def doLayout(self):
         """!Do layout"""
@@ -1715,10 +1711,6 @@
         #
         btnsizer = wx.BoxSizer(orient = wx.HORIZONTAL)
         
-        btnsizer.Add(item = self.btn_cmd, proportion = 0,
-                     flag = wx.RIGHT | wx.ALIGN_CENTER,
-                     border = 10)
-        
         btnsizer.Add(item = self.btn_close, proportion = 0,
                      flag = wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER,
                      border = 10)
@@ -1756,10 +1748,6 @@
         """!Import/Link data (each layes as separate vector map)"""
         pass
 
-    def OnCmdDialog(self, event):
-        """!Show command dialog"""
-        pass
-    
     def AddLayers(self, returncode, cmd = None):
         """!Add imported/linked layers into layer tree"""
         if not self.add.IsChecked() or returncode != 0:
@@ -1841,17 +1829,9 @@
         if link:
             self.btn_run.SetLabel(_("&Link"))
             self.btn_run.SetToolTipString(_("Link selected layers"))
-            if ogr:
-                self.btn_cmd.SetToolTipString(_('Open %s dialog') % 'v.external')
-            else:
-                self.btn_cmd.SetToolTipString(_('Open %s dialog') % 'r.external')
         else:
             self.btn_run.SetLabel(_("&Import"))
             self.btn_run.SetToolTipString(_("Import selected layers"))
-            if ogr:
-                self.btn_cmd.SetToolTipString(_('Open %s dialog') % 'v.in.ogr')
-            else:
-                self.btn_cmd.SetToolTipString(_('Open %s dialog') % 'r.in.gdal')
         
         self.doLayout()
 
@@ -1939,11 +1919,6 @@
                 return 'r.in.gdal'
         
         return ''
-    
-    def OnCmdDialog(self, event):
-        """!Show command dialog"""
-        name = self._getCommand()
-        GUI(parent = self, modal = False).ParseCommand(cmd = [name])
 
 class GdalOutputDialog(wx.Dialog):
     def __init__(self, parent, id = wx.ID_ANY, ogr = False,
@@ -1969,9 +1944,6 @@
         self.panel = wx.Panel(parent = self, id = wx.ID_ANY)
 
         # buttons
-        self.btnCmd = wx.Button(parent = self.panel, id = wx.ID_ANY,
-                                label = _("Command dialog"))
-        self.btnCmd.Bind(wx.EVT_BUTTON, self.OnCmdDialog)
         self.btnCancel = wx.Button(parent = self.panel, id = wx.ID_CANCEL)
         self.btnCancel.SetToolTipString(_("Close dialog"))
         self.btnOk = wx.Button(parent = self.panel, id = wx.ID_OK)
@@ -1995,9 +1967,6 @@
                         flag = wx.EXPAND)
 
         btnSizer = wx.BoxSizer(orient = wx.HORIZONTAL)
-        btnSizer.Add(item = self.btnCmd, proportion = 0,
-                     flag = wx.RIGHT | wx.ALIGN_CENTER,
-                     border = 10)
         btnSizer.Add(item = self.btnCancel, proportion = 0,
                      flag = wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER,
                      border = 10)
@@ -2018,9 +1987,6 @@
         self.SetSize((size.width, size.height))
         self.Layout()
         
-    def OnCmdDialog(self, event):
-        GUI(parent = self, modal = True).ParseCommand(cmd = ['v.external.out'])
-    
     def OnCancel(self, event):
         self.Destroy()
         
@@ -2121,11 +2087,7 @@
             self.btn_run.Enable(True)
         else:
             self.btn_run.Enable(False)
-
-    def OnCmdDialog(self, event):
-        """!Show command dialog"""
-        GUI(parent = self, modal = True).ParseCommand(cmd = ['v.in.dxf'])
-                
+             
 class LayersList(GListCtrl, listmix.TextEditMixin):
     """!List of layers to be imported (dxf, shp...)"""
     def __init__(self, parent, columns, log = None):



More information about the grass-commit mailing list