X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_librarian%2Fwx%2FAWindow.py;h=8c463247bec556c26adc642538ca0a3d0ed4a934;hb=1c6f1fe4d51693117625a37cf6cf85932892e368;hp=68f673b5077dbc27eae24aecd7a821de6264830b;hpb=b4e8312234ce185b904e9f44427c4e5971cb78c9;p=m_librarian.git diff --git a/m_librarian/wx/AWindow.py b/m_librarian/wx/AWindow.py index 68f673b..8c46324 100644 --- a/m_librarian/wx/AWindow.py +++ b/m_librarian/wx/AWindow.py @@ -36,9 +36,12 @@ class AWindow(wx.Frame): self.Show(True) def OnInit(self): + if self.Parent: + self.Parent.Disable() self.InitMenu() if self.session_config_section_name: self.Bind(wx.EVT_SIZE, self.OnSize) + self.Bind(wx.EVT_CLOSE, self.OnClose) def InitMenu(self): MenuBar = wx.MenuBar() @@ -64,6 +67,11 @@ class AWindow(wx.Frame): def OnCloseCommand(self, event): self.Close(True) + def OnClose(self, event): + if self.Parent: + self.Parent.Enable() + event.Skip() # Call other handlers + def OnQuit(self, event): wx.GetApp().ExitMainLoop()