On 2015-06-03, Uwe Stöhr wrote:

> [-- Type: text/plain, Encoding: 7bit --]

> The attached patch fixes
> http://www.lyx.org/trac/ticket/7657
> for me.

> Could some pythionist please review this?

> If this can go in I would be able to fix the same bug for other 
> third-party programs.

Do you really need a full path to the binary on Windows?
AFAIK, there is a PATH variable also on DOS, so it should be possible to
call the "inkscape" program "by name" instead.

Please keep the current distinction of 

  program call  (ac_prog)
  program name  (ac_word)
  path          (path)

even if "inkscape" is not on the binary PATH. Then, there is no need to
have \s and \\" in program names.

Instead, getInkscapeBinary() may be renamed to getInkscapePath() and
then call checkViewerEditor with the "path" argument

    (inkscape_path, inkscape_name) = os.path.split(getInkscapePath())
    checkViewerEditor('a SVG viewer and editor', [inkscape_name],
        rc_entry = [r'\Format svg        svg     SVG                    "" "%%" 
"%%"    "vector"        "image/svg+xml"']
        path = [inkscape_path])


thanks

Günter


Reply via email to