[mq]: Do_not_scroll_the_chat_if_you_started_typing_a_message

This commit is contained in:
Denis Fomin 2011-03-30 21:59:06 +04:00
parent eb83680786
commit 5394ce921f
1 changed files with 1 additions and 5 deletions

View File

@ -1231,20 +1231,16 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
if message_height + conversation_height - min_height > min_height:
policy = self.msg_scrolledwindow.get_property(
'vscrollbar-policy')
# scroll only when scrollbar appear
if policy != gtk.POLICY_AUTOMATIC:
self.msg_scrolledwindow.set_property('vscrollbar-policy',
gtk.POLICY_AUTOMATIC)
self.msg_scrolledwindow.set_property('height-request',
message_height + conversation_height - min_height)
self.bring_scroll_to_end(msg_textview)
else:
self.msg_scrolledwindow.set_property('vscrollbar-policy',
gtk.POLICY_NEVER)
self.msg_scrolledwindow.set_property('height-request', -1)
self.conv_textview.bring_scroll_to_end(diff_y - 18, False)
else:
self.conv_textview.bring_scroll_to_end(diff_y - 18, self.smooth)
self.smooth = True # reinit the flag
# enable scrollbar automatic policy for horizontal scrollbar
# if message we have in message_textview is too big