always scroll when we send a message

This commit is contained in:
Yann Leboulanger 2005-03-10 19:08:26 +00:00
parent bbbeba0b48
commit 1184d3b706
1 changed files with 5 additions and 3 deletions

View File

@ -609,7 +609,8 @@ class tabbed_chat_window:
x, y = widget.window_to_buffer_coords(gtk.TEXT_WINDOW_TEXT, x, y)
tags = widget.get_iter_at_location(x, y).get_tags()
if self.change_cursor:
widget.get_window(gtk.TEXT_WINDOW_TEXT).set_cursor(gtk.gdk.XTERM)
widget.get_window(gtk.TEXT_WINDOW_TEXT).set_cursor(\
gtk.gdk.Cursor(gtk.gdk.XTERM))
self.change_cursor = None
for tag in tags:
if tag == widget.get_buffer().get_tag_table().lookup('url') or \
@ -794,8 +795,9 @@ class tabbed_chat_window:
end_rect = conversation_textview.get_iter_location(end_iter)
visible_rect = conversation_textview.get_visible_rect()
end = False
if end_rect.y <= (visible_rect.y + visible_rect.height):
#we are at the end
if end_rect.y <= (visible_rect.y + visible_rect.height) or \
(contact and contact != 'status'):
#we are at the end or we are sending something
end = True
conversation_textview.scroll_to_mark(conversation_buffer.\
get_mark('end'), 0.1, 0, 0, 0)