From: Sean E. <sea...@us...> - 2002-05-05 01:16:48
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv26931/src Modified Files: aim.c conversation.c Log Message: If gtkspell can't use ispell, it tries aspell; Thanks Andrew Sayman Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.179 retrieving revision 1.180 diff -u -d -r1.179 -r1.180 --- aim.c 12 Apr 2002 02:30:41 -0000 1.179 +++ aim.c 5 May 2002 01:16:45 -0000 1.180 @@ -63,6 +63,7 @@ #include <getopt.h> #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 -- lor...@my...*/ + 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 Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.351 retrieving revision 1.352 diff -u -d -r1.351 -r1.352 --- conversation.c 4 May 2002 08:21:30 -0000 1.351 +++ conversation.c 5 May 2002 01:16:45 -0000 1.352 @@ -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. -- lor...@my... */ + 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; |