Mercurial > pidgin
diff src/gtkconv.c @ 7538:357eb1c39b72
[gaim-migrate @ 8151]
Robot101 made a nice patch (which I modified just slightly) to put our
gtkspell attachment function that we use all throughout gaim into a utility
function, which handles error checking and only does anything if gtkspell
support is compiled in. It lets us remove a lot of #ifdef USE_GTKSPELL from
places, and doesn't change any functionality.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Mon, 17 Nov 2003 06:48:01 +0000 |
| parents | b7b1d416ff44 |
| children | cdfdbabd3266 |
line wrap: on
line diff
--- a/src/gtkconv.c Mon Nov 17 06:44:05 2003 +0000 +++ b/src/gtkconv.c Mon Nov 17 06:48:01 2003 +0000 @@ -27,6 +27,9 @@ #ifdef USE_GTKSPELL # include <gtkspell/gtkspell.h> +# ifdef _WIN32 +# include "wspell.h" +# endif #endif #include <gdk/gdkkeysyms.h> @@ -58,10 +61,6 @@ /* XXX */ #include "gaim.h" -#ifdef _WIN32 -# include "wspell.h" -#endif - #define AUTO_RESPONSE "<AUTO-REPLY> : " static char nick_colors[][8] = { @@ -3652,10 +3651,8 @@ g_signal_connect(G_OBJECT(gtkconv->entry), "key_press_event", G_CALLBACK(entry_key_pressed_cb_2), conv); -#ifdef USE_GTKSPELL if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) - gtkspell_new_attach(GTK_TEXT_VIEW(gtkconv->entry), NULL, NULL); -#endif + gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(gtkconv->entry)); gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(gtkconv->entry)); gtk_widget_show(gtkconv->entry); @@ -3757,10 +3754,8 @@ g_signal_connect(G_OBJECT(gtkconv->entry_buffer), "delete_range", G_CALLBACK(delete_text_cb), conv); -#ifdef USE_GTKSPELL if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) - gtkspell_new_attach(GTK_TEXT_VIEW(gtkconv->entry), NULL, NULL); -#endif + gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(gtkconv->entry)); gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(gtkconv->entry)); gtk_widget_show(gtkconv->entry); @@ -5895,7 +5890,7 @@ gtkconv = GAIM_GTK_CONVERSATION(conv); if (value) - gtkspell_new_attach(GTK_TEXT_VIEW(gtkconv->entry), NULL, NULL); + gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(gtkconv->entry)); else { spell = gtkspell_get_from_text_view(GTK_TEXT_VIEW(gtkconv->entry)); gtkspell_detach(spell);
