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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 27 02:45:14 PDT 2012


Author: martinl
Date: 2012-05-27 02:45:13 -0700 (Sun, 27 May 2012)
New Revision: 51812

Modified:
   grass/trunk/gui/wxpython/gui_core/goutput.py
Log:
wxGUI: hide protocol button in module dialog


Modified: grass/trunk/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/goutput.py	2012-05-27 09:44:15 UTC (rev 51811)
+++ grass/trunk/gui/wxpython/gui_core/goutput.py	2012-05-27 09:45:13 UTC (rev 51812)
@@ -260,8 +260,6 @@
         self.btnOutputClear.SetToolTipString(_("Clear output window content"))
         self.btnCmdClear = wx.Button(parent = self.panelOutput, id = wx.ID_CLEAR)
         self.btnCmdClear.SetToolTipString(_("Clear command prompt content"))
-        if self.parent.GetName() != 'LayerManager':
-            self.btnCmdClear.Hide()
         self.btnOutputSave  = wx.Button(parent = self.panelOutput, id = wx.ID_SAVE)
         self.btnOutputSave.SetToolTipString(_("Save output window content to the file"))
         self.btnCmdAbort = wx.Button(parent = self.panelOutput, id = wx.ID_STOP)
@@ -272,6 +270,10 @@
         self.btnCmdProtocol.SetToolTipString(_("Toggle to save list of executed commands into file; "
                                                "content saved when switching off."))
         
+        if self.parent.GetName() != 'LayerManager':
+            self.btnCmdClear.Hide()
+            self.btnCmdProtocol.Hide()
+        
         self.btnCmdClear.Bind(wx.EVT_BUTTON,     self.cmdPrompt.OnCmdErase)
         self.btnOutputClear.Bind(wx.EVT_BUTTON,  self.OnOutputClear)
         self.btnOutputSave.Bind(wx.EVT_BUTTON,   self.OnOutputSave)
@@ -312,9 +314,14 @@
         cmdBtnSizer.Add(item = self.btnCmdAbort, proportion = 1,
                         flag = wx.ALIGN_CENTER | wx.RIGHT, border = 5)
         
-        btnSizer.Add(item = outBtnSizer, proportion = 2,
+        if self.parent.GetName() != 'LayerManager':
+            proportion = (1, 1)
+        else:
+            proportion = (2, 3)
+        
+        btnSizer.Add(item = outBtnSizer, proportion = proportion[0],
                      flag = wx.ALL | wx.ALIGN_CENTER, border = 5)
-        btnSizer.Add(item = cmdBtnSizer, proportion = 3,
+        btnSizer.Add(item = cmdBtnSizer, proportion = proportion[1],
                      flag = wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM | wx.RIGHT, border = 5)
         outputSizer.Add(item = btnSizer, proportion = 0,
                         flag = wx.EXPAND)



More information about the grass-commit mailing list