Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gajim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mikhael Dunaev
gajim
Commits
b59d5434
Commit
b59d5434
authored
Apr 30, 2019
by
Daniel Brötzmann
Committed by
Philipp Hörist
Apr 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shortcuts: Add shortcuts to move tab left or right
parent
9e259301
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
gajim/data/gui/shortcuts_window.ui
gajim/data/gui/shortcuts_window.ui
+15
-1
gajim/message_window.py
gajim/message_window.py
+18
-2
No files found.
gajim/data/gui/shortcuts_window.ui
View file @
b59d5434
...
...
@@ -109,7 +109,7 @@
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
alt
>
Left
<
ctrl
>
Page_Up
</property>
<property
name=
"accelerator"
>
<
alt
>
Left
<
ctrl
>
Page_Up
</property>
<property
name=
"title"
translatable=
"yes"
>
Switch to the previous tab
</property>
</object>
</child>
...
...
@@ -141,6 +141,20 @@
<property
name=
"title"
translatable=
"yes"
>
Switch to the next unread tab
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
><
shift
>
Page_Up
</property>
<property
name=
"title"
translatable=
"yes"
>
Move tab to the left
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
><
shift
>
Page_Down
</property>
<property
name=
"title"
translatable=
"yes"
>
Move tab to the right
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
...
...
gajim/message_window.py
View file @
b59d5434
...
...
@@ -121,6 +121,7 @@ class MessageWindow:
keys
=
[
'<Control>f'
,
'<Control>g'
,
'<Control>h'
,
'<Control>i'
,
'<Control>l'
,
'<Control>L'
,
'<Control><Shift>n'
,
'<Control>u'
,
'<Control>b'
,
'<Control>F4'
,
'<Control><Shift>Page_Up'
,
'<Control><Shift>Page_Down'
,
'<Control>w'
,
'<Control>Page_Up'
,
'<Control>Page_Down'
,
'<Alt>Right'
,
'<Alt>Left'
,
'<Alt>d'
,
'<Alt>c'
,
'<Alt>m'
,
'<Alt>t'
,
'Escape'
]
+
\
[
'<Alt>'
+
str
(
i
)
for
i
in
range
(
10
)]
...
...
@@ -411,7 +412,8 @@ class MessageWindow:
'gtk-key-theme-name'
)
==
'Emacs'
:
self
.
remove_tab
(
control
,
self
.
CLOSE_CTRL_KEY
)
return
True
elif
keyval
in
(
Gdk
.
KEY_Page_Up
,
Gdk
.
KEY_Page_Down
):
elif
keyval
in
(
Gdk
.
KEY_Page_Up
,
Gdk
.
KEY_Page_Down
)
and
not
\
modifier
&
Gdk
.
ModifierType
.
SHIFT_MASK
:
# CTRL + PageUp | PageDown
# Create event and send it to notebook
event
=
Gdk
.
Event
.
new
(
Gdk
.
EventType
.
KEY_PRESS
)
...
...
@@ -425,10 +427,24 @@ class MessageWindow:
if
modifier
&
Gdk
.
ModifierType
.
SHIFT_MASK
:
# CTRL + SHIFT
if
control
.
type_id
==
message_control
.
TYPE_GC
and
\
keyval
==
Gdk
.
KEY_n
:
# CTRL + SHIFT + n
keyval
==
Gdk
.
KEY_n
:
# CTRL + SHIFT + n
self
.
window
.
lookup_action
(
'change-nick-%s'
%
control
.
control_id
).
activate
()
return
True
# CTRL + SHIFT + PageUp | PageDown
old_position
=
self
.
notebook
.
get_current_page
()
total_pages
=
self
.
notebook
.
get_n_pages
()
if
keyval
==
Gdk
.
KEY_Page_Up
:
self
.
notebook
.
reorder_child
(
control
.
widget
,
old_position
-
1
)
return
True
if
keyval
==
Gdk
.
KEY_Page_Down
:
if
old_position
==
total_pages
-
1
:
self
.
notebook
.
reorder_child
(
control
.
widget
,
0
)
return
True
self
.
notebook
.
reorder_child
(
control
.
widget
,
old_position
+
1
)
return
True
# MOD1 (ALT) mask
elif
modifier
&
Gdk
.
ModifierType
.
MOD1_MASK
:
# Tab switch bindings
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment