]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/wx/AWindow.py
Feat(wx/search): List found authors
[m_librarian.git] / m_librarian / wx / AWindow.py
index 68f673b5077dbc27eae24aecd7a821de6264830b..8c463247bec556c26adc642538ca0a3d0ed4a934 100644 (file)
@@ -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()