[GRASS-SVN] r61488 - grass/branches/releasebranch_7_0/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 31 11:55:38 PDT 2014


Author: annakrat
Date: 2014-07-31 11:55:38 -0700 (Thu, 31 Jul 2014)
New Revision: 61488

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/gui_core/mapdisp.py
Log:
wxGUI: fullscreen mode (merge from trunk, r60971, r61267)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/mapdisp.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/mapdisp.py	2014-07-31 18:50:36 UTC (rev 61487)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/mapdisp.py	2014-07-31 18:55:38 UTC (rev 61488)
@@ -100,6 +100,12 @@
         self._toolSwitcher = ToolSwitcher()
         self._toolSwitcher.toggleToolChanged.connect(self._onToggleTool)
 
+        # set accelerator table for fullscreen
+        fullScreenId = wx.NewId()
+        self.Bind(wx.EVT_MENU, self.OnFullScreen, id=fullScreenId)
+        accelTable = wx.AcceleratorTable([(wx.ACCEL_NORMAL, wx.WXK_F11, fullScreenId)])
+        self.SetAcceleratorTable(accelTable)
+
     def _initMap(self, Map):
         """!Initialize map display, set dimensions and map region
         """
@@ -123,6 +129,14 @@
         # update statusbar
         self.StatusbarUpdate()
 
+    def OnFullScreen(self, event):
+        """!Switch fullscreen mode, hides also toolbars"""
+        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