fix close button in system menu for AboutDialog on Windows
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Thu, 22 Dec 2016 17:39:58 +0300
changeset 1612 bd03e1217fa5
parent 1611 5e64d552b25a
child 1613 41ca586da9dc
fix close button in system menu for AboutDialog on Windows


If SetEscapeId receives wx.ID_CLOSE as parameter, then on Windows with
wxPython 2.8 system close button in title bar stops working.
If wx.ID_CANCEL or wx.ID_OK is used in SetEscapeId call, then close
button works correctly.
dialogs/AboutDialog.py
--- a/dialogs/AboutDialog.py	Thu Dec 22 14:38:56 2016 +0300
+++ b/dialogs/AboutDialog.py	Thu Dec 22 17:39:58 2016 +0300
@@ -62,7 +62,7 @@
 
         credits = wx.Button(self, id=wx.ID_ABOUT, label=_("C&redits"))
         license = wx.Button(self, label=_("&License"))
-        close = wx.Button(self, id=wx.ID_CLOSE, label=_("&Close"))
+        close = wx.Button(self, id=wx.ID_CANCEL, label=_("&Close"))
 
         btnSizer = wx.BoxSizer(wx.HORIZONTAL)
         btnSizer.Add(credits, flag=wx.CENTER | wx.LEFT | wx.RIGHT, border=5)