From 370b58d500135d130a233f1aa7db7a650ea27ec0 Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Sun, 26 Feb 2017 12:42:39 -0800 Subject: [PATCH] Changes required to implement the remote reps pane --- gui/builtinPreferenceViews/pyfaStatViewPreferences.py | 7 +++++++ gui/builtinStatsViews/outgoingViewMinimal.py | 2 +- gui/statsPane.py | 2 +- service/settings.py | 3 ++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gui/builtinPreferenceViews/pyfaStatViewPreferences.py b/gui/builtinPreferenceViews/pyfaStatViewPreferences.py index 601e135f6..628333065 100644 --- a/gui/builtinPreferenceViews/pyfaStatViewPreferences.py +++ b/gui/builtinPreferenceViews/pyfaStatViewPreferences.py @@ -97,6 +97,10 @@ class PFStatViewPref(PreferenceView): rbSizerRow3.Add(self.rbPrice, 1, wx.TOP | wx.RIGHT, 5) self.rbPrice.Bind(wx.EVT_RADIOBOX, self.OnPriceChange) + self.rbOutgoing = wx.RadioBox(panel, -1, "Remote Reps", wx.DefaultPosition, wx.DefaultSize, ['None', 'Minimal', 'Full'], 1, wx.RA_SPECIFY_COLS) + self.rbOutgoing.SetSelection(self.settings.get('outgoing')) + rbSizerRow3.Add(self.rbOutgoing, 1, wx.TOP | wx.RIGHT, 5) + self.rbOutgoing.Bind(wx.EVT_RADIOBOX, self.OnOutgoingChange) # We don't have views for these.....yet ''' self.rbMining = wx.RadioBox(panel, -1, "Mining", wx.DefaultPosition, wx.DefaultSize, @@ -138,6 +142,9 @@ class PFStatViewPref(PreferenceView): def OnPriceChange(self, event): self.settings.set('price', event.GetInt()) + def OnOutgoingChange(self, event): + self.settings.set('outgoing', event.GetInt()) + def OnMiningYieldChange(self, event): self.settings.set('miningyield', event.GetInt()) diff --git a/gui/builtinStatsViews/outgoingViewMinimal.py b/gui/builtinStatsViews/outgoingViewMinimal.py index 346aacc7a..5df6140e7 100644 --- a/gui/builtinStatsViews/outgoingViewMinimal.py +++ b/gui/builtinStatsViews/outgoingViewMinimal.py @@ -25,7 +25,7 @@ from gui.utils.numberFormatter import formatAmount class OutgoingViewFull(StatsView): - name = "outgoingViewFull" + name = "outgoingViewMinimal" def __init__(self, parent): StatsView.__init__(self) diff --git a/gui/statsPane.py b/gui/statsPane.py index 181d8f9c5..ce09e2e62 100644 --- a/gui/statsPane.py +++ b/gui/statsPane.py @@ -40,7 +40,7 @@ class StatsPane(wx.Panel): "resistances", "recharge", "firepower", - "outgoingView", + "outgoing", "capacitor", "targetingMisc", "price", diff --git a/service/settings.py b/service/settings.py index 8c058e203..f3d6a9376 100644 --- a/service/settings.py +++ b/service/settings.py @@ -370,7 +370,8 @@ class StatViewSettings(object): "targetingMisc": 1, "price" : 2, "miningyield" : 2, - "drones" : 2 + "drones" : 2, + "outgoing" : 2, } # We don't have these....yet