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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
TSRh
gajim
Commits
dd2ca4dc
Commit
dd2ca4dc
authored
20 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
ctrl + V now print the text in message_textview even if the focus is on conversation_textview
parent
5e743e11
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/chat.py
+8
-6
8 additions, 6 deletions
src/chat.py
with
8 additions
and
6 deletions
src/chat.py
+
8
−
6
View file @
dd2ca4dc
...
...
@@ -282,13 +282,17 @@ def on_conversation_textview_key_press_event(self, widget, event):
elif
event
.
keyval
==
gtk
.
keysyms
.
Page_Up
:
# CTRL + PAGE UP
self
.
notebook
.
emit
(
'
key_press_event
'
,
event
)
elif
event
.
keyval
==
gtk
.
keysyms
.
v
:
# CTRL + V
self
.
notebook
.
emit
(
'
key_press_event
'
,
event
)
jid
=
self
.
get_active_jid
()
message_textview
=
self
.
xmls
[
jid
].
get_widget
(
'
message_textview
'
)
if
not
message_textview
.
is_focus
():
message_textview
.
grab_focus
()
message_textview
.
emit
(
'
key_press_event
'
,
event
)
def
on_chat_notebook_key_press_event
(
self
,
widget
,
event
):
st
=
'
1234567890
'
# zero is here cause humans count from 1, pc from 0 :P
jid
=
self
.
get_active_jid
()
if
self
.
widget_name
==
'
tabbed_chat_window
'
:
if
event
.
keyval
==
gtk
.
keysyms
.
Escape
:
# ESCAPE
if
event
.
keyval
==
gtk
.
keysyms
.
Escape
:
# ESCAPE
if
self
.
widget_name
==
'
tabbed_chat_window
'
:
print
'
adding escape
'
#FIXME: doesn't get printed for GC as it should but Escape quits it still
self
.
remove_tab
(
jid
)
elif
event
.
keyval
==
gtk
.
keysyms
.
F4
and
\
...
...
@@ -346,9 +350,7 @@ def on_chat_notebook_key_press_event(self, widget, event):
gtk
.
keysyms
.
Control_L
)
or
(
event
.
keyval
==
gtk
.
keysyms
.
Control_R
):
# we pressed a control key or ctrl+sth: we don't block the event
# in order to let ctrl+c (copy text) and others do their default work
print
'
ctrl+sth
'
# FIXME: gets printed, but Ctrl+V doesn't paste
#possible because Ctrl+V doesn't do anything to *NOTEBOOK*
#so we should pass it somehow to the TEXTVIEW
pass
else
:
# it's a normal key press make sure message_textview has focus
message_textview
=
self
.
xmls
[
jid
].
get_widget
(
'
message_textview
'
)
if
not
message_textview
.
is_focus
():
...
...
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