[GRASS-SVN] r39959 - in grass/trunk/gui/wxpython: . docs

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 10 04:17:26 EST 2009


Author: martinl
Date: 2009-12-10 04:17:26 -0500 (Thu, 10 Dec 2009)
New Revision: 39959

Modified:
   grass/trunk/gui/wxpython/docs/wxGUI.html
   grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: Ctrl+Tab to switch tabs
       (merge r39958 from devbr6)


Modified: grass/trunk/gui/wxpython/docs/wxGUI.html
===================================================================
--- grass/trunk/gui/wxpython/docs/wxGUI.html	2009-12-10 09:12:48 UTC (rev 39958)
+++ grass/trunk/gui/wxpython/docs/wxGUI.html	2009-12-10 09:17:26 UTC (rev 39959)
@@ -272,6 +272,8 @@
 
 <b>Global</b>
 <dl>
+  <dt>Ctrl+Tab</dt>
+  <dd>Switch 'Map layers' and 'Command output' tab</dd>
   <dt>Alt+R</dt>
   <dd>Add raster map layer</dd>
   <dt>Alt+V</dt>
@@ -517,7 +519,7 @@
 
 <h2>AUTHORS</h2>
 
-Martin Landa, FBK-irst, Trento, Italy<br>
+Martin Landa, FBK-irst, Trento, Italy, and CTU in Prague, Czech Republic<br>
 Michael Barton, Arizona State University, USA<br>
 Daniel Calvelo Aros,<br>
 Jachym Cepicky

Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2009-12-10 09:12:48 UTC (rev 39958)
+++ grass/trunk/gui/wxpython/wxgui.py	2009-12-10 09:17:26 UTC (rev 39959)
@@ -1467,8 +1467,18 @@
         
     def OnKey(self, event):
         """!Check hotkey"""
+        kc = event.GetKeyCode()
+                
+        if event.ControlDown():
+            if kc == wx.WXK_TAB:
+                # switch layer list / command output
+                if self.notebook.GetSelection() == 0:
+                    self.notebook.SetSelection(1)
+                else:
+                    self.notebook.SetSelection(0)
+        
         try:
-            kc = chr(event.GetKeyCode())
+            ckc = chr(kc)
         except ValueError:
             event.Skip()
             return



More information about the grass-commit mailing list