diff -r 4c3be2f554b1 -r b20dbe9222e2 src/gtkutils.c --- a/src/gtkutils.c Mon Nov 17 06:44:05 2003 +0000 +++ b/src/gtkutils.c Mon Nov 17 06:48:01 2003 +0000 @@ -30,6 +30,13 @@ # endif #endif /*_WIN32*/ +#ifdef USE_GTKSPELL +# include +# ifdef _WIN32 +# include "wspell.h" +# endif +#endif + #include #include "debug.h" @@ -45,10 +52,6 @@ #include "gtkutils.h" #include "ui.h" -#ifdef _WIN32 -#include "wspell.h" -#endif - guint accels_save_timer = 0; static void @@ -1029,7 +1032,9 @@ return buf; } -void gaim_gtk_find_images(const char *message, GSList **list) { +void +gaim_gtk_find_images(const char *message, GSList **list) +{ GData *attribs; const char *tmp, *start, *end; @@ -1081,6 +1086,25 @@ } void +gaim_gtk_setup_gtkspell(GtkTextView *textview) +{ +#ifdef USE_GTKSPELL + GError *error = NULL; + char *locale = NULL; + + g_return_if_fail(textview != NULL); + g_return_if_fail(GTK_IS_TEXT_VIEW(textview)); + + if (gtkspell_new_attach(textview, locale, &error) == NULL && error) + { + gaim_debug_warning("gtkspell", "Failed to setup GtkSpell: %s\n", + error->message); + g_error_free(error); + } +#endif /* USE_GTKSPELL */ +} + +void gaim_gtk_save_accels_cb(GtkAccelGroup *accel_group, guint arg1, GdkModifierType arg2, GClosure *arg3, gpointer data)