From 930c47b29034e807b21a785761c35df562627b0a Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Sun, 8 Mar 2009 09:31:38 +0000 Subject: [PATCH] 2781: Turkish dictionnary (Enchant's zemberek_provider) on Note Editor returns an error svn: r12245 --- src/Spell.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Spell.py b/src/Spell.py index 58b07ee01..4927023ee 100644 --- a/src/Spell.py +++ b/src/Spell.py @@ -240,8 +240,13 @@ class Spell: gtkspell_spell.detach() self._active_language = lang_code return - gtkspell_spell.set_language(lang_code) - self._active_language = lang_code + try: + gtkspell_spell.set_language(lang_code) + self._active_language = lang_code + except RuntimeError: + #This catches error with old gtkspell versions that generate + #this exception if dict cannot be loaded. + self._active_language = 'off' # Public API