prevent TB

This commit is contained in:
Dimitur Kirov 2006-05-20 19:06:16 +00:00
parent 3caa576400
commit d0bb4b3f53
1 changed files with 4 additions and 1 deletions

View File

@ -159,7 +159,10 @@ class ConversationTextview:
def scroll_to_end(self):
parent = self.tv.get_parent()
buffer = self.tv.get_buffer()
self.tv.scroll_to_mark(buffer.get_mark('end'), 0, True, 0, 1)
end_mark = buffer.get_mark('end')
if not end_mark:
return False
self.tv.scroll_to_mark(end_mark, 0, True, 0, 1)
adjustment = parent.get_hadjustment()
adjustment.set_value(0)
return False # when called in an idle_add, just do it once