Add a ton of default values

This commit is contained in:
Ebag333
2017-02-09 00:56:33 -08:00
parent f2c84692a9
commit 7865219164
27 changed files with 104 additions and 7 deletions

View File

@@ -30,6 +30,9 @@ class PriceViewFull(StatsView):
def __init__(self, parent):
StatsView.__init__(self)
self.labelPriceTotal = None
self.labelPriceFittings = None
self.labelPriceShip = None
self.parent = parent
self._cachedShip = 0
self._cachedFittings = 0

View File

@@ -35,6 +35,8 @@ import gui.builtinViews.emptyView
from gui.utils.exportHtml import exportHtml
from logging import getLogger
from gui.chromeTabs import EVT_NOTEBOOK_PAGE_CHANGED
from service.fit import Fit
from service.market import Market
@@ -160,7 +162,7 @@ class FittingView(d.Display):
self.Bind(wx.EVT_SHOW, self.OnShow)
self.Bind(wx.EVT_MOTION, self.OnMouseMove)
self.Bind(wx.EVT_LEAVE_WINDOW, self.OnLeaveWindow)
self.parent.Bind(gui.chromeTabs.EVT_NOTEBOOK_PAGE_CHANGED, self.pageChanged)
self.parent.Bind(EVT_NOTEBOOK_PAGE_CHANGED, self.pageChanged)
def OnLeaveWindow(self, event):
self.SetToolTip(None)
@@ -209,7 +211,7 @@ class FittingView(d.Display):
wx.PostEvent(self.mainFrame, gui.shipBrowser.FitSelected(fitID=fitID))
def Destroy(self):
self.parent.Unbind(gui.chromeTabs.EVT_NOTEBOOK_PAGE_CHANGED, handler=self.pageChanged)
self.parent.Unbind(EVT_NOTEBOOK_PAGE_CHANGED, handler=self.pageChanged)
self.mainFrame.Unbind(GE.FIT_CHANGED, handler=self.fitChanged)
self.mainFrame.Unbind(gui.shipBrowser.EVT_FIT_RENAMED, handler=self.fitRenamed)
self.mainFrame.Unbind(gui.shipBrowser.EVT_FIT_REMOVED, handler=self.fitRemoved)

View File

@@ -26,6 +26,8 @@ from gui.cachingImageList import CachingImageList
class Display(wx.ListCtrl):
DEFAULT_COLS = None
def __init__(self, parent, size=wx.DefaultSize, style=0):
wx.ListCtrl.__init__(self, parent, size=size, style=wx.LC_REPORT | style)

View File

@@ -90,6 +90,7 @@ if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION
disableOverrideEditor = False
except ImportError as e:
AttributeEditor = None
print("Error loading Attribute Editor: %s.\nAccess to Attribute Editor is disabled." % e.message)
disableOverrideEditor = True

View File

@@ -55,6 +55,8 @@ class DmgPatternTextValidor(BaseValidator):
class DmgPatternEntityEditor(EntityEditor):
def __init__(self, parent):
EntityEditor.__init__(self, parent, "Damage Profile")
self.btnDelete = None
self.btnRename = None
self.SetEditorValidator(DmgPatternTextValidor)
def getEntitiesFromContext(self):

View File

@@ -19,6 +19,7 @@
class StatsView(object):
name = None
views = {}
def __init__(self):

View File

@@ -27,6 +27,7 @@ class ViewColumn(object):
Once the missing methods are correctly implemented,
they can be used as columns in a view.
"""
name = None
columns = {}
def __init__(self, fittingView):