Move function validate applications

This commit is contained in:
Mauricio Baeza 2020-12-18 23:29:18 -06:00
parent a7501bad5f
commit 4c1183102b
3 changed files with 21 additions and 19 deletions

Binary file not shown.

View File

@ -120,24 +120,6 @@ class ZAZLaTex2SVG(unohelper.Base, XJobExecutor):
return
def _app(self):
result = self._msg1
if app.paths.exists_app('pdflatex'):
result = self._msg2
msg = f'pdflatex = {result}\n'
result = self._msg1
if app.paths.exists_app('pdfcrop'):
result = self._msg2
msg += f'pdfcrop = {result}\n'
result = self._msg1
if app.paths.exists_app('pdf2svg'):
result = self._msg2
msg += f'pdf2svg = {result}\n\n'
msg += _('Not used, if not found some application.')
app.msgbox(msg)
return
def _from_selection(self):

View File

@ -18,7 +18,27 @@ def from_dialog():
def validate_app():
app.debug('Validate app')
msg1 = _('Not found')
msg2 = _('Found')
result = msg1
if app.paths.exists_app('pdflatex'):
result = msg2
msg = f'pdflatex = {result}\n'
result = msg1
if app.paths.exists_app('pdfcrop'):
result = msg2
msg += f'pdfcrop = {result}\n'
result = msg1
if app.paths.exists_app('pdf2svg'):
result = msg2
msg += f'pdf2svg = {result}\n\n'
msg += _('Not used, if not found some application.')
app.msgbox(msg)
return