Mercurial > pidgin.yaz
comparison src/gtkimhtml.c @ 10794:d34054fcab50
[gaim-migrate @ 12436]
remove that #if 0
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Fri, 08 Apr 2005 01:34:46 +0000 |
parents | ccf5e33e3239 |
children | 096c8a65d3fc |
comparison
equal
deleted
inserted
replaced
10793:ccf5e33e3239 | 10794:d34054fcab50 |
---|---|
639 } | 639 } |
640 | 640 |
641 g_slist_free(tags); | 641 g_slist_free(tags); |
642 while (gtk_text_iter_forward_to_tag_toggle(&cur, NULL) && gtk_text_iter_begins_tag(&cur, NULL)); | 642 while (gtk_text_iter_forward_to_tag_toggle(&cur, NULL) && gtk_text_iter_begins_tag(&cur, NULL)); |
643 } | 643 } |
644 #if 0 | 644 |
645 while (l) { | |
646 struct backcolor_tag *tag = (struct backcolor_tag*)l->data; | |
647 GdkRectangle visible_rect; | |
648 GdkRectangle redraw_rect; | |
649 int top, bottom, height, win_top, win_bottom; | |
650 GtkTextIter start, end; | |
651 | |
652 GdkGC *gc = gdk_gc_new(GDK_DRAWABLE(event->window)); | |
653 GdkColor color; | |
654 | |
655 gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(widget), &visible_rect); | |
656 gtk_text_view_buffer_to_window_coords (GTK_TEXT_VIEW(widget), | |
657 GTK_TEXT_WINDOW_TEXT, | |
658 visible_rect.x, | |
659 visible_rect.y, | |
660 &redraw_rect.x, | |
661 &redraw_rect.y); | |
662 | |
663 if (GTK_IMHTML(widget)->edit.backcolor && | |
664 (GTK_IMHTML(widget)->editable || GTK_IMHTML(widget)->wbfo)) { | |
665 gdk_color_parse(GTK_IMHTML(widget)->edit.backcolor, &color); | |
666 gdk_gc_set_rgb_fg_color(gc, &color); | |
667 gdk_draw_rectangle(event->window, | |
668 gc, | |
669 TRUE, | |
670 redraw_rect.x, redraw_rect.y, redraw_rect.width, redraw_rect.height); | |
671 return (* GTK_WIDGET_CLASS (parent_class)->expose_event) | |
672 (widget, event); | |
673 } | |
674 | |
675 gtk_text_buffer_get_iter_at_mark (GTK_IMHTML(widget)->text_buffer, &start, tag->start); | |
676 | |
677 if (tag->end) | |
678 gtk_text_buffer_get_iter_at_mark (GTK_IMHTML(widget)->text_buffer, &end, tag->end); | |
679 else | |
680 gtk_text_buffer_get_end_iter (GTK_IMHTML(widget)->text_buffer, &end); | |
681 | |
682 gtk_text_view_get_line_yrange (GTK_TEXT_VIEW(widget), &start, &top, NULL); | |
683 gtk_text_view_get_line_yrange (GTK_TEXT_VIEW(widget), &end, &bottom, &height); | |
684 | |
685 | |
686 gtk_text_view_buffer_to_window_coords (GTK_TEXT_VIEW(widget), | |
687 GTK_TEXT_WINDOW_TEXT, | |
688 0, | |
689 top, | |
690 NULL, | |
691 &win_top); | |
692 gtk_text_view_buffer_to_window_coords (GTK_TEXT_VIEW(widget), | |
693 GTK_TEXT_WINDOW_TEXT, | |
694 0, | |
695 bottom + height, | |
696 NULL, | |
697 &win_bottom); | |
698 redraw_rect.width = visible_rect.width; | |
699 redraw_rect.height = visible_rect.height; | |
700 | |
701 gdk_color_parse(tag->color, &color); | |
702 gdk_gc_set_rgb_fg_color(gc, &color); | |
703 | |
704 | |
705 gdk_draw_rectangle(event->window, | |
706 gc, | |
707 TRUE, | |
708 redraw_rect.x, win_top, redraw_rect.width, win_bottom - win_top); | |
709 gdk_gc_unref(gc); | |
710 l = l->next; | |
711 } | |
712 #endif | |
713 gdk_gc_unref(gc); | 645 gdk_gc_unref(gc); |
714 | 646 |
715 if (GTK_WIDGET_CLASS (parent_class)->expose_event) | 647 if (GTK_WIDGET_CLASS (parent_class)->expose_event) |
716 return (* GTK_WIDGET_CLASS (parent_class)->expose_event) | 648 return (* GTK_WIDGET_CLASS (parent_class)->expose_event) |
717 (widget, event); | 649 (widget, event); |