MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / populatePanel

Method populatePanel

gui/builtinPreferenceViews/pyfaEsiPreferences.py:17–83  ·  view source on GitHub ↗
(self, panel)

Source from the content-addressed store, hash-verified

15class PFEsiPref(PreferenceView):
16
17 def populatePanel(self, panel):
18 self.title = _t("EVE SSO")
19 self.mainFrame = gui.mainFrame.MainFrame.getInstance()
20 self.settings = EsiSettings.getInstance()
21 self.dirtySettings = False
22 dlgWidth = panel.GetParent().GetParent().ClientSize.width
23 mainSizer = wx.BoxSizer(wx.VERTICAL)
24
25 self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
26 self.stTitle.Wrap(-1)
27 self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
28 mainSizer.Add(self.stTitle, 0, wx.EXPAND | wx.ALL, 5)
29
30 self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
31 mainSizer.Add(self.m_staticline1, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
32
33 self.stInfo = wx.StaticText(panel, wx.ID_ANY,
34 _t("Please see the pyfa wiki on GitHub for information regarding these options."),
35 wx.DefaultPosition, wx.DefaultSize, 0)
36 self.stInfo.Wrap(dlgWidth - 50)
37 mainSizer.Add(self.stInfo, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
38
39 self.enforceJwtExpiration = wx.CheckBox(panel, wx.ID_ANY, _t("Enforce Token Expiration"), wx.DefaultPosition,
40 wx.DefaultSize,
41 0)
42 self.enforceJwtExpiration.SetToolTip(wx.ToolTip(_t("This option is a workaround in case you cannot log into EVE SSO "
43 "due to 'Signature has expired' error")))
44 mainSizer.Add(self.enforceJwtExpiration, 0, wx.ALL | wx.EXPAND, 5)
45
46 self.ssoServer = wx.CheckBox(panel, wx.ID_ANY, _t("Auto-login (starts local server)"), wx.DefaultPosition,
47 wx.DefaultSize,
48 0)
49 self.ssoServer.SetToolTip(wx.ToolTip(_t("This allows the EVE SSO to callback to your local pyfa instance and complete the authentication process without manual intervention.")))
50 mainSizer.Add(self.ssoServer, 0, wx.ALL | wx.EXPAND, 5)
51
52 rbSizer = wx.BoxSizer(wx.HORIZONTAL)
53
54 self.enforceJwtExpiration.SetValue(self.settings.get("enforceJwtExpiration") or True)
55 self.ssoServer.SetValue(True if self.settings.get("loginMode") == 0 else False)
56
57 mainSizer.Add(rbSizer, 0, wx.ALL | wx.EXPAND, 0)
58
59 esiSizer = wx.BoxSizer(wx.HORIZONTAL)
60
61 self.esiServer = wx.StaticText(panel, wx.ID_ANY, _t("Default SSO Server:"), wx.DefaultPosition, wx.DefaultSize, 0)
62
63 self.esiServer.Wrap(-1)
64
65 esiSizer.Add(self.esiServer, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
66
67 self.esiServer.SetToolTip(wx.ToolTip(_t('The source you choose will be used on connection.')))
68
69 self.chESIserver = wx.Choice(panel, choices=list(self.settings.keys()))
70
71 self.chESIserver.SetStringSelection(self.settings.get("server"))
72
73 esiSizer.Add(self.chESIserver, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 10)
74

Callers

nothing calls this directly

Calls 5

_tFunction · 0.50
getInstanceMethod · 0.45
SetValueMethod · 0.45
getMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected