@@ -64,8 +64,6 @@ static GtkTextView *GetTextView(wxTextCtrl *ctrl)
6464 return NULL ;
6565}
6666
67- #if GTK_CHECK_VERSION(3,0,0)
68-
6967bool InitTextCtrlSpellchecker (wxTextCtrl *text, bool enable, const Language& lang)
7068{
7169 GtkTextView *textview = GetTextView (text);
@@ -91,44 +89,6 @@ bool InitTextCtrlSpellchecker(wxTextCtrl *text, bool enable, const Language& lan
9189 }
9290}
9391
94- #else // GTK+ 2.x
95-
96- bool InitTextCtrlSpellchecker (wxTextCtrl *text, bool enable, const Language& lang)
97- {
98- GtkTextView *textview = GetTextView (text);
99- wxASSERT_MSG ( textview, " wxTextCtrl is supposed to use GtkTextView" );
100- GtkSpell *spell = gtkspell_get_from_text_view (textview);
101-
102- GError *err = NULL ;
103-
104- if (enable)
105- {
106- if (spell)
107- gtkspell_set_language (spell, lang.Code ().c_str (), &err);
108- else
109- gtkspell_new_attach (textview, lang.Code ().c_str (), &err);
110- }
111- else // !enable
112- {
113- // GtkSpell when used with Zemberek Enchant module doesn't work
114- // correctly if you repeatedly attach and detach a speller to text
115- // view. See https://poedit.net/trac/ticket/276 for details.
116- //
117- // To work around this, we set the language to a non-existent one
118- // instead of detaching GtkSpell -- this has the same effect as
119- // detaching the speller as far as the UI is concerned.
120- if (spell)
121- gtkspell_set_language (spell, " unknown_language" , &err);
122- }
123-
124- if (err)
125- g_error_free (err);
126-
127- return err == NULL ;
128- }
129-
130- #endif // GTK+ 2.x
131-
13292#endif // __WXGTK__
13393
13494#ifdef __WXOSX__
0 commit comments