comparison src/gtkimhtml.c @ 10826:2a5fe8e67195

[gaim-migrate @ 12491] Remove some debug output. Also, just for Luke, I'm lowwering the max scroll time to 0.4 secs. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Fri, 15 Apr 2005 17:56:04 +0000
parents 65c818fb218e
children 76d85ccf7d90
comparison
equal deleted inserted replaced
10825:cb625efd1071 10826:2a5fe8e67195
613 613
614 while (gtk_text_iter_in_range(&cur, &start, &end)) { 614 while (gtk_text_iter_in_range(&cur, &start, &end)) {
615 GSList *tags = gtk_text_iter_get_tags(&cur); 615 GSList *tags = gtk_text_iter_get_tags(&cur);
616 GSList *l; 616 GSList *l;
617 617
618 gaim_debug_info("gtkimhtml", "cur = %d, start = %d, end = %d\n",
619 gtk_text_iter_get_offset(&cur), gtk_text_iter_get_offset(&start),
620 gtk_text_iter_get_offset(&end));
621
622 for (l = tags; l; l = l->next) { 618 for (l = tags; l; l = l->next) {
623 GtkTextTag *tag = l->data; 619 GtkTextTag *tag = l->data;
624 GdkRectangle rect; 620 GdkRectangle rect;
625 GdkRectangle tag_area; 621 GdkRectangle tag_area;
626 const char *color; 622 const char *color;
668 664
669 gdk_draw_rectangle(event->window, 665 gdk_draw_rectangle(event->window,
670 gc, 666 gc,
671 TRUE, 667 TRUE,
672 rect.x, rect.y, rect.width, rect.height); 668 rect.x, rect.y, rect.width, rect.height);
673 gaim_debug_info("gtkimhtml", "drawing rect at %d,%d to %d,%d\n",
674 rect.x, rect.y, rect.x+rect.width, rect.y+rect.height);
675 gtk_text_iter_backward_char(&cur); /* go back one, in case the end is the begining is the end 669 gtk_text_iter_backward_char(&cur); /* go back one, in case the end is the begining is the end
676 * note that above, we always moved cur ahead by at least 670 * note that above, we always moved cur ahead by at least
677 * one character */ 671 * one character */
678 break; 672 break;
679 } 673 }
2194 if (!(options & GTK_IMHTML_NO_SCROLL)) { 2188 if (!(options & GTK_IMHTML_NO_SCROLL)) {
2195 gtk_imhtml_scroll_to_end(imhtml); 2189 gtk_imhtml_scroll_to_end(imhtml);
2196 } 2190 }
2197 } 2191 }
2198 2192
2199 #define MAX_SCROLL_TIME 0.5 2193 #define MAX_SCROLL_TIME 0.4
2200 2194
2201 gboolean scroll_cb(gpointer data) 2195 gboolean scroll_cb(gpointer data)
2202 { 2196 {
2203 GtkIMHtml *imhtml = data; 2197 GtkIMHtml *imhtml = data;
2204 GtkAdjustment *adj = GTK_TEXT_VIEW(imhtml)->vadjustment; 2198 GtkAdjustment *adj = GTK_TEXT_VIEW(imhtml)->vadjustment;