--- a/plugger.py Mon Dec 10 23:23:19 2007 +0100
+++ b/plugger.py Thu Dec 20 16:36:14 2007 +0100
@@ -122,7 +122,7 @@
return self.PlugParams[1].getElementInfos(parts[0], parts[1])
else:
params = []
- if self.MandatoryParams:
+ if wx.VERSION < (2, 8, 0) and self.MandatoryParams:
params.append(self.MandatoryParams[1].getElementInfos(self.MandatoryParams[0]))
if self.PlugParams:
params.append(self.PlugParams[1].getElementInfos(self.PlugParams[0]))
@@ -307,7 +307,10 @@
# reorder childs by IEC_channels
for child in self.IECSortedChilds():
childs.append(child.GetPlugInfos())
- return {"name" : "%d-%s"%(self.BaseParams.getIEC_Channel(),self.BaseParams.getName()), "type" : self.BaseParams.getName(), "values" : childs}
+ if wx.VERSION < (2, 8, 0):
+ return {"name" : "%d-%s"%(self.BaseParams.getIEC_Channel(),self.BaseParams.getName()), "type" : self.BaseParams.getName(), "values" : childs}
+ else:
+ return {"name" : self.BaseParams.getName(), "channel" : self.BaseParams.getIEC_Channel(), "enabled" : self.BaseParams.getEnabled(), "parent" : len(self.PlugChildsTypes) > 0, "type" : self.BaseParams.getName(), "values" : childs}
def FindNewName(self, DesiredName, logger):
"""
@@ -977,23 +980,23 @@
logger.write_error("Not impl\n")
PluginMethods = [
- {"bitmap" : os.path.join("images", "editPLC.png"),
+ {"bitmap" : os.path.join("images", "editPLC"),
"name" : "Edit PLC",
"tooltip" : "Edit PLC program with PLCOpenEditor",
"method" : _EditPLC},
- {"bitmap" : os.path.join("images", "Build.png"),
+ {"bitmap" : os.path.join("images", "Build"),
"name" : "Build",
"tooltip" : "Build project into build folder",
"method" : _build},
- {"bitmap" : os.path.join("images", "Clean.png"),
+ {"bitmap" : os.path.join("images", "Clean"),
"name" : "Clean",
"tooltip" : "Clean project build folder",
"method" : _Clean},
- {"bitmap" : os.path.join("images", "Run.png"),
+ {"bitmap" : os.path.join("images", "Run"),
"name" : "Run",
"tooltip" : "Run PLC from build folder",
"method" : _Run},
- {"bitmap" : os.path.join("images", "ShowIECcode.png"),
+ {"bitmap" : os.path.join("images", "ShowIECcode"),
"name" : "Show IEC code",
"tooltip" : "Show IEC code generated by PLCGenerator",
"method" : _showIECcode},