Mercurial > pidgin
comparison src/gtkimhtml.c @ 4612:c05e6ecdc902
[gaim-migrate @ 4901]
Ka-Hing Cheung (bsponline) wrote a patch allowing you to scroll up w/out gaim
automatically scrolling you back down. it causes some annoyance with multiple tabs and the history plugin, but its an improvement over the current situation.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Tue, 25 Feb 2003 01:48:36 +0000 |
parents | 2ea86ba4670b |
children | 86fd0f6eaa1a |
comparison
equal
deleted
inserted
replaced
4611:e42d9186a8a0 | 4612:c05e6ecdc902 |
---|---|
762 title = 0, | 762 title = 0, |
763 pre = 0; | 763 pre = 0; |
764 | 764 |
765 GSList *fonts = NULL; | 765 GSList *fonts = NULL; |
766 | 766 |
767 GdkRectangle rect; | |
768 int y, height; | |
769 | |
767 g_return_val_if_fail (imhtml != NULL, NULL); | 770 g_return_val_if_fail (imhtml != NULL, NULL); |
768 g_return_val_if_fail (GTK_IS_IMHTML (imhtml), NULL); | 771 g_return_val_if_fail (GTK_IS_IMHTML (imhtml), NULL); |
769 g_return_val_if_fail (text != NULL, NULL); | 772 g_return_val_if_fail (text != NULL, NULL); |
770 g_return_val_if_fail (len != 0, NULL); | 773 g_return_val_if_fail (len != 0, NULL); |
771 | 774 |
778 if (options & GTK_IMHTML_RETURN_LOG) | 781 if (options & GTK_IMHTML_RETURN_LOG) |
779 str = g_string_new(""); | 782 str = g_string_new(""); |
780 | 783 |
781 gtk_text_buffer_get_end_iter(imhtml->text_buffer, &iter); | 784 gtk_text_buffer_get_end_iter(imhtml->text_buffer, &iter); |
782 mark = gtk_text_buffer_create_mark (imhtml->text_buffer, NULL, &iter, /* right grav */ FALSE); | 785 mark = gtk_text_buffer_create_mark (imhtml->text_buffer, NULL, &iter, /* right grav */ FALSE); |
786 | |
787 gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(imhtml), &rect); | |
788 gtk_text_view_get_line_yrange(GTK_TEXT_VIEW(imhtml), &iter, &y, &height); | |
789 | |
790 if(((y + height) - (rect.y + rect.height)) > height | |
791 && gtk_text_buffer_get_char_count(imhtml->text_buffer)){ | |
792 options |= GTK_IMHTML_NO_SCROLL; | |
793 } | |
794 | |
783 while (pos < len) { | 795 while (pos < len) { |
784 if (*c == '<' && gtk_imhtml_is_tag (c + 1, &tag, &tlen, &type)) { | 796 if (*c == '<' && gtk_imhtml_is_tag (c + 1, &tag, &tlen, &type)) { |
785 c++; | 797 c++; |
786 pos++; | 798 pos++; |
787 switch (type) | 799 switch (type) |