Use some new stuff in eos meaning we don't have to do any effort to get names of

constants in enums
This commit is contained in:
cncfanatics
2010-10-13 19:20:37 +02:00
parent d3456ec785
commit 77d1ade1fe
3 changed files with 4 additions and 17 deletions

View File

@@ -29,12 +29,6 @@ class ModuleState(ViewColumn):
self.resizable = False
self.size = 20
self.stateNameMap = {}
for state in State.__dict__:
if state[0:2] == "__":
continue
id = State.__dict__[state]
self.stateNameMap[id] = state.lower()
def getText(self, mod):
return ""
@@ -43,7 +37,7 @@ class ModuleState(ViewColumn):
if mod.isEmpty:
return -1
else:
bitmap = bitmapLoader.getBitmap("state_%s_small" % self.stateNameMap[mod.state], "icons")
bitmap = bitmapLoader.getBitmap("state_%s_small" % State.getName(mod.state).lower(), "icons")
return self.fittingView.imageList.Add(bitmap)
ModuleState.register()