Merge branch 'master' into singularity
This commit is contained in:
@@ -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.")
|
||||
|
||||
@@ -33,23 +33,18 @@ 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.Close()
|
||||
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 +54,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 +73,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()
|
||||
|
||||
Reference in New Issue
Block a user