draft of misc patches for main branch

This commit is contained in:
Maru Maru
2018-07-11 12:05:57 -04:00
parent da5893ac91
commit 7a078f433a
8 changed files with 152 additions and 12 deletions

View File

@@ -34,6 +34,10 @@ class PFGeneralPref(PreferenceView):
self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
mainSizer.Add(self.m_staticline1, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
self.cbDefaultCharImplants = wx.CheckBox(panel, wx.ID_ANY, "Have new fits default to character implants",
wx.DefaultPosition, wx.DefaultSize, 0)
mainSizer.Add(self.cbDefaultCharImplants, 0, wx.ALL | wx.EXPAND, 5)
self.cbGlobalChar = wx.CheckBox(panel, wx.ID_ANY, "Use global character", wx.DefaultPosition, wx.DefaultSize,
0)
mainSizer.Add(self.cbGlobalChar, 0, wx.ALL | wx.EXPAND, 5)
@@ -118,6 +122,7 @@ class PFGeneralPref(PreferenceView):
self.sFit = Fit.getInstance()
self.cbDefaultCharImplants.SetValue(self.sFit.serviceFittingOptions["useCharecterImplantsByDefault"])
self.cbGlobalChar.SetValue(self.sFit.serviceFittingOptions["useGlobalCharacter"])
self.cbGlobalDmgPattern.SetValue(self.sFit.serviceFittingOptions["useGlobalDamagePattern"])
self.cbFitColorSlots.SetValue(self.sFit.serviceFittingOptions["colorFitBySlot"] or False)
@@ -135,6 +140,7 @@ class PFGeneralPref(PreferenceView):
self.cbShowShipBrowserTooltip.SetValue(self.sFit.serviceFittingOptions["showShipBrowserTooltip"])
self.intDelay.SetValue(self.sFit.serviceFittingOptions["marketSearchDelay"])
self.cbDefaultCharImplants.Bind(wx.EVT_CHECKBOX, self.OnCBDefaultCharImplantsStateChange)
self.cbGlobalChar.Bind(wx.EVT_CHECKBOX, self.OnCBGlobalCharStateChange)
self.cbGlobalDmgPattern.Bind(wx.EVT_CHECKBOX, self.OnCBGlobalDmgPatternStateChange)
self.cbFitColorSlots.Bind(wx.EVT_CHECKBOX, self.onCBGlobalColorBySlot)
@@ -183,6 +189,10 @@ class PFGeneralPref(PreferenceView):
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
event.Skip()
def OnCBDefaultCharImplantsStateChange(self, event):
self.sFit.serviceFittingOptions["useCharecterImplantsByDefault"] = self.cbDefaultCharImplants.GetValue()
event.Skip()
def OnCBGlobalCharStateChange(self, event):
self.sFit.serviceFittingOptions["useGlobalCharacter"] = self.cbGlobalChar.GetValue()
event.Skip()