plugins/svgui/svgui.py
changeset 260 038eff285e00
parent 259 f527d1c3f630
child 272 9cce83526487
--- 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"),