# HG changeset patch # User Sean Egan # Date 1020561405 0 # Node ID 265a3c9d0557ba488247985d21e2057912e38564 # Parent 2215aa4fabdbab512e2554c7a008d24145456a56 [gaim-migrate @ 3226] If gtkspell can't use ispell, it tries aspell; Thanks Andrew Sayman committer: Tailor Script diff -r 2215aa4fabdb -r 265a3c9d0557 src/aim.c --- a/src/aim.c Sun May 05 01:06:15 2002 +0000 +++ b/src/aim.c Sun May 05 01:16:45 2002 +0000 @@ -63,6 +63,7 @@ #include #endif +static gchar *aspell_cmd[] = { "aspell", "--sug-mode=fast","-a", NULL }; static gchar *ispell_cmd[] = { "ispell", "-a", NULL }; static GtkWidget *name; @@ -795,9 +796,19 @@ if (misc_options & OPT_MISC_DEBUG) show_debug(); - - if (convo_options & OPT_CONVO_CHECK_SPELLING) - gtkspell_start(NULL, ispell_cmd); + /*If ispell fails to start, try using aspell in ispell compatibitity mode. + Gabber does this the same way -- lorien420@myrealbox.com*/ + if (convo_options & OPT_CONVO_CHECK_SPELLING){ + if (gtkspell_start(NULL, ispell_cmd)<0){ + debug_printf("gtkspell failed to start when using ispell\n"); + if (gtkspell_start(NULL, aspell_cmd)<0){ + debug_printf("gtkspell failed to start when using aspell\n"); + } else + debug_printf("gtkspell started with aspell\n"); + } else { + debug_printf("gtkspell started with ispell\n"); + } + } #ifdef USE_PERL perl_autoload(); #endif diff -r 2215aa4fabdb -r 265a3c9d0557 src/conversation.c --- a/src/conversation.c Sun May 05 01:06:15 2002 +0000 +++ b/src/conversation.c Sun May 05 01:16:45 2002 +0000 @@ -65,6 +65,7 @@ #include "pixmaps/farted.xpm" static gchar *ispell_cmd[] = { "ispell", "-a", NULL }; +static gchar *aspell_cmd[] = { "aspell", "--sug-mode=fast","-a", NULL }; int state_lock = 0; @@ -2899,8 +2900,19 @@ GSList *con = connections; struct gaim_connection *gc; - if (convo_options & OPT_CONVO_CHECK_SPELLING) - gtkspell_start(NULL, ispell_cmd); + if (convo_options & OPT_CONVO_CHECK_SPELLING){ + /*If ispell fails to start, start aspell. This is the way that + Gabber does it. -- lorien420@myrealbox.com */ + if (gtkspell_start(NULL, ispell_cmd)<0){ + debug_printf("gtkspell failed to start when using ispell\n"); + if (gtkspell_start(NULL, aspell_cmd)<0){ + debug_printf("gtkspell failed to start when using aspell\n"); + } else + debug_printf("gtkspell started with aspell\n"); + } else { + debug_printf("gtkspell started with ispell\n"); + } + } while (cnv) { c = (struct conversation *)cnv->data;