diff --git a/eos b/eos index f5c8a2c50..7a644ce95 160000 --- a/eos +++ b/eos @@ -1 +1 @@ -Subproject commit f5c8a2c503aec8b3d6d4ef38cecabde380f5d9a9 +Subproject commit 7a644ce9518eaa6f0ed4fe829a73f3c52b4c1bd1 diff --git a/gui/builtinStatsViews/resourcesViewFull.py b/gui/builtinStatsViews/resourcesViewFull.py index 2ad4061d7..7934a7c5f 100644 --- a/gui/builtinStatsViews/resourcesViewFull.py +++ b/gui/builtinStatsViews/resourcesViewFull.py @@ -75,7 +75,7 @@ class ResourcesViewFull(StatsView): suffix = {'turret':'Hardpoints', 'launcher':'Hardpoints', 'drones':'Active', 'calibration':'Points'} lbl = wx.StaticText(parent, wx.ID_ANY, "0") setattr(self, "label%sUsed%s%s" % (panel.capitalize(), type.capitalize(), suffix[type].capitalize()), lbl) - box.Add(lbl, 0, wx.ALIGN_CENTER) + box.Add(lbl, 0, wx.ALIGN_CENTER | wx.LEFT, 5) box.Add(wx.StaticText(parent, wx.ID_ANY, "/"), 0, wx.ALIGN_CENTER) @@ -109,7 +109,7 @@ class ResourcesViewFull(StatsView): lbl = wx.StaticText(parent, wx.ID_ANY, "0") setattr(self, "label%sUsed%s" % (panel.capitalize(), capitalizedType), lbl) - absolute.Add(lbl, 0, wx.ALIGN_LEFT) + absolute.Add(lbl, 0, wx.ALIGN_LEFT | wx.LEFT, 3) absolute.Add(wx.StaticText(parent, wx.ID_ANY, "/"), 0, wx.ALIGN_LEFT) diff --git a/gui/builtinViewColumns/__init__.py b/gui/builtinViewColumns/__init__.py index a9aff35e8..f85f4bd13 100644 --- a/gui/builtinViewColumns/__init__.py +++ b/gui/builtinViewColumns/__init__.py @@ -1,5 +1,5 @@ __all__ = ["moduleState", "moduleName", "attributeDisplay", "maxRange", "name", "droneDps", "droneNameAmount", "droneCheckbox", "moduleAmmo", "capacitorUse", "activityCheckbox", "moduleAmmoIcon", "modulePrice", - "projectedName", "projectedState", "projectedAmmoIcon", "projectedAmmo", - "moduleTracking"] + "projectedName", "projectedState", "projectedAmmoIcon", + "projectedAmmo", "moduleTracking"] diff --git a/gui/characterSelection.py b/gui/characterSelection.py index 3cc0f985c..f06e85d6b 100644 --- a/gui/characterSelection.py +++ b/gui/characterSelection.py @@ -115,12 +115,12 @@ class CharacterSelection(wx.Panel): sCharacter = service.Character.getInstance() reqs = sCharacter.checkRequirements(fit) if len(reqs) == 0: + tip = "All prerequisites have been met" self.skillReqsStaticBitmap.SetBitmap(self.greenSkills) - self.skillReqsStaticBitmap.SetToolTip(None) else: tip = self._buildSkillsTooltip(reqs) self.skillReqsStaticBitmap.SetBitmap(self.redSkills) - self.skillReqsStaticBitmap.SetToolTipString(tip.strip()) + self.skillReqsStaticBitmap.SetToolTipString(tip.strip()) if newCharID == None: cChar = service.Character.getInstance() diff --git a/gui/mainFrame.py b/gui/mainFrame.py index 3ee31b015..0c5a6e268 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -112,6 +112,9 @@ class MainFrame(wx.Frame): self.SetSizer(mainSizer) + self.addTabId = wx.NewId() + self.closeTabId = wx.NewId() + #Add menu self.SetMenuBar(MainMenuBar()) #self.SetToolBar(MainToolBar(self)) @@ -169,7 +172,7 @@ class MainFrame(wx.Frame): sFit = service.Fit.getInstance() dlg=wx.FileDialog( self, - "Choose one or more fitting files to import", + "Open One Or More Fitting Files", wildcard = "EFT text fitting files (*.cfg)|*.cfg|EvE XML fitting files (*.xml)|*.xml|All Files (*)|*", style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST | wx.FD_MULTIPLE) if (dlg.ShowModal() == wx.ID_OK): @@ -186,11 +189,11 @@ class MainFrame(wx.Frame): if importCount == 1: if self.getActiveFit() != fitIDs[0]: wx.PostEvent(self, FitSelected(fitID=fitIDs[0])) - + self.shipBrowser.RefreshContent() def showExportDialog(self, event): dlg=wx.FileDialog( self, - "Choose a file to export the current fitting to", + "Save Fitting As...", wildcard = "EFT text fitting files (*.cfg)|*.cfg|EvE XML fitting files (*.xml)|*.xml", style = wx.FD_SAVE) if (dlg.ShowModal() == wx.ID_OK): @@ -246,17 +249,16 @@ class MainFrame(wx.Frame): #Clipboard exports self.Bind(wx.EVT_MENU, self.exportToClipboard, id=wx.ID_COPY) - addTabId = wx.NewId() toggleShipMarketId = wx.NewId() # Close Tab - self.Bind(wx.EVT_MENU, self.CloseCurrentFit, id=wx.ID_CLOSE) - self.Bind(wx.EVT_MENU,self.HAddTab, id = addTabId) + self.Bind(wx.EVT_MENU, self.CloseCurrentFit, id=self.closeTabId) + self.Bind(wx.EVT_MENU,self.HAddTab, id = self.addTabId) self.Bind(wx.EVT_MENU,self.toggleShipMarket, id = toggleShipMarketId) - actb = [(wx.ACCEL_CTRL, ord('T'), addTabId), - (wx.ACCEL_CMD, ord('T'), addTabId), - (wx.ACCEL_CTRL, ord("W"), wx.ID_CLOSE), - (wx.ACCEL_CMD, ord("W"), wx.ID_CLOSE), + actb = [(wx.ACCEL_CTRL, ord('T'), self.addTabId), + (wx.ACCEL_CMD, ord('T'), self.addTabId), + (wx.ACCEL_CTRL, ord("W"), self.closeTabId), + (wx.ACCEL_CMD, ord("W"), self.closeTabId), (wx.ACCEL_CTRL, ord(" "), toggleShipMarketId), (wx.ACCEL_CMD, ord(" "), toggleShipMarketId)] atable = wx.AcceleratorTable(actb) @@ -325,7 +327,7 @@ class MainFrame(wx.Frame): sFit = service.Fit.getInstance() saveDialog = wx.FileDialog( self, - "Choose where to save the backup", + "Save Backup As...", wildcard = "EvE XML fitting file (*.xml)|*.xml", style = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT) if (saveDialog.ShowModal() == wx.ID_OK): diff --git a/gui/mainMenuBar.py b/gui/mainMenuBar.py index 8619d9ede..2bddf751f 100644 --- a/gui/mainMenuBar.py +++ b/gui/mainMenuBar.py @@ -28,20 +28,24 @@ class MainMenuBar(wx.MenuBar): self.damagePatternEditorId = wx.NewId() self.backupFitsId = wx.NewId() + self.mainFrame = gui.mainFrame.MainFrame.getInstance() + wx.MenuBar.__init__(self) # File menu fileMenu = wx.Menu() self.Append(fileMenu, "&File") - if 'wxMSW' in wx.PlatformInfo: - fileMenu.Append(wx.ID_CLOSE, "&Close\tCTRL+W", "Close the currently open fit") - else: - fileMenu.Append(wx.ID_CLOSE) - fileMenu.Append(wx.ID_EXIT) + + fileMenu.Append(self.mainFrame.addTabId, "&New Tab\tCTRL+T", "Open a new fitting tab") + fileMenu.Append(self.mainFrame.closeTabId, "&Close Tab\tCTRL+W", "Close the current fit") fileMenu.AppendSeparator() + fileMenu.Append(self.backupFitsId, "&Backup fits", "Backup all fittings to a XML file") fileMenu.Append(wx.ID_OPEN, "&Import\tCTRL+O", "Import a fit into pyfa.") fileMenu.Append(wx.ID_SAVEAS, "&Export\tCTRL+S", "Export the fit to another format.") + fileMenu.AppendSeparator() + + fileMenu.Append(wx.ID_EXIT) # Edit menu @@ -79,7 +83,7 @@ class MainMenuBar(wx.MenuBar): helpMenu.Append(911,"Open Widgets Inspect tool", "Open Widgets Inspect tool") - self.mainFrame = gui.mainFrame.MainFrame.getInstance() + self.mainFrame.Bind(gui.fittingView.FIT_CHANGED, self.fitChanged) def fitChanged(self, event): diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index e146d7afc..e1485492f 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -20,6 +20,7 @@ Stage2Selected, EVT_SB_STAGE2_SEL = wx.lib.newevent.NewEvent() Stage3Selected, EVT_SB_STAGE3_SEL = wx.lib.newevent.NewEvent() SearchSelected, EVT_SB_SEARCH_SEL = wx.lib.newevent.NewEvent() + class ShipBrowser(wx.Panel): def __init__(self, parent): wx.Panel.__init__ (self, parent,style = 0 if 'wxGTK' in wx.PlatformInfo else wx.DOUBLE_BORDER) @@ -63,10 +64,16 @@ class ShipBrowser(wx.Panel): self.Bind(EVT_SB_STAGE1_SEL, self.stage1) self.Bind(EVT_SB_STAGE3_SEL, self.stage3) self.Bind(EVT_SB_SEARCH_SEL, self.searchStage) + self.mainFrame.Bind(fv.FIT_CHANGED, self.RefreshList) self.stage1(None) + def RefreshContent(self): + stage = self.GetActiveStage() + stageData = self.GetStageData(stage) + self.hpane.gotoStage(stage, stageData) + def RefreshList(self, event): stage = self.GetActiveStage() if stage == 3 or stage == 4: