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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jun 25 08:13:56 PDT 2014


Author: annakrat
Date: 2014-06-25 08:13:56 -0700 (Wed, 25 Jun 2014)
New Revision: 60971

Modified:
   grass/trunk/gui/wxpython/gui_core/mapdisp.py
Log:
wxGUI: added fullscreen mode on F11

Modified: grass/trunk/gui/wxpython/gui_core/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/mapdisp.py	2014-06-25 14:35:45 UTC (rev 60970)
+++ grass/trunk/gui/wxpython/gui_core/mapdisp.py	2014-06-25 15:13:56 UTC (rev 60971)
@@ -101,6 +101,8 @@
         self._toolSwitcher = ToolSwitcher()
         self._toolSwitcher.toggleToolChanged.connect(self._onToggleTool)
 
+        self.Bind(wx.EVT_KEY_UP, self.OnFullScreen)
+
     def _initMap(self, Map):
         """Initialize map display, set dimensions and map region
         """
@@ -124,6 +126,14 @@
         # update statusbar
         self.StatusbarUpdate()
 
+    def OnFullScreen(self, event):
+        if event.GetKeyCode() == wx.WXK_F11:
+            for toolbar in self.toolbars.keys():
+                self._mgr.GetPane(self.toolbars[toolbar]).Show(self.IsFullScreen())
+            self._mgr.Update()
+            self.ShowFullScreen(not self.IsFullScreen())
+        event.Skip()
+
     def GetToolSwitcher(self):
         return self._toolSwitcher
 



More information about the grass-commit mailing list