--- a/docutil/docsvg.py Sat Apr 04 09:41:32 2020 +0200
+++ b/docutil/docsvg.py Thu Sep 03 11:16:08 2020 +0200
@@ -34,16 +34,23 @@
if wx.Platform == '__WXMSW__':
from six.moves import winreg
- svgexepath = winreg.QueryValue(winreg.HKEY_LOCAL_MACHINE,
- 'Software\\Classes\\svgfile\\shell\\Inkscape\\command')
+ svgexepath = winreg.QueryValue(winreg.HKEY_LOCAL_MACHINE, + 'Software\\Classes\\svgfile\\shell\\Inkscape\\command') - svgexepath = winreg.QueryValue(winreg.HKEY_LOCAL_MACHINE,
- 'Software\\Classes\\inkscape.svg\\shell\\open\\command')
+ svgexepath = winreg.QueryValue(winreg.HKEY_LOCAL_MACHINE, + 'Software\\Classes\\inkscape.svg\\shell\\open\\command') svgexepath = svgexepath.replace('"%1"', '').strip()
return svgexepath.replace('"', '')
- return os.path.join("/usr/bin", "inkscape")
+ # TODO: search for inkscape in $PATH + svgexepath = os.path.join("/usr/bin", "inkscape") + if os.path.exists(svgexepath): def open_win_svg(svgexepath, svgfile):