Warn when there is no OCR tool installed
Currently, when no OCR tool is installed, it's impossible to open the settings window.When the user tries, an exception is raised silently in the background and nothing else happen.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/actions.py", line 51, in on_button_clicked_cb
self.**do()
File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/actions.py", line 48, in __do
self.do(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/mainwindow.py", line 837, in do
sw = SettingsWindow(self.__main_win.window, self.__config)
File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/settingswindow.py", line 641, in __init**
self.display_config(config)
File "/usr/local/lib/python2.7/dist-packages/paperwork/frontend/settingswindow.py", line 782, in display_config
if short_lang == config.ocrlang:
File "/usr/local/lib/python2.7/dist-packages/paperwork/backend/config.py", line 152, in __get_ocrlang
ocr_langs = ocr_tools[0].get_available_languages()
IndexError: list index out of range
Edited by Jerome Flesch