# HG changeset patch # User Stu Tomlinson # Date 1113231630 0 # Node ID 65c818fb218e2b87d6306c334611b2a81f691365 # Parent 364a2ef907aead31c042352909160cca3525a5c4 [gaim-migrate @ 12470] Fix the gtkimhtml bug that caused screennames to be duplicated in AIM profiles containing pasted conversations committer: Tailor Script diff -r 364a2ef907ae -r 65c818fb218e src/gtkimhtml.c --- a/src/gtkimhtml.c Mon Apr 11 12:24:47 2005 +0000 +++ b/src/gtkimhtml.c Mon Apr 11 15:00:30 2005 +0000 @@ -1965,20 +1965,6 @@ if (!g_ascii_strncasecmp(string, "!--", strlen ("!--"))) { gchar *e = strstr (string + strlen("!--"), "-->"); if (e) { - /* - * If we uncomment the following line then HTML comments will be - * hidden. This is good because it means when a WinAIM users pastes - * part of a conversation to you, the screen names won't be - * duplicated (because WinAIM pastes an HTML comment containing the - * screen name, for some reason). - * - * However, uncommenting this is bad because we use HTML comment - * tags to print timestamps to conversations (at least, I think...) - * - * KingAnt thinks it would be best to display timestamps using - * something other than comment tags. - */ - /* *type = -1; */ *len = e - string + strlen ("-->"); *tag = g_strndup (string + strlen ("!--"), *len - strlen ("!---->")); return TRUE; @@ -2805,8 +2791,12 @@ gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); - if (imhtml->show_comments && !(options & GTK_IMHTML_NO_COMMENTS)) + if (imhtml->show_comments && !(options & GTK_IMHTML_NO_COMMENTS)) { wpos = g_snprintf (ws, len, "%s", tag); + gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); + } + ws[0] = '\0'; wpos = 0; + /* NEW_BIT (NEW_COMMENT_BIT); */ break; default: