self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_TextContent)
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_SizeReportContent)
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_HTMLContent)
- self.Bind(wx.EVT_MENU, self.OnClose, id=wx.ID_EXIT)
+ self.Bind(wx.EVT_MENU, self.OnExit, id=wx.ID_EXIT)
self.Bind(wx.EVT_MENU, self.OnAbout, id=ID_About)
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_TransparentHint)
def OnClose(self, event):
-
self._mgr.UnInit()
+ del self._mgr
self.Destroy()
- event.Skip()
+ def OnExit(self, event):
+ self.Close()
def OnAbout(self, event):
elif event.GetId() == ID_HorizontalGradient:
gradient = wx.aui.AUI_GRADIENT_HORIZONTAL
- self._mgr.GetArtProvider().SetMetric(wx.aui.AUI_ART_GRADIENT_TYPE, gradient)
+ self._mgr.GetArtProvider().SetMetric(wx.aui.AUI_DOCKART_GRADIENT_TYPE, gradient)
self._mgr.Update()
eid = event.GetId()
if eid == ID_NoGradient:
- event.Check(self._mgr.GetArtProvider().GetMetric(wx.aui.AUI_ART_GRADIENT_TYPE) == wx.aui.AUI_GRADIENT_NONE)
+ event.Check(self._mgr.GetArtProvider().GetMetric(wx.aui.AUI_DOCKART_GRADIENT_TYPE) == wx.aui.AUI_GRADIENT_NONE)
elif eid == ID_VerticalGradient:
- event.Check(self._mgr.GetArtProvider().GetMetric(wx.aui.AUI_ART_GRADIENT_TYPE) == wx.aui.AUI_GRADIENT_VERTICAL)
+ event.Check(self._mgr.GetArtProvider().GetMetric(wx.aui.AUI_DOCKART_GRADIENT_TYPE) == wx.aui.AUI_GRADIENT_VERTICAL)
elif eid == ID_HorizontalGradient:
- event.Check(self._mgr.GetArtProvider().GetMetric(wx.aui.AUI_ART_GRADIENT_TYPE) == wx.aui.AUI_GRADIENT_HORIZONTAL)
+ event.Check(self._mgr.GetArtProvider().GetMetric(wx.aui.AUI_DOCKART_GRADIENT_TYPE) == wx.aui.AUI_GRADIENT_HORIZONTAL)
elif eid == ID_AllowFloating:
event.Check((flags & wx.aui.AUI_MGR_ALLOW_FLOATING) != 0)