Bunch of renaming to bring variables up to speed
This commit is contained in:
@@ -27,7 +27,7 @@ class CopySelectDialog(wx.Dialog):
|
||||
copyFormatEftImps = 1
|
||||
copyFormatXml = 2
|
||||
copyFormatDna = 3
|
||||
copyFormatCrest = 4
|
||||
copyFormatEsi = 4
|
||||
copyFormatMultiBuy = 5
|
||||
|
||||
def __init__(self, parent):
|
||||
@@ -40,7 +40,7 @@ class CopySelectDialog(wx.Dialog):
|
||||
CopySelectDialog.copyFormatEftImps: "EFT text format",
|
||||
CopySelectDialog.copyFormatXml: "EVE native XML format",
|
||||
CopySelectDialog.copyFormatDna: "A one-line text format",
|
||||
CopySelectDialog.copyFormatCrest: "A JSON format used for EVE CREST",
|
||||
CopySelectDialog.copyFormatEsi: "A JSON format used for EVE CREST",
|
||||
CopySelectDialog.copyFormatMultiBuy: "MultiBuy text format"}
|
||||
selector = wx.RadioBox(self, wx.ID_ANY, label="Copy to the clipboard using:", choices=copyFormats,
|
||||
style=wx.RA_SPECIFY_ROWS)
|
||||
|
||||
@@ -23,7 +23,7 @@ from service.port import ESIExportException
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
|
||||
class CrestFittings(wx.Frame):
|
||||
class EveFittings(wx.Frame):
|
||||
def __init__(self, parent):
|
||||
wx.Frame.__init__(self, parent, id=wx.ID_ANY, title="Browse EVE Fittings", pos=wx.DefaultPosition,
|
||||
size=wx.Size(550, 450), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)
|
||||
@@ -287,7 +287,7 @@ class ExportToEve(wx.Frame):
|
||||
ESIExceptionHandler(self, ex)
|
||||
|
||||
|
||||
class CrestMgmt(wx.Dialog):
|
||||
class SsoCharacterMgmt(wx.Dialog):
|
||||
def __init__(self, parent):
|
||||
wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title="SSO Character Management", pos=wx.DefaultPosition,
|
||||
size=wx.Size(550, 250), style=wx.DEFAULT_DIALOG_STYLE)
|
||||
@@ -83,7 +83,7 @@ import webbrowser
|
||||
import wx.adv
|
||||
|
||||
from service.esi import Esi
|
||||
from gui.crestFittings import CrestFittings, ExportToEve, CrestMgmt
|
||||
from gui.esiFittings import EveFittings, ExportToEve, SsoCharacterMgmt
|
||||
|
||||
disableOverrideEditor = False
|
||||
|
||||
@@ -605,7 +605,7 @@ class MainFrame(wx.Frame):
|
||||
wx.PostEvent(self, GE.FitChanged(fitID=fitID))
|
||||
|
||||
def eveFittings(self, event):
|
||||
dlg = CrestFittings(self)
|
||||
dlg = EveFittings(self)
|
||||
dlg.Show()
|
||||
|
||||
def onSSOLogin(self, event):
|
||||
@@ -613,7 +613,7 @@ class MainFrame(wx.Frame):
|
||||
menu.Enable(menu.eveFittingsId, True)
|
||||
menu.Enable(menu.exportToEveId, True)
|
||||
|
||||
def updateCrestMenus(self, type):
|
||||
def updateEsiMenus(self, type):
|
||||
menu = self.GetMenuBar()
|
||||
sEsi = Esi.getInstance()
|
||||
|
||||
@@ -623,7 +623,7 @@ class MainFrame(wx.Frame):
|
||||
menu.Enable(menu.exportToEveId, not enable)
|
||||
|
||||
def ssoHandler(self, event):
|
||||
dlg = CrestMgmt(self)
|
||||
dlg = SsoCharacterMgmt(self)
|
||||
dlg.Show()
|
||||
|
||||
def exportToEve(self, event):
|
||||
@@ -699,7 +699,7 @@ class MainFrame(wx.Frame):
|
||||
fit = db_getFit(self.getActiveFit())
|
||||
toClipboard(Port.exportDna(fit))
|
||||
|
||||
def clipboardCrest(self):
|
||||
def clipboardEsi(self):
|
||||
fit = db_getFit(self.getActiveFit())
|
||||
toClipboard(Port.exportESI(fit))
|
||||
|
||||
@@ -725,7 +725,7 @@ class MainFrame(wx.Frame):
|
||||
CopySelectDialog.copyFormatEftImps: self.clipboardEftImps,
|
||||
CopySelectDialog.copyFormatXml: self.clipboardXml,
|
||||
CopySelectDialog.copyFormatDna: self.clipboardDna,
|
||||
CopySelectDialog.copyFormatCrest: self.clipboardCrest,
|
||||
CopySelectDialog.copyFormatEsi: self.clipboardEsi,
|
||||
CopySelectDialog.copyFormatMultiBuy: self.clipboardMultiBuy}
|
||||
dlg = CopySelectDialog(self)
|
||||
dlg.ShowModal()
|
||||
|
||||
@@ -137,12 +137,12 @@ class MainMenuBar(wx.MenuBar):
|
||||
# self.sEsi = Crest.getInstance()
|
||||
|
||||
# CREST Menu
|
||||
crestMenu = wx.Menu()
|
||||
self.Append(crestMenu, "EVE &SSO")
|
||||
esiMMenu = wx.Menu()
|
||||
self.Append(esiMMenu, "EVE &SSO")
|
||||
|
||||
crestMenu.Append(self.ssoLoginId, "Manage Characters")
|
||||
crestMenu.Append(self.eveFittingsId, "Browse EVE Fittings")
|
||||
crestMenu.Append(self.exportToEveId, "Export To EVE")
|
||||
esiMMenu.Append(self.ssoLoginId, "Manage Characters")
|
||||
esiMMenu.Append(self.eveFittingsId, "Browse EVE Fittings")
|
||||
esiMMenu.Append(self.exportToEveId, "Export To EVE")
|
||||
|
||||
# if self.sEsi.settings.get('mode') == CrestModes.IMPLICIT or len(self.sEsi.getCrestCharacters()) == 0:
|
||||
self.Enable(self.eveFittingsId, True)
|
||||
|
||||
@@ -15,7 +15,6 @@ import datetime
|
||||
from eos.enum import Enum
|
||||
from eos.saveddata.ssocharacter import SsoCharacter
|
||||
import gui.globalEvents as GE
|
||||
from service.settings import CRESTSettings
|
||||
from service.server import StoppableHTTPServer, AuthHandler
|
||||
|
||||
from .esi_security_proxy import EsiSecurityProxy
|
||||
@@ -77,8 +76,6 @@ class Esi(object):
|
||||
|
||||
AFTER_TOKEN_REFRESH.add_receiver(self.tokenUpdate)
|
||||
|
||||
self.settings = CRESTSettings.getInstance()
|
||||
|
||||
# these will be set when needed
|
||||
self.httpd = None
|
||||
self.state = None
|
||||
@@ -98,10 +95,6 @@ class Esi(object):
|
||||
print(kwargs)
|
||||
pass
|
||||
|
||||
@property
|
||||
def isTestServer(self):
|
||||
return self.settings.get('server') == Servers.SISI
|
||||
|
||||
def delSsoCharacter(self, id):
|
||||
char = eos.db.getSsoCharacter(id, config.getClientSecret())
|
||||
|
||||
@@ -222,7 +215,7 @@ class Esi(object):
|
||||
pyfalog.warn("OAUTH state mismatch")
|
||||
raise Exception("OAUTH State Mismatch.")
|
||||
|
||||
pyfalog.debug("Handling CREST login with: {0}", message)
|
||||
pyfalog.debug("Handling SSO login with: {0}", message)
|
||||
|
||||
auth_response = json.loads(base64.b64decode(message['SSOInfo'][0]))
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class Network(object):
|
||||
# Request constants - every request must supply this, as it is checked if
|
||||
# enabled or not via settings
|
||||
ENABLED = 1
|
||||
EVE = 2 # Mostly API, but also covers CREST requests
|
||||
EVE = 2 # Mostly API, but also covers CREST requests. update: might be useless these days, this Network class needs to be reviewed
|
||||
PRICES = 4
|
||||
UPDATE = 8
|
||||
|
||||
|
||||
@@ -474,7 +474,7 @@ class Port(object):
|
||||
except ValueError:
|
||||
fitobj.ship = Citadel(sMkt.getItem(ship))
|
||||
except:
|
||||
pyfalog.warning("Caught exception in importCrest")
|
||||
pyfalog.warning("Caught exception in importESI")
|
||||
return None
|
||||
|
||||
items.sort(key=lambda k: k['flag'])
|
||||
|
||||
@@ -4,7 +4,6 @@ import socket
|
||||
import threading
|
||||
from logbook import Logger
|
||||
|
||||
from service.settings import CRESTSettings
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
# noinspection PyPep8
|
||||
@@ -83,7 +82,7 @@ class AuthHandler(http.server.BaseHTTPRequestHandler):
|
||||
if step2:
|
||||
self.server.callback(parts)
|
||||
pyfalog.info("Successfully logged into EVE.")
|
||||
msg = "If you see this message then it means you should be logged into CREST. You may close this window and return to the application."
|
||||
msg = "If you see this message then it means you should be logged into EVE SSO. You may close this window and return to the application."
|
||||
else:
|
||||
# For implicit mode, we have to serve up the page which will take the hash and redirect using a querystring
|
||||
pyfalog.info("Processing response from EVE Online.")
|
||||
|
||||
Reference in New Issue
Block a user