Merge branch 'master' of evefit.org:pyfa
This commit is contained in:
@@ -36,11 +36,10 @@ class DamagePattern(ContextMenu):
|
||||
if dp is None:
|
||||
return None
|
||||
|
||||
l = []
|
||||
index = self.patterns.index(dp)
|
||||
bitmap = bitmapLoader.getBitmap("state_active_small", "icons")
|
||||
for i in range(len(self.patterns)):
|
||||
l.append(bitmap if i == index else None)
|
||||
l = [None] * len(self.patterns)
|
||||
l[index] = bitmap
|
||||
|
||||
return l
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class CharacterEditor(wx.Frame):
|
||||
self.disableWin=wx.WindowDisabler(self)
|
||||
self.SetSizeHintsSz(wx.Size(640, 600), wx.DefaultSize)
|
||||
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) )
|
||||
|
||||
|
||||
mainSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.navSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
@@ -486,7 +486,7 @@ class AvailableImplantsView(d.Display):
|
||||
class APIView (wx.Panel):
|
||||
def __init__(self, parent):
|
||||
wx.Panel.__init__ (self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.Size(500, 300), style=wx.TAB_TRAVERSAL)
|
||||
|
||||
self.Parent.Parent.Bind(CHAR_CHANGED, self.charChanged)
|
||||
pmainSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
fgSizerInput = wx.FlexGridSizer(3, 2, 0, 0)
|
||||
@@ -534,6 +534,13 @@ class APIView (wx.Panel):
|
||||
|
||||
self.SetSizer(pmainSizer)
|
||||
self.Layout()
|
||||
self.charChanged(None)
|
||||
|
||||
def charChanged(self, event):
|
||||
cChar = service.Character.getInstance()
|
||||
ID, key = cChar.getApiDetails(self.Parent.Parent.getActiveCharacter())
|
||||
self.inputID.SetValue(str(ID))
|
||||
self.inputKey.SetValue(key)
|
||||
|
||||
def fetchCharList(self, event):
|
||||
cChar = service.Character.getInstance()
|
||||
|
||||
@@ -86,6 +86,10 @@ class Character():
|
||||
eos.db.commit()
|
||||
eos.db.remove(char)
|
||||
|
||||
def getApiDetails(self, charID):
|
||||
char = eos.db.getCharacter(charID)
|
||||
return (char.apiID or "", char.apiKey or "")
|
||||
|
||||
def charList(self, charID, userID, apiKey):
|
||||
char = eos.db.getCharacter(charID)
|
||||
char.apiID = userID
|
||||
|
||||
Reference in New Issue
Block a user