check OSError from gtkspell.py. Fixes #4897
This commit is contained in:
parent
aa44b8466a
commit
5301dcd4a0
|
@ -314,7 +314,7 @@ class ChatControlBase(MessageControl):
|
|||
if lang:
|
||||
self.msg_textview.lang = lang
|
||||
spell.set_language(lang)
|
||||
except (gobject.GError, RuntimeError, TypeError):
|
||||
except (gobject.GError, RuntimeError, TypeError, OSError):
|
||||
dialogs.AspellDictError(lang)
|
||||
|
||||
def on_msg_textview_populate_popup(self, textview, menu):
|
||||
|
|
|
@ -636,7 +636,7 @@ class PreferencesWindow:
|
|||
if isinstance(ctrl, chat_control.ChatControlBase):
|
||||
try:
|
||||
spell_obj = gtkspell.get_from_text_view(ctrl.msg_textview)
|
||||
except (TypeError, RuntimeError):
|
||||
except (TypeError, RuntimeError, OSError):
|
||||
spell_obj = None
|
||||
|
||||
if not spell_obj:
|
||||
|
@ -663,7 +663,7 @@ class PreferencesWindow:
|
|||
tv = gtk.TextView()
|
||||
try:
|
||||
gtkspell.Spell(tv, lang)
|
||||
except (TypeError, RuntimeError):
|
||||
except (TypeError, RuntimeError, OSError):
|
||||
dialogs.ErrorDialog(
|
||||
_('Dictionary for lang %s not available') % lang,
|
||||
_('You have to install %s dictionary to use spellchecking, or '
|
||||
|
|
|
@ -2203,7 +2203,7 @@ class SingleMessageWindow:
|
|||
lang = gajim.LANG
|
||||
gtkspell.Spell(self.conversation_textview.tv, lang)
|
||||
gtkspell.Spell(self.message_textview, lang)
|
||||
except (gobject.GError, TypeError, RuntimeError):
|
||||
except (gobject.GError, TypeError, RuntimeError, OSError):
|
||||
AspellDictError(lang)
|
||||
|
||||
self.prepare_widgets_for(self.action)
|
||||
|
|
|
@ -3409,7 +3409,7 @@ class Interface:
|
|||
try:
|
||||
import gtkspell
|
||||
spell = gtkspell.Spell(tv, lang)
|
||||
except (ImportError, TypeError, RuntimeError):
|
||||
except (ImportError, TypeError, RuntimeError, OSError):
|
||||
dialogs.AspellDictError(lang)
|
||||
|
||||
if gajim.config.get('soundplayer') == '':
|
||||
|
|
Loading…
Reference in New Issue