Add some logic to disable from CREST menu items if character is not logged in
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -4,6 +4,7 @@ import logging
|
||||
import threading
|
||||
import copy
|
||||
import uuid
|
||||
import wx
|
||||
|
||||
from wx.lib.pubsub import pub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user