Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Briar GTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
briar
Briar GTK
Merge requests
!100
Stay on top of chat input
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Stay on top of chat input
89-stay-on-top
into
main
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Nico
requested to merge
89-stay-on-top
into
main
4 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
Fixes
#89 (closed)
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
37d79fb3
1 commit,
4 years ago
1 file
+
4
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
briar-gtk/briar_gtk/private_chat/private_chat_presenter.py
+
4
−
3
Options
@@ -201,7 +201,7 @@ class PrivateChatPresenter:
self
.
_vscrollbar_min_height
=
vscollbar
.
get_preferred_height
()[
0
]
vadjustment
=
chat_input_scroll
.
get_vadjustment
()
vadjustment
.
connect_after
(
"
notify
"
,
self
.
_on_upper_notify
)
vadjustment
.
connect_after
(
"
notify
::upper
"
,
self
.
_on_upper_notify
)
# pylint: disable=unused-argument, line-too-long
def
_on_upper_notify
(
self
,
g_object
,
param_spec
):
@@ -210,7 +210,7 @@ class PrivateChatPresenter:
"""
chat_input_scroll
=
self
.
_view
.
builder
.
get_object
(
"
chat_input_scroll
"
)
vadjustment
=
chat_input_scroll
.
get_vadjustment
()
vadjustment
.
value
=
vadjustment
.
get_upper
()
-
vadjustment
.
get_page_size
()
# noqa
vadjustment
.
set_
value
(
vadjustment
.
get_upper
()
-
vadjustment
.
get_page_size
()
)
# noqa
# Hack for vscrollbar not requiring space and making TextView higher
vscollbar
=
chat_input_scroll
.
get_vscrollbar
()
@@ -272,7 +272,8 @@ class PrivateChatPresenter:
# Shift is not pressed
if
(
event
.
state
&
Gdk
.
ModifierType
.
SHIFT_MASK
)
==
\
Gdk
.
ModifierType
.
SHIFT_MASK
:
return
False
widget
.
get_buffer
().
insert_at_cursor
(
"
\n
"
,
1
)
return
True
# Text does not only contain whitespace
if
len
(
self
.
_get_text_from_text_view
(
widget
).
strip
())
==
0
:
return
False
Loading