--- a/plugger.py Sun Dec 09 19:01:21 2007 +0100
+++ b/plugger.py Mon Dec 10 11:04:52 2007 +0100
@@ -464,7 +464,10 @@
if getattr(PlugClass, "__init__", None):
PlugClass.__init__(_self)
+ def _getBuildPath(_self): + return self._getBuildPath() # Create the object out of the resulting class
newPluginOpj = FinalPlugClass()
# Store it in PluggedChils
--- a/plugins/canfestival/canfestival.py Sun Dec 09 19:01:21 2007 +0100
+++ b/plugins/canfestival/canfestival.py Mon Dec 10 11:04:52 2007 +0100
@@ -7,8 +7,13 @@
from nodemanager import NodeManager
import config_utils, gen_cfile
from networkedit import networkedit
+from objdictedit import objdictedit import canfestival_config
+from gnosis.xml.pickle import * +from gnosis.xml.pickle.util import setParanoia class _NetworkEdit(networkedit):
" Overload some of CanFestival Network Editor methods "
def OnCloseFrame(self, event):
@@ -50,11 +55,29 @@
self._View._onsave = _onsave
+ def _ShowMasterGenerated(self, logger): + buildpath = self._getBuildPath() + # Eventually create build dir + if not os.path.exists(buildpath): + logger.write_error("Error: No PLC built\n") + masterpath = os.path.join(buildpath, "MasterGenerated.od") + if not os.path.exists(masterpath): + logger.write_error("Error: No Master generated\n") + new_dialog = objdictedit(None, [masterpath]) {"bitmap" : os.path.join("images", "NetworkEdit.png"),
"tooltip" : "Edit CanOpen Network with NetworkEdit",
+ {"name" : "Show Master", + "tooltip" : "Show Master generated by config_utils", + "method" : _ShowMasterGenerated} @@ -92,6 +115,10 @@
+ file = open(os.path.join(buildpath, "MasterGenerated.od"), "w") return [(Gen_OD_path,canfestival_config.getCFLAGS(CanFestivalPath))],"",False