Mercurial > pidgin
changeset 3209:265a3c9d0557
[gaim-migrate @ 3226]
If gtkspell can't use ispell, it tries aspell; Thanks Andrew Sayman
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 05 May 2002 01:16:45 +0000 |
parents | 2215aa4fabdb |
children | 5e90ecb578c5 |
files | src/aim.c src/conversation.c |
diffstat | 2 files changed, 28 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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 <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 -- 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
--- 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;