# HG changeset patch # User greg # Date 1224500650 -7200 # Node ID 038eff285e002c957d5f87d6a03aa27e67df3896 # Parent f527d1c3f630b1be60c3c008c58c7feb2ee26603 add docutils in svgui plugins to launch inkscape fix bug in Beremiz.py when open project without buildpath diff -r f527d1c3f630 -r 038eff285e00 Beremiz.py --- a/Beremiz.py Fri Oct 17 14:44:41 2008 +0200 +++ b/Beremiz.py Mon Oct 20 13:04:10 2008 +0200 @@ -55,6 +55,7 @@ sys.exit() elif len(args) == 1: projectOpen = args[0] + buildpath = None elif len(args) == 2: projectOpen = args[0] buildpath = args[1] diff -r f527d1c3f630 -r 038eff285e00 plugins/svgui/svgui.py --- a/plugins/svgui/svgui.py Fri Oct 17 14:44:41 2008 +0200 +++ b/plugins/svgui/svgui.py Mon Oct 20 13:04:10 2008 +0200 @@ -3,7 +3,7 @@ sys.path.append(os.path.join(base_folder, "wxsvg", "SVGUIEditor")) sys.path.append(os.path.join(base_folder, "plcopeneditor", "graphics")) -import wx +import wx, subprocess from SVGUIGenerator import * from SVGUIControler import * @@ -11,8 +11,8 @@ from FBD_Objects import * from wxPopen import ProcessLogger -import subprocess from wx.wxsvg import SVGDocument +from docutils import * [ID_SVGUIEDITORFBDPANEL, ] = [wx.NewId() for _init_ctrls in range(1)] @@ -167,18 +167,10 @@ def _StartInkscape(self): if not self._View: - svgfile = os.path.join(self.PlugPath(), "gui.svg") - popenargs = [] - - if wx.Platform == '__WXMSW__': - popenargs.append(os.path.join(base_folder, "Inkscape", "inkscape.exe")) - else: - popenargs.append("/usr/bin/inkscape") - - if os.path.isfile(svgfile): - popenargs.append(svgfile) - - subprocess.Popen(popenargs).pid + svgfile = os.path.join(self.PlugPath(), "gui.svg") + if not os.path.isfile(svgfile): + svgfile = None + open_svg(svgfile) PluginMethods = [ {"bitmap" : os.path.join("images","HMIEditor"),