Full complete rework of the columnViews, Every column should now work

regardless if the type of view it was put in.
This commit is contained in:
cncfanatics
2010-11-11 15:49:05 +01:00
parent 67058d37e7
commit ea66f6f147
30 changed files with 300 additions and 591 deletions

View File

@@ -37,12 +37,19 @@ class Display(wx.ListCtrl):
i = 0
for colName in self.DEFAULT_COLS:
if colName[0:5] == "attr:":
attrName = colName[5:]
params = {"showIcon": True,
"displayName": False,
"attribute": attrName}
col = ViewColumn.getColumn("Attribute Display")(self, params)
if ":" in colName:
colName, params = colName.split(":", 1)
params = params.split(",")
colClass = ViewColumn.getColumn(colName)
paramList = colClass.getParameters()
paramDict = {}
for x, param in enumerate(paramList):
name, type, defaultValue = param
value = params[x] if len(params) > x else defaultValue
if type == bool:
value = bool(value) if value != "False" else False
paramDict[name] = value
col = colClass(self, paramDict)
else:
col = ViewColumn.getColumn(colName)(self, None)