Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eta
gajim
Commits
6bd6294a
Commit
6bd6294a
authored
7 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Disable autoscroll when moving the slider
parent
04052139
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gajim/chat_control_base.py
+14
-0
14 additions, 0 deletions
gajim/chat_control_base.py
with
14 additions
and
0 deletions
gajim/chat_control_base.py
+
14
−
0
View file @
6bd6294a
...
@@ -308,6 +308,12 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
...
@@ -308,6 +308,12 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
id_
=
widget
.
connect
(
'
changed
'
,
id_
=
widget
.
connect
(
'
changed
'
,
self
.
on_conversation_vadjustment_changed
)
self
.
on_conversation_vadjustment_changed
)
self
.
handlers
[
id_
]
=
widget
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
.
correcting
=
False
self
.
last_sent_msg
=
None
self
.
last_sent_msg
=
None
...
@@ -1256,6 +1262,14 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
...
@@ -1256,6 +1262,14 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
# There were events to remove
# There were events to remove
self
.
redraw_after_event_removed
(
jid
)
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
):
def
_on_scroll
(
self
,
widget
,
event
):
if
not
self
.
conv_textview
.
autoscroll
:
if
not
self
.
conv_textview
.
autoscroll
:
# autoscroll is already disabled
# autoscroll is already disabled
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment