diff src/gtkimhtml.c @ 11525:b47708f46a38

[gaim-migrate @ 13773] Here's the rest of that custom smiley receiving patch, with some changes from me. I'm still not all that happy with it, but that's probably not the author's fault, and I don't have time to take it further right now. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Mon, 12 Sep 2005 13:25:41 +0000
parents 16b0da1f376f
children 7be60d01519f
line wrap: on
line diff
--- a/src/gtkimhtml.c	Mon Sep 12 06:50:29 2005 +0000
+++ b/src/gtkimhtml.c	Mon Sep 12 13:25:41 2005 +0000
@@ -4311,6 +4311,7 @@
 	GtkWidget *icon = NULL;
 	GtkTextChildAnchor *anchor;
 	char *unescaped = gaim_unescape_html(smiley);
+	GtkIMHtmlSmiley *imhtml_smiley = gtk_imhtml_smiley_get(imhtml, sml, unescaped);
 
 	if (imhtml->format_functions & GTK_IMHTML_SMILEY) {
 		annipixbuf = gtk_smiley_tree_image(imhtml, sml, unescaped);
@@ -4345,6 +4346,9 @@
 
 		gtk_widget_show(icon);
 		gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(imhtml), icon, anchor);
+	} else if (imhtml_smiley != NULL && (imhtml->format_functions & GTK_IMHTML_SMILEY)) {
+		anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, iter);
+		imhtml_smiley->anchors = g_slist_append(imhtml_smiley->anchors, anchor);
 	} else {
 		gtk_text_buffer_insert(imhtml->text_buffer, iter, smiley, -1);
 	}