From: Sean E. <sea...@us...> - 2003-10-27 04:22:17
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1:/tmp/cvs-serv7227/src Modified Files: gtkimhtml.c Log Message: 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. Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.204 retrieving revision 1.205 diff -u -d -p -r1.204 -r1.205 --- gtkimhtml.c 18 Oct 2003 01:58:01 -0000 1.204 +++ gtkimhtml.c 27 Oct 2003 04:18:44 -0000 1.205 @@ -1368,6 +1368,7 @@ GString* gtk_imhtml_append_text_with_ima } 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 @@ GString* gtk_imhtml_append_text_with_ima 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; |