# HG changeset patch # User Luke Schierer # Date 1082127490 0 # Node ID 5891a1a6fc7e5755ea8d296a666bf019ab5f769a # Parent 142108e893996de1ef970180b10283ac2d134c03 [gaim-migrate @ 9425] (10:55:19) nosnilmot: LSchiere: at least part of that spellchk patch looks wrong - why connect to all 3 of writing-im, writing-chat and sending-im ? writing-* is supposed to allow changing the message before it is either displayed or sent... (10:56:53) nosnilmot: LSchiere: and I can't reproduce the problem described in the patch/bug report (both sent and displayed are actually replaced) - KingAnt already fixed this once committer: Tailor Script diff -r 142108e89399 -r 5891a1a6fc7e plugins/spellchk.c --- a/plugins/spellchk.c Fri Apr 16 14:39:34 2004 +0000 +++ b/plugins/spellchk.c Fri Apr 16 14:58:10 2004 +0000 @@ -214,14 +214,16 @@ static void substitute(char **mes, int pos, int m, const char *text) { char *new = g_malloc(strlen(*mes) + strlen(text) + 1); + char *tmp; new[0] = 0; strncat(new, *mes, pos); strcat(new, text); strcat(new, &(*mes)[pos + m]); - g_free(*mes); + tmp = *mes; *mes = new; + g_free(tmp); } static GtkWidget *tree; @@ -388,8 +390,6 @@ plugin, GAIM_CALLBACK(substitute_words), NULL); gaim_signal_connect(conv_handle, "writing-chat-msg", plugin, GAIM_CALLBACK(substitute_words), NULL); - gaim_signal_connect(conv_handle, "sending-im-msg", - plugin, GAIM_CALLBACK(substitute_words), NULL); return TRUE; }