changeset 7dafaee10ac0 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=7dafaee10ac0 description: don't scroll in groupchat when window doesn't have focus. Fixes #6100
diffstat:
src/conversation_textview.py | 8 +++++--- src/groupchat_control.py | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r f8e3bf91879e -r 7dafaee10ac0 src/conversation_textview.py --- a/src/conversation_textview.py Tue Nov 30 23:36:57 2010 +0100 +++ b/src/conversation_textview.py Fri Dec 17 12:09:56 2010 +0100 @@ -522,7 +522,7 @@ del self.xep0184_marks[id_] del self.xep0184_shown[id_]
- def show_focus_out_line(self): + def show_focus_out_line(self, scroll=True): if not self.allow_focus_out_line: # if room did not receive focus-in from the last time we added # --- line then do not readd @@ -581,8 +581,10 @@
buffer_.end_user_action()
- # scroll to the end (via idle in case the scrollbar has appeared) - gobject.idle_add(self.scroll_to_end) + if scroll: + # scroll to the end (via idle in case the scrollbar has + # appeared) + gobject.idle_add(self.scroll_to_end)
def show_xep0184_warning_tooltip(self): pointer = self.tv.get_pointer() diff -r f8e3bf91879e -r 7dafaee10ac0 src/groupchat_control.py --- a/src/groupchat_control.py Tue Nov 30 23:36:57 2010 +0100 +++ b/src/groupchat_control.py Fri Dec 17 12:09:56 2010 +0100 @@ -1041,7 +1041,8 @@ # we have full focus (we are reading it!) return
- self.conv_textview.show_focus_out_line() + at_the_end = self.conv_textview.at_the_end() + self.conv_textview.show_focus_out_line(scroll=at_the_end)
def needs_visual_notification(self, text): """