Remove platform-specific CREST checks (add for mac-deprecated client)
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
# noinspection PyPackageRequirements
|
||||
import wx
|
||||
|
||||
__all__ = [
|
||||
"pyfaGeneralPreferences",
|
||||
"pyfaHTMLExportPreferences",
|
||||
@@ -10,7 +7,6 @@ __all__ = [
|
||||
"pyfaLoggingPreferences",
|
||||
"pyfaEnginePreferences",
|
||||
"pyfaStatViewPreferences",
|
||||
"pyfaCrestPreferences"
|
||||
]
|
||||
|
||||
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
|
||||
__all__.append("pyfaCrestPreferences")
|
||||
|
||||
@@ -11,8 +11,7 @@ from service.settings import CRESTSettings
|
||||
# noinspection PyPackageRequirements
|
||||
from wx.lib.intctrl import IntCtrl
|
||||
|
||||
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
|
||||
from service.crest import Crest
|
||||
from service.crest import Crest
|
||||
|
||||
|
||||
class PFCrestPref(PreferenceView):
|
||||
|
||||
@@ -684,12 +684,12 @@ class FittingView(d.Display):
|
||||
self.Thaw()
|
||||
self.itemCount = self.GetItemCount()
|
||||
|
||||
if 'wxMac' in wx.PlatformInfo:
|
||||
try:
|
||||
self.MakeSnapshot()
|
||||
except Exception as e:
|
||||
pyfalog.critical("Failed to make snapshot")
|
||||
pyfalog.critical(e)
|
||||
# if 'wxMac' in wx.PlatformInfo:
|
||||
# try:
|
||||
# self.MakeSnapshot()
|
||||
# except Exception as e:
|
||||
# pyfalog.critical("Failed to make snapshot")
|
||||
# pyfalog.critical(e)
|
||||
|
||||
def OnShow(self, event):
|
||||
pass
|
||||
|
||||
@@ -18,8 +18,7 @@ from logbook import Logger
|
||||
import calendar
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
|
||||
from service.crest import Crest, CrestModes
|
||||
from service.crest import Crest, CrestModes
|
||||
|
||||
|
||||
class CrestFittings(wx.Frame):
|
||||
|
||||
@@ -81,10 +81,10 @@ from time import gmtime, strftime
|
||||
import threading
|
||||
import webbrowser
|
||||
import wx.adv
|
||||
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
|
||||
from service.crest import Crest
|
||||
from service.crest import CrestModes
|
||||
from gui.crestFittings import CrestFittings, ExportToEve, CrestMgmt
|
||||
|
||||
from service.crest import Crest
|
||||
from service.crest import CrestModes
|
||||
from gui.crestFittings import CrestFittings, ExportToEve, CrestMgmt
|
||||
|
||||
disableOverrideEditor = False
|
||||
|
||||
@@ -236,9 +236,8 @@ class MainFrame(wx.Frame):
|
||||
self.sUpdate = Update.getInstance()
|
||||
self.sUpdate.CheckUpdate(self.ShowUpdateBox)
|
||||
|
||||
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
|
||||
self.Bind(GE.EVT_SSO_LOGIN, self.onSSOLogin)
|
||||
self.Bind(GE.EVT_SSO_LOGOUT, self.onSSOLogout)
|
||||
self.Bind(GE.EVT_SSO_LOGIN, self.onSSOLogin)
|
||||
self.Bind(GE.EVT_SSO_LOGOUT, self.onSSOLogout)
|
||||
|
||||
self.titleTimer = wx.Timer(self)
|
||||
self.Bind(wx.EVT_TIMER, self.updateTitle, self.titleTimer)
|
||||
|
||||
@@ -30,9 +30,8 @@ from gui.bitmap_loader import BitmapLoader
|
||||
from logbook import Logger
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
|
||||
from service.crest import Crest
|
||||
from service.crest import CrestModes
|
||||
from service.crest import Crest
|
||||
from service.crest import CrestModes
|
||||
|
||||
|
||||
class MainMenuBar(wx.MenuBar):
|
||||
@@ -61,6 +60,7 @@ class MainMenuBar(wx.MenuBar):
|
||||
self.toggleIgnoreRestrictionID = wx.NewId()
|
||||
self.devToolsId = wx.NewId()
|
||||
|
||||
# pheonix: evaluate if this is needed
|
||||
if 'wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0):
|
||||
wx.ID_COPY = wx.NewId()
|
||||
wx.ID_PASTE = wx.NewId()
|
||||
@@ -134,29 +134,28 @@ class MainMenuBar(wx.MenuBar):
|
||||
preferencesItem.SetBitmap(BitmapLoader.getBitmap("preferences_small", "gui"))
|
||||
windowMenu.Append(preferencesItem)
|
||||
|
||||
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
|
||||
self.sCrest = Crest.getInstance()
|
||||
self.sCrest = Crest.getInstance()
|
||||
|
||||
# CREST Menu
|
||||
crestMenu = wx.Menu()
|
||||
self.Append(crestMenu, "&CREST")
|
||||
if self.sCrest.settings.get('mode') != CrestModes.IMPLICIT:
|
||||
crestMenu.Append(self.ssoLoginId, "Manage Characters")
|
||||
else:
|
||||
crestMenu.Append(self.ssoLoginId, "Login to EVE")
|
||||
crestMenu.Append(self.eveFittingsId, "Browse EVE Fittings")
|
||||
crestMenu.Append(self.exportToEveId, "Export To EVE")
|
||||
# CREST Menu
|
||||
crestMenu = wx.Menu()
|
||||
self.Append(crestMenu, "&CREST")
|
||||
if self.sCrest.settings.get('mode') != CrestModes.IMPLICIT:
|
||||
crestMenu.Append(self.ssoLoginId, "Manage Characters")
|
||||
else:
|
||||
crestMenu.Append(self.ssoLoginId, "Login to EVE")
|
||||
crestMenu.Append(self.eveFittingsId, "Browse EVE Fittings")
|
||||
crestMenu.Append(self.exportToEveId, "Export To EVE")
|
||||
|
||||
if self.sCrest.settings.get('mode') == CrestModes.IMPLICIT or len(self.sCrest.getCrestCharacters()) == 0:
|
||||
self.Enable(self.eveFittingsId, False)
|
||||
self.Enable(self.exportToEveId, False)
|
||||
if self.sCrest.settings.get('mode') == CrestModes.IMPLICIT or len(self.sCrest.getCrestCharacters()) == 0:
|
||||
self.Enable(self.eveFittingsId, False)
|
||||
self.Enable(self.exportToEveId, False)
|
||||
|
||||
if not self.mainFrame.disableOverrideEditor:
|
||||
windowMenu.AppendSeparator()
|
||||
attrItem = wx.MenuItem(windowMenu, self.attrEditorId, "Attribute Overrides\tCTRL+B")
|
||||
attrItem.SetBitmap(BitmapLoader.getBitmap("fit_rename_small", "gui"))
|
||||
windowMenu.Append(attrItem)
|
||||
windowMenu.Append(self.toggleOverridesId, "Turn Overrides On")
|
||||
if not self.mainFrame.disableOverrideEditor:
|
||||
windowMenu.AppendSeparator()
|
||||
attrItem = wx.MenuItem(windowMenu, self.attrEditorId, "Attribute Overrides\tCTRL+B")
|
||||
attrItem.SetBitmap(BitmapLoader.getBitmap("fit_rename_small", "gui"))
|
||||
windowMenu.Append(attrItem)
|
||||
windowMenu.Append(self.toggleOverridesId, "Turn Overrides On")
|
||||
|
||||
# Help menu
|
||||
helpMenu = wx.Menu()
|
||||
|
||||
13
pyfa.py
13
pyfa.py
@@ -371,13 +371,12 @@ if __name__ == "__main__":
|
||||
# if int(logVersion[0]) == 0 and int(logVersion[1]) < 10:
|
||||
# raise PreCheckException("Logbook version >= 0.10.0 is required.")
|
||||
|
||||
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
|
||||
try:
|
||||
import requests
|
||||
config.requestsVersion = requests.__version__
|
||||
except ImportError:
|
||||
pass
|
||||
# raise PreCheckException("Cannot import requests. You can download requests from https://pypi.python.org/pypi/requests.")
|
||||
try:
|
||||
import requests
|
||||
config.requestsVersion = requests.__version__
|
||||
except ImportError:
|
||||
pass
|
||||
# raise PreCheckException("Cannot import requests. You can download requests from https://pypi.python.org/pypi/requests.")
|
||||
|
||||
import eos.db
|
||||
|
||||
|
||||
@@ -49,8 +49,7 @@ from service.market import Market
|
||||
from utils.strfunctions import sequential_rep, replace_ltgt
|
||||
from abc import ABCMeta, abstractmethod
|
||||
|
||||
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
|
||||
from service.crest import Crest
|
||||
from service.crest import Crest
|
||||
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user