# HG changeset patch # User Sean Egan # Date 1067228324 0 # Node ID 7ba7fedc1d8b3b07c08534e3e63c20cedb67a35c # Parent 3e28b2646afd18091d7fe6fda89ccd6a64a5ab98 [gaim-migrate @ 7935] This puts the correct background color behind smileys... but I think it looks worse this way. I miss the way the old gtkimhtml did background colors. committer: Tailor Script diff -r 3e28b2646afd -r 7ba7fedc1d8b src/gtkimhtml.c --- a/src/gtkimhtml.c Mon Oct 27 04:03:53 2003 +0000 +++ b/src/gtkimhtml.c Mon Oct 27 04:18:44 2003 +0000 @@ -1368,6 +1368,7 @@ } else if (imhtml->show_smileys && (gtk_imhtml_is_smiley (imhtml, fonts, c, &smilelen) || gtk_imhtml_is_smiley(imhtml, NULL, c, &smilelen))) { GtkTextChildAnchor *anchor; GtkWidget *icon = NULL; + GtkTextIter copy; GdkPixbufAnimation *annipixbuf = NULL; GdkPixbuf *pixbuf = NULL; GtkIMHtmlFontDetail *fd; @@ -1394,7 +1395,20 @@ gtk_widget_show(icon); gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(imhtml), icon, anchor); } - + + copy = iter; + gtk_text_iter_backward_char(©); + if (bg) { + texttag = gtk_text_buffer_create_tag(imhtml->text_buffer, NULL, "background", bg, NULL); + gtk_text_buffer_apply_tag(imhtml->text_buffer, texttag, &iter, ©); + } + if (fonts) { + GtkIMHtmlFontDetail *fd = fonts->data; + if (fd->back) { + texttag = gtk_text_buffer_create_tag(imhtml->text_buffer, NULL, "background", fd->back, NULL); + gtk_text_buffer_apply_tag(imhtml->text_buffer, texttag, &iter, ©); + } + } c += smilelen; pos += smilelen; wpos = 0;