Skip to content
Snippets Groups Projects
Commit 84b8ee67 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

when we scroll to end, in a textview, we also scroll to left

parent c45cadfe
No related branches found
No related tags found
No related merge requests found
......@@ -431,8 +431,7 @@ def print_time_timeout(self, jid):
visible_rect = textview.get_visible_rect()
if end_rect.y <= (visible_rect.y + visible_rect.height):
#we are at the end
textview.scroll_to_mark(buffer.get_mark('end'),
0.1, 0, 0, 0)
self.scroll_to_end(textview)
return 1
if self.print_time_timeout_id.has_key(jid):
del self.print_time_timeout_id[jid]
......@@ -589,8 +588,11 @@ def print_special_text(self, special_text, other_tags, buffer):
end_iter, all_tags)
def scroll_to_end(self, textview):
parent = textview.get_parent()
buffer = textview.get_buffer()
textview.scroll_to_mark(buffer.get_mark('end'), 0, True, 0, 1)
adjustment = parent.get_hadjustment()
adjustment.set_value(0)
return False
def print_conversation_line(self, text, jid, kind, name, tim,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment