Philipp Hörist pushed to branch master at gajim / gajim
Commits:
6bd6294a by Philipp Hörist at 2018-03-25T01:16:20+01:00
Disable autoscroll when moving the slider
- - - - -
1 changed file:
- gajim/chat_control_base.py
Changes:
=====================================
gajim/chat_control_base.py
=====================================
--- a/gajim/chat_control_base.py
+++ b/gajim/chat_control_base.py
@@ -308,6 +308,12 @@ class ChatControlBase(MessageControl,
ChatCommandProcessor, CommandTools):
id_ = widget.connect('changed',
self.on_conversation_vadjustment_changed)
self.handlers[id_] = widget
+
+ vscrollbar = self.conv_scrolledwindow.get_vscrollbar()
+ id_ = vscrollbar.connect('button-release-event',
+ self._on_scrollbar_button_release)
+ self.handlers[id_] = vscrollbar
+
self.correcting = False
self.last_sent_msg = None
@@ -1256,6 +1262,14 @@ class ChatControlBase(MessageControl,
ChatCommandProcessor, CommandTools):
# There were events to remove
self.redraw_after_event_removed(jid)
+ def _on_scrollbar_button_release(self, scrollbar, event):
+ if event.get_button()[1] != 1:
+ # We want only to catch the left mouse button
+ return
+ if not gtkgui_helpers.at_the_end(scrollbar.get_parent()):
+ app.log('autoscroll').info('Autoscroll disabled')
+ self.conv_textview.autoscroll = False
+
def _on_scroll(self, widget, event):
if not self.conv_textview.autoscroll:
# autoscroll is already disabled
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/6bd6294ab25f6941a4fa9619a102896e76fb218e
---
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/6bd6294ab25f6941a4fa9619a102896e76fb218e
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits