mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-07-21 12:41:10 +02:00
Fixes in wx.aui to properly transfer ownership of the menubar, and also some tweaks in the AUI_MDI sample in the demo.
This commit is contained in:
15
CHANGES.rst
15
CHANGES.rst
@@ -8,6 +8,21 @@
|
||||
wxPython Changelog
|
||||
==================
|
||||
|
||||
4.0.0rc1
|
||||
--------
|
||||
* (not yet released)
|
||||
|
||||
PyPI: https://pypi.python.org/pypi/wxPython/4.0.0rc1
|
||||
Extras: https://extras.wxPython.org/wxPython4/extras/
|
||||
Pip: ``pip install wxPython==4.0.0rc1``
|
||||
|
||||
Changes in this release include the following:
|
||||
|
||||
* Fixes in wx.aui to properly transfer ownership of the menubar, and also some
|
||||
tweaks in the AUI_MDI sample in the demo. (#540)
|
||||
|
||||
|
||||
|
||||
|
||||
4.0.0b2 -- "Hurricanes, Floods, and Forest Fires! Oh My!"
|
||||
---------------------------------------------------------
|
||||
|
@@ -1,10 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import wx
|
||||
try:
|
||||
from agw import aui
|
||||
except ImportError: # if it's not there locally, try the wxPython lib.
|
||||
import wx.lib.agw.aui as aui
|
||||
import wx.aui as aui
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -17,10 +15,10 @@ class ParentFrame(aui.AuiMDIParentFrame):
|
||||
size=(640,480),
|
||||
style=wx.DEFAULT_FRAME_STYLE)
|
||||
self.count = 0
|
||||
mb = self.MakeMenuBar()
|
||||
self.SetMenuBar(mb)
|
||||
self.mb = self.MakeMenuBar()
|
||||
self.SetMenuBar(self.mb)
|
||||
self.CreateStatusBar()
|
||||
self.Bind(wx.EVT_CLOSE, self.OnDoClose)
|
||||
self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
|
||||
|
||||
def MakeMenuBar(self):
|
||||
mb = wx.MenuBar()
|
||||
@@ -35,13 +33,16 @@ class ParentFrame(aui.AuiMDIParentFrame):
|
||||
def OnNewChild(self, evt):
|
||||
self.count += 1
|
||||
child = ChildFrame(self, self.count)
|
||||
child.Show()
|
||||
#child.Show()
|
||||
|
||||
def OnDoClose(self, evt):
|
||||
self.Close()
|
||||
|
||||
def OnCloseWindow(self, evt):
|
||||
# Close all ChildFrames first else Python crashes
|
||||
for m in self.GetChildren():
|
||||
if isinstance(m, aui.AuiMDIClientWindow):
|
||||
for k in m.GetChildren():
|
||||
for k in list(m.GetChildren()):
|
||||
if isinstance(k, ChildFrame):
|
||||
k.Close()
|
||||
evt.Skip()
|
||||
|
@@ -1,10 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import wx
|
||||
try:
|
||||
from agw import aui
|
||||
except ImportError: # if it's not there locally, try the wxPython lib.
|
||||
import wx.lib.agw.aui as aui
|
||||
import wx.aui as aui
|
||||
|
||||
|
||||
text = """\
|
||||
|
@@ -37,12 +37,15 @@ def run():
|
||||
c = module.find('wxAuiMDIParentFrame')
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
tools.fixTopLevelWindowClass(c)
|
||||
c.find('SetMenuBar.menuBar').transfer = True
|
||||
c.find('SetArtProvider.provider').transfer = True
|
||||
|
||||
|
||||
c = module.find('wxAuiMDIChildFrame')
|
||||
tools.fixTopLevelWindowClass(c)
|
||||
tools.fixSetStatusWidths(c.find('SetStatusWidths'))
|
||||
|
||||
c.find('SetMenuBar.menuBar').transfer = True
|
||||
c.find('Show').isVirtual = True
|
||||
|
||||
c = module.find('wxAuiMDIClientWindow')
|
||||
tools.fixWindowClass(c)
|
||||
|
Reference in New Issue
Block a user