--- a/confnodes/python/modules/svgui/svgui.py Mon May 07 18:47:29 2012 +0200
+++ b/confnodes/python/modules/svgui/svgui.py Mon May 07 19:19:08 2012 +0200
@@ -22,16 +22,16 @@
]
def ConfNodePath(self):
- return os.path.join(self.PlugParent.ConfNodePath(), "modules", self.PlugType)
+ return os.path.join(self.CTNParent.ConfNodePath(), "modules", self.CTNType)
def _getSVGpath(self):
# define name for IEC raw code file
- return os.path.join(self.PlugPath(), "gui.svg")
+ return os.path.join(self.CTNPath(), "gui.svg")
def _getSVGUIserverpath(self):
return os.path.join(os.path.dirname(__file__), "svgui_server.py")
- def PlugGenerate_C(self, buildpath, locations):
+ def CTNGenerate_C(self, buildpath, locations):
"""
Return C code generated by iec2c compiler
when _generate_softPLC have been called
@@ -87,20 +87,20 @@
return res
def _ImportSVG(self):
- dialog = wx.FileDialog(self.GetPlugRoot().AppFrame, _("Choose a SVG file"), os.getcwd(), "", _("SVG files (*.svg)|*.svg|All files|*.*"), wx.OPEN)
+ dialog = wx.FileDialog(self.GetCTRoot().AppFrame, _("Choose a SVG file"), os.getcwd(), "", _("SVG files (*.svg)|*.svg|All files|*.*"), wx.OPEN)
if dialog.ShowModal() == wx.ID_OK:
svgpath = dialog.GetPath()
if os.path.isfile(svgpath):
shutil.copy(svgpath, self._getSVGpath())
else:
- self.GetPlugRoot().logger.write_error(_("No such SVG file: %s\n")%svgpath)
+ self.GetCTRoot().logger.write_error(_("No such SVG file: %s\n")%svgpath)
dialog.Destroy()
def _StartInkscape(self):
svgfile = self._getSVGpath()
open_inkscape = True
- if not self.GetPlugRoot().CheckProjectPathPerm():
- dialog = wx.MessageDialog(self.GetPlugRoot().AppFrame,
+ if not self.GetCTRoot().CheckProjectPathPerm():
+ dialog = wx.MessageDialog(self.GetCTRoot().AppFrame,
_("You don't have write permissions.\nOpen Inkscape anyway ?"),
_("Open Inkscape"),
wx.YES_NO|wx.ICON_QUESTION)