diff --git a/gui/mainFrame.py b/gui/mainFrame.py index 6bef5cc4f..f9e2523a7 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -45,7 +45,7 @@ from gui.multiSwitch import MultiSwitch from gui.statsPane import StatsPane from gui.shipBrowser import ShipBrowser, FitSelected, ImportSelected, Stage3Selected from gui.characterEditor import CharacterEditor, SaveCharacterAs -from gui.crestFittings import CrestFittings, ExportToEve, CrestCharacterInfo, CrestMgmt +from gui.crestFittings import CrestFittings, ExportToEve, CrestMgmt from gui.characterSelection import CharacterSelection from gui.patternEditor import DmgPatternEditorDlg from gui.resistsEditor import ResistsEditorDlg diff --git a/gui/mainMenuBar.py b/gui/mainMenuBar.py index 6940d3cc6..0b071d534 100644 --- a/gui/mainMenuBar.py +++ b/gui/mainMenuBar.py @@ -120,6 +120,10 @@ class MainMenuBar(wx.MenuBar): crestMenu.Append(self.eveFittingsId, "Browse EVE Fittings") crestMenu.Append(self.exportToEveId, "Export To EVE") + if self.sCrest.settings.get('mode') == 0 or len(self.sCrest.getCrestCharacters()) == 0: + self.Enable(self.eveFittingsId, False) + self.Enable(self.exportToEveId, False) + # Help menu helpMenu = wx.Menu() self.Append(helpMenu, "&Help") @@ -155,7 +159,11 @@ class MainMenuBar(wx.MenuBar): def ssoLogin(self, type): if self.sCrest.settings.get('mode') == 0: self.SetLabel(self.ssoLoginId, "Logout Character") + self.Enable(self.eveFittingsId, True) + self.Enable(self.exportToEveId, True) def ssoLogout(self, message): if self.sCrest.settings.get('mode') == 0: self.SetLabel(self.ssoLoginId, "Login to EVE") + self.Enable(self.eveFittingsId, False) + self.Enable(self.exportToEveId, False) diff --git a/service/crest.py b/service/crest.py index 603120c84..16ff118eb 100644 --- a/service/crest.py +++ b/service/crest.py @@ -4,6 +4,7 @@ import logging import threading import copy import uuid +import wx from wx.lib.pubsub import pub