diff --git a/gui/mainMenuBar.py b/gui/mainMenuBar.py index de860385e..deef10b22 100644 --- a/gui/mainMenuBar.py +++ b/gui/mainMenuBar.py @@ -73,87 +73,91 @@ class MainMenuBar(wx.MenuBar): fileMenu.Append(self.mainFrame.addPageId, "&New Tab\tCTRL+T", "Open a new fitting tab") fileMenu.Append(self.mainFrame.closePageId, "&Close Tab\tCTRL+W", "Close the current fit") - fileMenu.AppendSeparator() - fileMenu.Append(self.backupFitsId, "&Backup All Fittings", "Backup all fittings to a XML file") - fileMenu.Append(wx.ID_OPEN, "&Import Fittings\tCTRL+O", "Import fittings into pyfa") - fileMenu.Append(wx.ID_SAVEAS, "&Export Fitting\tCTRL+S", "Export fitting to another format") fileMenu.AppendSeparator() - fileMenu.Append(self.exportHtmlId, "Export HTML", "Export fits to HTML file (set in Preferences)") - fileMenu.Append(self.exportSkillsNeededId, "Export &Skills Needed", "Export skills needed for this fitting") - fileMenu.Append(self.importCharacterId, "Import C&haracter File", "Import characters into pyfa from file") + fileMenu.Append(self.backupFitsId, "&Backup All Fittings", "Backup all fittings to a XML file") + fileMenu.Append(self.exportHtmlId, "Export All Fittings to &HTML", "Export fits to HTML file (set in Preferences)") + fileMenu.AppendSeparator() fileMenu.Append(wx.ID_EXIT) - # Edit menu - editMenu = wx.Menu() - self.Append(editMenu, "&Edit") + # Fit menu + fitMenu = wx.Menu() + self.Append(fitMenu, "Fi&t") - editMenu.Append(wx.ID_UNDO) - editMenu.Append(wx.ID_REDO) + fitMenu.Append(wx.ID_UNDO) + fitMenu.Append(wx.ID_REDO) - editMenu.Append(wx.ID_COPY, "To Clipboard\tCTRL+C", "Export a fit to the clipboard") - editMenu.Append(wx.ID_PASTE, "From Clipboard\tCTRL+V", "Import a fit from the clipboard") - editMenu.AppendSeparator() - editMenu.Append(self.saveCharId, "Save Character") - editMenu.Append(self.saveCharAsId, "Save Character As...") - editMenu.Append(self.revertCharId, "Revert Character") - editMenu.AppendSeparator() - self.ignoreRestrictionItem = editMenu.Append(self.toggleIgnoreRestrictionID, "Ignore Fitting Restrictions") - editMenu.AppendSeparator() - editMenu.Append(self.optimizeFitPrice, "Optimize Fit Price") + fitMenu.AppendSeparator() + fitMenu.Append(wx.ID_COPY, "To Clipboard\tCTRL+C", "Export a fit to the clipboard") + fitMenu.Append(wx.ID_PASTE, "From Clipboard\tCTRL+V", "Import a fit from the clipboard") + fitMenu.AppendSeparator() + fitMenu.Append(wx.ID_OPEN, "&Import Fittings\tCTRL+O", "Import fittings into pyfa") + fitMenu.Append(wx.ID_SAVEAS, "&Export Fitting\tCTRL+S", "Export fitting to another format") - # Character menu - windowMenu = wx.Menu() - self.Append(windowMenu, "&Window") - - charEditItem = wx.MenuItem(windowMenu, self.characterEditorId, "&Character Editor\tCTRL+E") - charEditItem.SetBitmap(BitmapLoader.getBitmap("character_small", "gui")) - windowMenu.Append(charEditItem) - - damagePatternEditItem = wx.MenuItem(windowMenu, self.damagePatternEditorId, "Damage Pattern Editor\tCTRL+D") - damagePatternEditItem.SetBitmap(BitmapLoader.getBitmap("damagePattern_small", "gui")) - windowMenu.Append(damagePatternEditItem) - - targetResistsEditItem = wx.MenuItem(windowMenu, self.targetResistsEditorId, "Target Resists Editor\tCTRL+R") - targetResistsEditItem.SetBitmap(BitmapLoader.getBitmap("explosive_small", "gui")) - windowMenu.Append(targetResistsEditItem) - - implantSetEditItem = wx.MenuItem(windowMenu, self.implantSetEditorId, "Implant Set Editor\tCTRL+I") - implantSetEditItem.SetBitmap(BitmapLoader.getBitmap("hardwire_small", "gui")) - windowMenu.Append(implantSetEditItem) - - graphFrameItem = wx.MenuItem(windowMenu, self.graphFrameId, "Graphs\tCTRL+G") + fitMenu.AppendSeparator() + fitMenu.Append(self.optimizeFitPrice, "Optimize Fit Price") + graphFrameItem = wx.MenuItem(fitMenu, self.graphFrameId, "Graphs\tCTRL+G") graphFrameItem.SetBitmap(BitmapLoader.getBitmap("graphs_small", "gui")) - windowMenu.Append(graphFrameItem) - + fitMenu.Append(graphFrameItem) if not gui.graphFrame.graphFrame_enabled: self.Enable(self.graphFrameId, False) + self.ignoreRestrictionItem = fitMenu.Append(self.toggleIgnoreRestrictionID, "Ignore Fitting Restrictions") - preferencesShortCut = "CTRL+," if 'wxMac' in wx.PlatformInfo else "CTRL+P" - preferencesItem = wx.MenuItem(windowMenu, wx.ID_PREFERENCES, "Preferences\t" + preferencesShortCut) - preferencesItem.SetBitmap(BitmapLoader.getBitmap("preferences_small", "gui")) - windowMenu.Append(preferencesItem) - - # CREST Menu - esiMMenu = wx.Menu() - self.Append(esiMMenu, "EVE &SSO") - - esiMMenu.Append(self.ssoLoginId, "Manage Characters") - esiMMenu.Append(self.eveFittingsId, "Browse EVE Fittings") - esiMMenu.Append(self.exportToEveId, "Export To EVE") - - # if self.sEsi.settings.get('mode') == CrestModes.IMPLICIT or len(self.sEsi.getCrestCharacters()) == 0: + fitMenu.AppendSeparator() + fitMenu.Append(self.eveFittingsId, "Browse ESI Fittings") + fitMenu.Append(self.exportToEveId, "Export to ESI") self.Enable(self.eveFittingsId, True) self.Enable(self.exportToEveId, True) + # Character menu + characterMenu = wx.Menu() + self.Append(characterMenu, "&Character") + + characterMenu.Append(self.saveCharId, "Save Character") + characterMenu.Append(self.saveCharAsId, "Save Character As...") + characterMenu.Append(self.revertCharId, "Revert Character") + + characterMenu.AppendSeparator() + characterMenu.Append(self.importCharacterId, "Import C&haracter File", "Import characters into pyfa from file") + characterMenu.Append(self.exportSkillsNeededId, "Export &Skills Needed", "Export skills needed for this fitting") + + characterMenu.AppendSeparator() + characterMenu.Append(self.ssoLoginId, "Manage ESI Characters") + + # Global Menu + globalMenu = wx.Menu() + if not self.mainFrame.disableOverrideEditor: - windowMenu.AppendSeparator() - attrItem = wx.MenuItem(windowMenu, self.attrEditorId, "Attribute Overrides\tCTRL+B") + attrItem = wx.MenuItem(globalMenu, self.attrEditorId, "Attribute Overrides\tCTRL+B") attrItem.SetBitmap(BitmapLoader.getBitmap("fit_rename_small", "gui")) - windowMenu.Append(attrItem) - windowMenu.Append(self.toggleOverridesId, "Turn Overrides On") + globalMenu.Append(attrItem) + globalMenu.Append(self.toggleOverridesId, "Turn Overrides On") + globalMenu.AppendSeparator() + + + self.Append(globalMenu, "&Global") + preferencesShortCut = "CTRL+," if 'wxMac' in wx.PlatformInfo else "CTRL+P" + preferencesItem = wx.MenuItem(globalMenu, wx.ID_PREFERENCES, "Preferences\t" + preferencesShortCut) + preferencesItem.SetBitmap(BitmapLoader.getBitmap("preferences_small", "gui")) + globalMenu.Append(preferencesItem) + + # Editors menu + editorsMenu = wx.Menu() + self.Append(editorsMenu, "&Editors") + charEditItem = wx.MenuItem(editorsMenu, self.characterEditorId, "&Character Editor\tCTRL+E") + charEditItem.SetBitmap(BitmapLoader.getBitmap("character_small", "gui")) + editorsMenu.Append(charEditItem) + implantSetEditItem = wx.MenuItem(editorsMenu, self.implantSetEditorId, "Implant Set Editor\tCTRL+I") + implantSetEditItem.SetBitmap(BitmapLoader.getBitmap("hardwire_small", "gui")) + editorsMenu.Append(implantSetEditItem) + damagePatternEditItem = wx.MenuItem(editorsMenu, self.damagePatternEditorId, "Damage Pattern Editor\tCTRL+D") + damagePatternEditItem.SetBitmap(BitmapLoader.getBitmap("damagePattern_small", "gui")) + editorsMenu.Append(damagePatternEditItem) + targetResistsEditItem = wx.MenuItem(editorsMenu, self.targetResistsEditorId, "Target Resists Editor\tCTRL+R") + targetResistsEditItem.SetBitmap(BitmapLoader.getBitmap("explosive_small", "gui")) + editorsMenu.Append(targetResistsEditItem) # Help menu helpMenu = wx.Menu()