From d15fefcf1b7563b910a5dffb57c626c87a8faae8 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Fri, 30 Aug 2019 15:26:58 +0300 Subject: [PATCH 1/4] Avoid various crashes when working with SslLoginServer dialog --- gui/ssoLogin.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gui/ssoLogin.py b/gui/ssoLogin.py index 1ab32e920..0cf059f5b 100644 --- a/gui/ssoLogin.py +++ b/gui/ssoLogin.py @@ -42,14 +42,15 @@ class SsoLogin(wx.Dialog): webbrowser.open(uri) def OnLogin(self, event): - self.Close() + self.EndModal(wx.ID_OK) event.Skip() class SsoLoginServer(wx.Dialog): + def __init__(self, port): - mainFrame = gui.mainFrame.MainFrame.getInstance() - super().__init__(mainFrame, id=wx.ID_ANY, title="SSO Login", size=(-1, -1), style=wx.DEFAULT_DIALOG_STYLE) + self.mainFrame = gui.mainFrame.MainFrame.getInstance() + super().__init__(self.mainFrame, id=wx.ID_ANY, title="SSO Login", size=(-1, -1), style=wx.DEFAULT_DIALOG_STYLE) from service.esi import Esi @@ -59,8 +60,8 @@ class SsoLoginServer(wx.Dialog): uri = self.sEsi.getLoginURI(serverAddr) bSizer1 = wx.BoxSizer(wx.VERTICAL) - mainFrame.Bind(GE.EVT_SSO_LOGIN, self.OnLogin) - self.Bind(wx.EVT_CLOSE, self.OnClose) + self.mainFrame.Bind(GE.EVT_SSO_LOGIN, self.OnLogin) + self.Bind(wx.EVT_WINDOW_DESTROY, self.OnDestroy) text = wx.StaticText(self, wx.ID_ANY, "Waiting for character login through EVE Single Sign-On.") bSizer1.Add(text, 0, wx.ALL | wx.EXPAND, 10) @@ -78,9 +79,10 @@ class SsoLoginServer(wx.Dialog): webbrowser.open(uri) def OnLogin(self, event): - self.Close() + self.EndModal(wx.ID_OK) event.Skip() - def OnClose(self, event): + def OnDestroy(self, event): + self.mainFrame.Unbind(GE.EVT_SSO_LOGIN, handler=self.OnLogin) self.sEsi.stopServer() event.Skip() From 6f50be1e7edacc483212b364397dc373cd979129 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Fri, 30 Aug 2019 15:36:34 +0300 Subject: [PATCH 2/4] Fix another set of crashes with manual login --- gui/ssoLogin.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gui/ssoLogin.py b/gui/ssoLogin.py index 0cf059f5b..e1af6aa3d 100644 --- a/gui/ssoLogin.py +++ b/gui/ssoLogin.py @@ -33,18 +33,12 @@ class SsoLogin(wx.Dialog): self.SetSizer(bSizer1) self.Center() - mainFrame.Bind(GE.EVT_SSO_LOGIN, self.OnLogin) - from service.esi import Esi self.sEsi = Esi.getInstance() uri = self.sEsi.getLoginURI(None) webbrowser.open(uri) - def OnLogin(self, event): - self.EndModal(wx.ID_OK) - event.Skip() - class SsoLoginServer(wx.Dialog): From 5a34db0d2f5670462076b3df76c9766c57990c61 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 2 Sep 2019 01:14:35 +0300 Subject: [PATCH 3/4] Change how fit deletion confirmation dialog is destroyed --- gui/builtinShipBrowser/fitItem.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/gui/builtinShipBrowser/fitItem.py b/gui/builtinShipBrowser/fitItem.py index 300223926..afef42ac0 100644 --- a/gui/builtinShipBrowser/fitItem.py +++ b/gui/builtinShipBrowser/fitItem.py @@ -344,14 +344,13 @@ class FitItem(SFItem.SFBrowserItem): if mstate.GetModifiers() == wx.MOD_SHIFT or mstate.MiddleIsDown(): self.deleteFit() else: - with wx.MessageDialog( - self, - "Do you really want to delete this fit?", - "Confirm Delete", - wx.YES | wx.NO | wx.ICON_QUESTION - ) as dlg: - if dlg.ShowModal() == wx.ID_YES: - self.deleteFit() + dlg = wx.MessageDialog( + self, "Do you really want to delete this fit?", "Confirm Delete", + wx.YES | wx.NO | wx.ICON_QUESTION) + if dlg.ShowModal() == wx.ID_YES: + self.deleteFit() + else: + dlg.Destroy() def deleteFit(self, event=None): pyfalog.debug("Deleting ship fit.") From 5df2db587971f861beb697d24c2cb6e03c99fe70 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 2 Sep 2019 01:21:32 +0300 Subject: [PATCH 4/4] Bump version --- version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.yml b/version.yml index a9faa124f..7c868a394 100644 --- a/version.yml +++ b/version.yml @@ -1 +1 @@ -version: v2.10.0 +version: v2.10.1