plugins/python/modules/svgui/svgui.py
changeset 427 7ac746c07ff2
parent 421 c9ec111ad275
equal deleted inserted replaced
426:3f285782ac9b 427:7ac746c07ff2
    96                 self.GetPlugRoot().logger.write_error(_("No such SVG file: %s\n")%svgpath)
    96                 self.GetPlugRoot().logger.write_error(_("No such SVG file: %s\n")%svgpath)
    97         dialog.Destroy()  
    97         dialog.Destroy()  
    98 
    98 
    99     def _StartInkscape(self):
    99     def _StartInkscape(self):
   100         svgfile = self._getSVGpath()
   100         svgfile = self._getSVGpath()
   101         if not os.path.isfile(svgfile):
   101         open_inkscape = True
   102             svgfile = None
   102         if not self.GetPlugRoot().CheckProjectPathPerm():
   103         open_svg(svgfile)
   103             dialog = wx.MessageDialog(self.GetPlugRoot().AppFrame,
       
   104                                       _("You don't have write permissions.\nOpen Inkscape anyway ?"),
       
   105                                       _("Open Inkscape"),
       
   106                                       wx.YES_NO|wx.ICON_QUESTION)
       
   107             open_inkscape = dialog.ShowModal() == wx.ID_YES
       
   108             dialog.Destroy()
       
   109         if open_inkscape:
       
   110             if not os.path.isfile(svgfile):
       
   111                 svgfile = None
       
   112             open_svg(svgfile)