changeset 7344:7ba7fedc1d8b

[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 <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 27 Oct 2003 04:18:44 +0000
parents 3e28b2646afd
children 565b5bca5e8a
files src/gtkimhtml.c
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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(&copy);
+			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, &copy); 
+                        } 
+                        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, &copy); 
+                                 }
+			} 
 			c += smilelen;
 			pos += smilelen;
 			wpos = 0;