Daniel Brötzmann pushed to branch gtk4 at gajim / gajim


Commits:
5e15d8ea by wurstsalat at 2024-10-20T09:53:58+02:00
cfix: Spelling: Guard method if library is not installed; fix oversight

- - - - -


1 changed file:

- gajim/gtk/message_input.py


Changes:

=====================================
gajim/gtk/message_input.py
=====================================
@@ -398,8 +398,6 @@ def _init_spell_checker(self, contact: ChatContactT) -> 
None:
         checker = Spelling.Checker.new(
             provider, self._get_spell_checker_language(contact)
         )
-        lang = self._get_spell_checker_language(contact)
-        checker.set_language(lang)
 
         text_buffer = self._text_buffers[contact]
         self._spelling_adapters[contact] = Spelling.TextBufferAdapter.new(
@@ -407,6 +405,9 @@ def _init_spell_checker(self, contact: ChatContactT) -> 
None:
         )
 
     def _connect_spell_checker(self, contact: ChatContactT) -> None:
+        if not app.is_installed('SPELLING'):
+            return
+
         adapter = self._spelling_adapters[contact]
         speller_menu = adapter.get_menu_model()
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/5e15d8eacffc3391b4739d98911983412f4f12eb

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/5e15d8eacffc3391b4739d98911983412f4f12eb
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to