comparison src/gtkimhtml.c @ 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 c7f0a4397d9e
children 15155dbc768a
comparison
equal deleted inserted replaced
7343:3e28b2646afd 7344:7ba7fedc1d8b
1366 c++; 1366 c++;
1367 pos++; 1367 pos++;
1368 } else if (imhtml->show_smileys && (gtk_imhtml_is_smiley (imhtml, fonts, c, &smilelen) || gtk_imhtml_is_smiley(imhtml, NULL, c, &smilelen))) { 1368 } else if (imhtml->show_smileys && (gtk_imhtml_is_smiley (imhtml, fonts, c, &smilelen) || gtk_imhtml_is_smiley(imhtml, NULL, c, &smilelen))) {
1369 GtkTextChildAnchor *anchor; 1369 GtkTextChildAnchor *anchor;
1370 GtkWidget *icon = NULL; 1370 GtkWidget *icon = NULL;
1371 GtkTextIter copy;
1371 GdkPixbufAnimation *annipixbuf = NULL; 1372 GdkPixbufAnimation *annipixbuf = NULL;
1372 GdkPixbuf *pixbuf = NULL; 1373 GdkPixbuf *pixbuf = NULL;
1373 GtkIMHtmlFontDetail *fd; 1374 GtkIMHtmlFontDetail *fd;
1374 gchar *sml = NULL; 1375 gchar *sml = NULL;
1375 if (fonts) { 1376 if (fonts) {
1392 1393
1393 if (icon) { 1394 if (icon) {
1394 gtk_widget_show(icon); 1395 gtk_widget_show(icon);
1395 gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(imhtml), icon, anchor); 1396 gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(imhtml), icon, anchor);
1396 } 1397 }
1397 1398
1399 copy = iter;
1400 gtk_text_iter_backward_char(&copy);
1401 if (bg) {
1402 texttag = gtk_text_buffer_create_tag(imhtml->text_buffer, NULL, "background", bg, NULL);
1403 gtk_text_buffer_apply_tag(imhtml->text_buffer, texttag, &iter, &copy);
1404 }
1405 if (fonts) {
1406 GtkIMHtmlFontDetail *fd = fonts->data;
1407 if (fd->back) {
1408 texttag = gtk_text_buffer_create_tag(imhtml->text_buffer, NULL, "background", fd->back, NULL);
1409 gtk_text_buffer_apply_tag(imhtml->text_buffer, texttag, &iter, &copy);
1410 }
1411 }
1398 c += smilelen; 1412 c += smilelen;
1399 pos += smilelen; 1413 pos += smilelen;
1400 wpos = 0; 1414 wpos = 0;
1401 ws[0] = 0; 1415 ws[0] = 0;
1402 } else if (*c) { 1416 } else if (*c) {