Merge branch 'charImprovements'

This commit is contained in:
blitzmann
2014-03-27 22:50:38 -04:00

View File

@@ -533,7 +533,7 @@ class APIView (wx.Panel):
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(GE.CHAR_CHANGED, self.charChanged)
self.apiUrlCreatePredefined = u"https://community.eveonline.com/support/api-key/update/"
self.apiUrlCreatePredefined = u"https://community.eveonline.com/support/api-key/CreatePredefined?accessMask=8"
self.apiUrlKeyList = u"https://community.eveonline.com/support/api-key/"
pmainSizer = wx.BoxSizer(wx.VERTICAL)
@@ -566,25 +566,29 @@ class APIView (wx.Panel):
fgSizerInput.Add(self.charChoice, 1, wx.ALL | wx.EXPAND, 5)
self.charChoice.Enable(False)
pmainSizer.Add(fgSizerInput, 0, wx.EXPAND, 5)
btnSizer = wx.FlexGridSizer(3, 2, 0, 0)
btnSizer.AddGrowableCol(1)
btnSizer.SetFlexibleDirection(wx.BOTH)
btnSizer.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)
pmainSizer.Add(fgSizerInput, 0, wx.EXPAND, 5)
btnSizer = wx.BoxSizer( wx.HORIZONTAL )
btnSizer.AddStretchSpacer()
self.btnFetchCharList = wx.Button(self, wx.ID_ANY, u"Get Characters")
btnSizer.Add(self.btnFetchCharList, 0, wx.ALL, 2)
self.btnFetchCharList.Bind(wx.EVT_BUTTON, self.fetchCharList)
self.btnFetchSkills = wx.Button(self, wx.ID_ANY, u"Fetch Skills")
btnSizer.Add(self.btnFetchSkills, 0, wx.ALL, 2)
self.btnFetchSkills.Bind(wx.EVT_BUTTON, self.fetchSkills)
self.btnFetchSkills.Enable(False)
pmainSizer.Add(btnSizer, 0, wx.EXPAND, 5)
self.stAPITip = wx.StaticText( self, wx.ID_ANY, u"You can create a key here (only character sheet access is needed):", wx.DefaultPosition, wx.DefaultSize, 0 )
btnSizer.AddStretchSpacer()
pmainSizer.Add(btnSizer, 0, wx.EXPAND, 5)
self.stStatus = wx.StaticText(self, wx.ID_ANY, wx.EmptyString)
pmainSizer.Add(self.stStatus, 0, wx.ALL, 5)
pmainSizer.AddStretchSpacer()
self.stAPITip = wx.StaticText( self, wx.ID_ANY, u"You can create a pre-defined key here (only CharacterSheet is required):", wx.DefaultPosition, wx.DefaultSize, 0 )
self.stAPITip.Wrap( -1 )
pmainSizer.Add( self.stAPITip, 0, wx.ALL, 2 )
@@ -592,15 +596,13 @@ class APIView (wx.Panel):
self.hlEveAPI = wx.HyperlinkCtrl( self, wx.ID_ANY, self.apiUrlCreatePredefined, self.apiUrlCreatePredefined, wx.DefaultPosition, wx.DefaultSize, wx.HL_DEFAULT_STYLE )
pmainSizer.Add( self.hlEveAPI, 0, wx.ALL, 2 )
self.stAPITip2 = wx.StaticText( self, wx.ID_ANY, u"You can view the list of your keys here:", wx.DefaultPosition, wx.DefaultSize, 0 )
self.stAPITip2 = wx.StaticText( self, wx.ID_ANY, u"Or, you can choose an existing key from:", wx.DefaultPosition, wx.DefaultSize, 0 )
self.stAPITip2.Wrap( -1 )
pmainSizer.Add( self.stAPITip2, 0, wx.ALL, 2 )
self.hlEveAPI2 = wx.HyperlinkCtrl( self, wx.ID_ANY, self.apiUrlKeyList, self.apiUrlKeyList, wx.DefaultPosition, wx.DefaultSize, wx.HL_DEFAULT_STYLE )
pmainSizer.Add( self.hlEveAPI2, 0, wx.ALL, 2 )
self.stStatus = wx.StaticText(self, wx.ID_ANY, wx.EmptyString)
pmainSizer.Add(self.stStatus, 0, wx.ALL, 5)
self.SetSizer(pmainSizer)
self.Layout()
self.charChanged(None)
@@ -610,9 +612,9 @@ class APIView (wx.Panel):
ID, key, char, chars = cChar.getApiDetails(self.Parent.Parent.getActiveCharacter())
self.inputID.SetValue(str(ID))
self.inputKey.SetValue(key)
self.charChoice.Clear()
if chars:
for charName in chars:
i = self.charChoice.Append(charName)
@@ -625,7 +627,7 @@ class APIView (wx.Panel):
self.charChoice.Enable(False)
self.btnFetchSkills.Enable(False)
if event is not None:
event.Skip()
@@ -645,7 +647,7 @@ class APIView (wx.Panel):
self.charChoice.Clear()
for charName in list:
i = self.charChoice.Append(charName)
self.btnFetchSkills.Enable(True)
self.charChoice.Enable(True)