[GRASS-SVN] r61000 - in grass/branches/releasebranch_7_0/gui/wxpython: gmodeler modules psmap wxplot
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jun 26 14:54:34 PDT 2014
Author: annakrat
Date: 2014-06-26 14:54:34 -0700 (Thu, 26 Jun 2014)
New Revision: 61000
Modified:
grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py
grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/toolbars.py
grass/branches/releasebranch_7_0/gui/wxpython/modules/histogram.py
grass/branches/releasebranch_7_0/gui/wxpython/psmap/frame.py
grass/branches/releasebranch_7_0/gui/wxpython/psmap/toolbars.py
grass/branches/releasebranch_7_0/gui/wxpython/wxplot/histogram.py
grass/branches/releasebranch_7_0/gui/wxpython/wxplot/profile.py
grass/branches/releasebranch_7_0/gui/wxpython/wxplot/scatter.py
Log:
wxGUI: workaround for not visible toolbars on Mac with wxPython 3 (merge from trunk, 60999)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py 2014-06-26 21:49:24 UTC (rev 60999)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py 2014-06-26 21:54:34 UTC (rev 61000)
@@ -89,7 +89,9 @@
self.SetMenuBar(self.menubar)
self.toolbar = ModelerToolbar(parent = self)
- self.SetToolBar(self.toolbar)
+ # workaround for http://trac.wxwidgets.org/ticket/13888
+ if sys.platform != 'darwin':
+ self.SetToolBar(self.toolbar)
self.statusbar = self.CreateStatusBar(number = 1)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/toolbars.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/toolbars.py 2014-06-26 21:49:24 UTC (rev 60999)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/toolbars.py 2014-06-26 21:54:34 UTC (rev 61000)
@@ -30,7 +30,11 @@
"""
def __init__(self, parent):
BaseToolbar.__init__(self, parent)
-
+
+ # workaround for http://trac.wxwidgets.org/ticket/13888
+ if sys.platform == 'darwin':
+ parent.SetToolBar(self)
+
self.InitToolbar(self._toolbarData())
# realize the toolbar
Modified: grass/branches/releasebranch_7_0/gui/wxpython/modules/histogram.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/modules/histogram.py 2014-06-26 21:49:24 UTC (rev 60999)
+++ grass/branches/releasebranch_7_0/gui/wxpython/modules/histogram.py 2014-06-26 21:54:34 UTC (rev 61000)
@@ -18,6 +18,7 @@
"""
import os
+import sys
import wx
@@ -284,7 +285,9 @@
self.encoding = 'ISO-8859-1' # default encoding for display fonts
self.toolbar = HistogramToolbar(parent = self)
- self.SetToolBar(self.toolbar)
+ # workaround for http://trac.wxwidgets.org/ticket/13888
+ if sys.platform != 'darwin':
+ self.SetToolBar(self.toolbar)
# find selected map
# might by moved outside this class
@@ -482,7 +485,11 @@
"""
def __init__(self, parent):
BaseToolbar.__init__(self, parent)
-
+
+ # workaround for http://trac.wxwidgets.org/ticket/13888
+ if sys.platform == 'darwin':
+ parent.SetToolBar(self)
+
self.InitToolbar(self._toolbarData())
# realize the toolbar
Modified: grass/branches/releasebranch_7_0/gui/wxpython/psmap/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/psmap/frame.py 2014-06-26 21:49:24 UTC (rev 60999)
+++ grass/branches/releasebranch_7_0/gui/wxpython/psmap/frame.py 2014-06-26 21:54:34 UTC (rev 61000)
@@ -68,7 +68,9 @@
self._toolSwitcher = ToolSwitcher()
self.toolbar = PsMapToolbar(parent=self, toolSwitcher=self._toolSwitcher)
- self.SetToolBar(self.toolbar)
+ # workaround for http://trac.wxwidgets.org/ticket/13888
+ if sys.platform != 'darwin':
+ self.SetToolBar(self.toolbar)
self.iconsize = (16, 16)
#satusbar
Modified: grass/branches/releasebranch_7_0/gui/wxpython/psmap/toolbars.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/psmap/toolbars.py 2014-06-26 21:49:24 UTC (rev 60999)
+++ grass/branches/releasebranch_7_0/gui/wxpython/psmap/toolbars.py 2014-06-26 21:54:34 UTC (rev 61000)
@@ -30,7 +30,11 @@
@param parent parent window
"""
BaseToolbar.__init__(self, parent, toolSwitcher)
-
+
+ # workaround for http://trac.wxwidgets.org/ticket/13888
+ if sys.platform == 'darwin':
+ parent.SetToolBar(self)
+
self.InitToolbar(self._toolbarData())
self._default = self.pointer
Modified: grass/branches/releasebranch_7_0/gui/wxpython/wxplot/histogram.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/wxplot/histogram.py 2014-06-26 21:49:24 UTC (rev 60999)
+++ grass/branches/releasebranch_7_0/gui/wxpython/wxplot/histogram.py 2014-06-26 21:54:34 UTC (rev 61000)
@@ -39,7 +39,9 @@
BasePlotFrame.__init__(self, parent, size = size, **kwargs)
self.toolbar = HistogramPlotToolbar(parent = self)
- self.SetToolBar(self.toolbar)
+ # workaround for http://trac.wxwidgets.org/ticket/13888
+ if sys.platform != 'darwin':
+ self.SetToolBar(self.toolbar)
self.SetTitle(_("GRASS GIS Histogramming Tool"))
#
@@ -243,7 +245,11 @@
"""
def __init__(self, parent):
BaseToolbar.__init__(self, parent)
-
+
+ # workaround for http://trac.wxwidgets.org/ticket/13888
+ if sys.platform == 'darwin':
+ parent.SetToolBar(self)
+
self.InitToolbar(self._toolbarData())
# realize the toolbar
Modified: grass/branches/releasebranch_7_0/gui/wxpython/wxplot/profile.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/wxplot/profile.py 2014-06-26 21:49:24 UTC (rev 60999)
+++ grass/branches/releasebranch_7_0/gui/wxpython/wxplot/profile.py 2014-06-26 21:54:34 UTC (rev 61000)
@@ -54,7 +54,9 @@
self.controller.transectChanged.connect(self.SetTransect)
self.transect = []
self.toolbar = ProfileToolbar(parent = self)
- self.SetToolBar(self.toolbar)
+ # workaround for http://trac.wxwidgets.org/ticket/13888
+ if sys.platform != 'darwin':
+ self.SetToolBar(self.toolbar)
self.SetTitle(_("GRASS Profile Analysis Tool"))
self._units = units
@@ -422,7 +424,11 @@
"""
def __init__(self, parent):
BaseToolbar.__init__(self, parent)
-
+
+ # workaround for http://trac.wxwidgets.org/ticket/13888
+ if sys.platform == 'darwin':
+ parent.SetToolBar(self)
+
self.InitToolbar(self._toolbarData())
# realize the toolbar
Modified: grass/branches/releasebranch_7_0/gui/wxpython/wxplot/scatter.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/wxplot/scatter.py 2014-06-26 21:49:24 UTC (rev 60999)
+++ grass/branches/releasebranch_7_0/gui/wxpython/wxplot/scatter.py 2014-06-26 21:54:34 UTC (rev 61000)
@@ -40,7 +40,9 @@
BasePlotFrame.__init__(self, parent, size = size, **kwargs)
self.toolbar = ScatterToolbar(parent = self)
- self.SetToolBar(self.toolbar)
+ # workaround for http://trac.wxwidgets.org/ticket/13888
+ if sys.platform != 'darwin':
+ self.SetToolBar(self.toolbar)
self.SetTitle(_("GRASS Bivariate Scatterplot Tool"))
#
@@ -267,7 +269,11 @@
"""
def __init__(self, parent):
BaseToolbar.__init__(self, parent)
-
+
+ # workaround for http://trac.wxwidgets.org/ticket/13888
+ if sys.platform == 'darwin':
+ parent.SetToolBar(self)
+
self.InitToolbar(self._toolbarData())
# realize the toolbar
More information about the grass-commit
mailing list