~ubuntu-branches/ubuntu/raring/wxwidgets2.8/raring

« back to all changes in this revision

Viewing changes to wxPython/demo/AUI_MDI.py

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2012-01-07 13:59:25 UTC
  • mfrom: (1.1.9) (5.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20120107135925-2601miy9ullcon9j
Tags: 2.8.12.1-6ubuntu1
* Resync from Debian, changes that were kept:
  - debian/rules: re-enable mediactrl. This allows libwx_gtk2u_media-2.8 to be
    built, as this is required by some applications (LP: #632984)
  - debian/control: Build-dep on libxt-dev for mediactrl.
  - Patches
    + fix-bashism-in-example
* Add conflict on python-wxgtk2.8 (<< 2.8.12.1-6ubuntu1~) to python-wxversion
  to guarantee upgrade ordering when moving from pycentral to dh_python2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
        mb = self.MakeMenuBar()
16
16
        self.SetMenuBar(mb)
17
17
        self.CreateStatusBar()
18
 
 
 
18
        self.Bind(wx.EVT_CLOSE)
 
19
        
19
20
    def MakeMenuBar(self):
20
21
        mb = wx.MenuBar()
21
22
        menu = wx.Menu()
32
33
        child.Show()
33
34
 
34
35
    def OnDoClose(self, evt):
35
 
        self.Close()
 
36
        # Close all ChildFrames first else Python crashes
 
37
        for m in self.GetChildren():
 
38
            if isinstance(m, wx.aui.AuiMDIClientWindow):
 
39
                for k in m.GetChildren():
 
40
                    if isinstance(k, ChildFrame):
 
41
                        k.Close()  
 
42
        evt.Skip()
36
43
        
37
44
 
38
45
#----------------------------------------------------------------------