[GRASS-SVN] r42560 - in
grass/branches/releasebranch_6_4/gui/wxpython: . gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jun 14 06:18:57 EDT 2010
Author: martinl
Date: 2010-06-14 10:18:57 +0000 (Mon, 14 Jun 2010)
New Revision: 42560
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/dbm.py
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/globalvar.py
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/wxgui_utils.py
grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
Log:
wxGUI: more fixes for wxPython 2.8.11
(merge r42558 from trunk)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/dbm.py 2010-06-14 10:09:38 UTC (rev 42559)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/dbm.py 2010-06-14 10:18:57 UTC (rev 42560)
@@ -524,29 +524,38 @@
# really needed (ML)
# self.notebook.SetFont(wx.Font(10, wx.FONTFAMILY_MODERN, wx.NORMAL, wx.NORMAL, 0, ''))
- self.notebook = FN.FlatNotebook(parent=self.panel, id=wx.ID_ANY,
- style=FN.FNB_BOTTOM |
- FN.FNB_NO_NAV_BUTTONS |
- FN.FNB_FANCY_TABS | FN.FNB_NO_X_BUTTON)
-
- dbmStyle = globalvar.FNPageStyle
-
- self.browsePage = FN.FlatNotebook(self.panel, id=wx.ID_ANY,
- style=dbmStyle)
+ if globalvar.hasAgw:
+ self.notebook = FN.FlatNotebook(parent = self.panel, id = wx.ID_ANY,
+ agwStyle = FN.FNB_BOTTOM |
+ FN.FNB_NO_NAV_BUTTONS |
+ FN.FNB_FANCY_TABS | FN.FNB_NO_X_BUTTON)
+ else:
+ self.notebook = FN.FlatNotebook(parent = self.panel, id = wx.ID_ANY,
+ style = FN.FNB_BOTTOM |
+ FN.FNB_NO_NAV_BUTTONS |
+ FN.FNB_FANCY_TABS | FN.FNB_NO_X_BUTTON)
+
+ if globalvar.hasAgw:
+ dbmStyle = { 'agwStyle' : globalvar.FNPageStyle }
+ else:
+ dbmStyle = { 'style' : globalvar.FNPageStyle }
+
+ self.browsePage = FN.FlatNotebook(self.panel, id = wx.ID_ANY,
+ **dbmStyle)
# self.notebook.AddPage(self.browsePage, caption=_("Browse data"))
self.notebook.AddPage(self.browsePage, text=_("Browse data")) # FN
self.browsePage.SetTabAreaColour(globalvar.FNPageColor)
- self.manageTablePage = FN.FlatNotebook(self.panel, id=wx.ID_ANY,
- style=dbmStyle)
+ self.manageTablePage = FN.FlatNotebook(self.panel, id = wx.ID_ANY,
+ **dbmStyle)
#self.notebook.AddPage(self.manageTablePage, caption=_("Manage tables"))
self.notebook.AddPage(self.manageTablePage, text=_("Manage tables")) # FN
if not self.editable:
self.notebook.GetPage(self.notebook.GetPageCount()-1).Enable(False)
self.manageTablePage.SetTabAreaColour(globalvar.FNPageColor)
- self.manageLayerPage = FN.FlatNotebook(self.panel, id=wx.ID_ANY,
- style=dbmStyle)
+ self.manageLayerPage = FN.FlatNotebook(self.panel, id = wx.ID_ANY,
+ **dbmStyle)
#self.notebook.AddPage(self.manageLayerPage, caption=_("Manage layers"))
self.notebook.AddPage(self.manageLayerPage, text=_("Manage layers")) # FN
self.manageLayerPage.SetTabAreaColour(globalvar.FNPageColor)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/globalvar.py 2010-06-14 10:09:38 UTC (rev 42559)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/globalvar.py 2010-06-14 10:18:57 UTC (rev 42560)
@@ -161,3 +161,6 @@
have_mlist = True
else:
have_mlist = False
+
+"""@Check version of wxPython, use agwStyle for 2.8.11+"""
+hasAgw = CheckWxVersion()
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py 2010-06-14 10:09:38 UTC (rev 42559)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py 2010-06-14 10:18:57 UTC (rev 42560)
@@ -71,7 +71,6 @@
import wx.lib.agw.flatnotebook as FN
except ImportError:
import wx.lib.flatnotebook as FN
-hasAgw = globalvar.CheckWxVersion()
import wx.lib.colourselect as csel
import wx.lib.filebrowsebutton as filebrowse
from wx.lib.expando import ExpandoTextCtrl, EVT_ETC_LAYOUT_NEEDED
@@ -1083,7 +1082,7 @@
# Build notebook
nbStyle = globalvar.FNPageStyle
- if hasAgw:
+ if globalvar.hasAgw:
self.notebook = FN.FlatNotebook( self, id = wx.ID_ANY, agwStyle = nbStyle)
else:
self.notebook = FN.FlatNotebook( self, id = wx.ID_ANY, style = nbStyle)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/wxgui_utils.py 2010-06-14 10:09:38 UTC (rev 42559)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/wxgui_utils.py 2010-06-14 10:18:57 UTC (rev 42560)
@@ -34,7 +34,6 @@
import wx.lib.buttons as buttons
import globalvar
-hasAgw = globalvar.CheckWxVersion()
import gdialogs
import menuform
@@ -78,7 +77,8 @@
if 'style' in kargs:
ctstyle |= kargs['style']
del kargs['style']
- if hasAgw:
+
+ if globalvar.hasAgw:
super(LayerTree, self).__init__(parent, id, pos, size, agwStyle = ctstyle)
else:
super(LayerTree, self).__init__(parent, id, pos, size, style = ctstyle)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py 2010-06-14 10:09:38 UTC (rev 42559)
+++ grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py 2010-06-14 10:18:57 UTC (rev 42560)
@@ -71,7 +71,6 @@
except ImportError:
import wx.lib.customtreectrl as CT
import wx.lib.flatnotebook as FN
-hasAgw = globalvar.CheckWxVersion()
try:
import subprocess
@@ -313,14 +312,14 @@
FN.FNB_NO_NAV_BUTTONS | \
FN.FNB_NO_X_BUTTON
- if hasAgw:
+ if globalvar.hasAgw:
self.notebook = FN.FlatNotebook(parent=self, id=wx.ID_ANY, agwStyle = nbStyle)
else:
self.notebook = FN.FlatNotebook(parent=self, id=wx.ID_ANY, style = nbStyle)
# create displays notebook widget and add it to main notebook page
cbStyle = globalvar.FNPageStyle
- if hasAgw:
+ if globalvar.hasAgw:
self.gm_cb = FN.FlatNotebook(self, id=wx.ID_ANY, agwStyle = cbStyle)
else:
self.gm_cb = FN.FlatNotebook(self, id=wx.ID_ANY, style = cbStyle)
@@ -1700,7 +1699,10 @@
FN.FNB_TABS_BORDER_SIMPLE | \
FN.FNB_NO_X_BUTTON
- aboutNotebook = FN.FlatNotebook(panel, id=wx.ID_ANY, style=nbstyle)
+ if globalvar.hasAgw:
+ aboutNotebook = FN.FlatNotebook(panel, id=wx.ID_ANY, agwStyle=nbstyle)
+ else:
+ aboutNotebook = FN.FlatNotebook(panel, id=wx.ID_ANY, style=nbstyle)
aboutNotebook.SetTabAreaColour(globalvar.FNPageColor)
# make pages for About GRASS notebook
More information about the grass-commit
mailing list