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
Commits
37d79fb3
Commit
37d79fb3
authored
4 years ago
by
Nico
Browse files
Options
Downloads
Patches
Plain Diff
Stay on top of chat input
Fixes
#89
parent
0b931e40
No related branches found
No related tags found
1 merge request
!100
Stay on top of chat input
Pipeline
#5959
passed
4 years ago
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
briar-gtk/briar_gtk/private_chat/private_chat_presenter.py
+4
-3
4 additions, 3 deletions
briar-gtk/briar_gtk/private_chat/private_chat_presenter.py
with
4 additions
and
3 deletions
briar-gtk/briar_gtk/private_chat/private_chat_presenter.py
+
4
−
3
View file @
37d79fb3
...
...
@@ -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
...
...
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