Mercurial > pidgin
diff src/dialogs.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 | 643cbc9a6035 |
children | cf6a7939af78 |
line wrap: on
line diff
--- a/src/dialogs.c Mon Nov 17 06:44:05 2003 +0000 +++ b/src/dialogs.c Mon Nov 17 06:48:01 2003 +0000 @@ -38,17 +38,9 @@ #include "ui.h" -#ifdef USE_GTKSPELL -# include <gtkspell/gtkspell.h> -#endif - /* XXX */ #include "gaim.h" -#ifdef _WIN32 -# include "wspell.h" -#endif - static GtkWidget *imdialog = NULL; /*I only want ONE of these :) */ static GList *dialogwindows = NULL; static GtkWidget *importdialog; @@ -871,10 +863,10 @@ b->text = gtk_text_view_new(); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(b->text), GTK_WRAP_WORD_CHAR); -#ifdef USE_GTKSPELL + if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) - gtkspell_new_attach(GTK_TEXT_VIEW(b->text), NULL, NULL); -#endif + gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(b->text)); + gtk_widget_set_size_request(b->text, 300, 200); if ((user_info = gaim_account_get_user_info(account)) != NULL) { @@ -1517,10 +1509,8 @@ ca->text = gtk_text_view_new(); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(ca->text), GTK_WRAP_WORD_CHAR); -#ifdef USE_GTKSPELL - if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) - gtkspell_new_attach(GTK_TEXT_VIEW(ca->text), NULL, NULL); -#endif + if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) + gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(ca->text)); gtk_container_add(GTK_CONTAINER(frame), ca->text);