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
Dicson
gajim
Commits
6f6a8d3f
Commit
6f6a8d3f
authored
Jan 24, 2017
by
Tomasz Miąsko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use GtkShortcutsWindow to display keyboard shortcuts.
parent
a779066a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
325 additions
and
2 deletions
+325
-2
data/gui/shortcuts_window.ui
data/gui/shortcuts_window.ui
+285
-0
src/roster_window.py
src/roster_window.py
+2
-2
src/shortcuts_window.py
src/shortcuts_window.py
+38
-0
No files found.
data/gui/shortcuts_window.ui
0 → 100644
View file @
6f6a8d3f
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object
class=
"GtkShortcutsWindow"
id=
"shortcuts_window"
>
<child>
<object
class=
"GtkShortcutsSection"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"section-name"
>
chat
</property>
<property
name=
"title"
translatable=
"yes"
>
Chat Shortcuts
</property>
<child>
<object
class=
"GtkShortcutsGroup"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"title"
translatable=
"yes"
>
Message composition
</property>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
Return
</property>
<property
name=
"title"
translatable=
"yes"
>
Send the message
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
shift
>
Return
<
ctrl
>
Return
</property>
<property
name=
"title"
translatable=
"yes"
>
Create a new line
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
alt
>
m
</property>
<property
name=
"title"
translatable=
"yes"
>
Select an emoticon
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
Tab
</property>
<property
name=
"title"
translatable=
"yes"
>
Complete a command or a nick
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
Up
</property>
<property
name=
"title"
translatable=
"yes"
>
Previous sent message
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
Down
</property>
<property
name=
"title"
translatable=
"yes"
>
Next sent messages
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
><
alt
>
Up
</property>
<property
name=
"title"
translatable=
"yes"
>
Quote previous message
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
><
alt
>
Down
</property>
<property
name=
"title"
translatable=
"yes"
>
Quote next message
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
u
</property>
<property
name=
"title"
translatable=
"yes"
>
Clear message entry
</property>
</object>
</child>
</object>
</child>
<child>
<object
class=
"GtkShortcutsGroup"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"title"
translatable=
"yes"
>
Appearance
</property>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
alt
>
c
</property>
<property
name=
"title"
translatable=
"yes"
>
Toggle full / compact view
</property>
</object>
</child>
</object>
</child>
<child>
<object
class=
"GtkShortcutsGroup"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"title"
translatable=
"yes"
>
Recent history
</property>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
shift
>
Page_Up
</property>
<property
name=
"title"
translatable=
"yes"
>
Scroll up
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
shift
>
Page_Down
</property>
<property
name=
"title"
translatable=
"yes"
>
Sroll down
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
l
</property>
<property
name=
"title"
translatable=
"yes"
>
Clear
</property>
</object>
</child>
</object>
</child>
<child>
<object
class=
"GtkShortcutsGroup"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"title"
translatable=
"yes"
>
Tabs
</property>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
alt
>
Left
<
ctrl
>
Page_Up
</property>
<property
name=
"title"
translatable=
"yes"
>
Switch to the previous tab
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
alt
>
Right
<
ctrl
>
Page_Down
</property>
<property
name=
"title"
translatable=
"yes"
>
Switch to the next tab
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
Alt
>
1...9
</property>
<property
name=
"title"
translatable=
"yes"
>
Switch to the first - ninth tab
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
><
shift
>
Tab
</property>
<property
name=
"title"
translatable=
"yes"
>
Switch to the previous unread tab
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
Tab
</property>
<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"
>
Escape
<
ctrl
>
w
<
ctrl
>
F4
</property>
<property
name=
"title"
translatable=
"yes"
>
Close chat
</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object
class=
"GtkShortcutsSection"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"section-name"
>
roster
</property>
<property
name=
"title"
translatable=
"yes"
>
Roster Shortcuts
</property>
<child>
<object
class=
"GtkShortcutsGroup"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"title"
translatable=
"yes"
>
General
</property>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
><
shift
>
a
</property>
<property
name=
"title"
translatable=
"yes"
>
Accounts
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
p
</property>
<property
name=
"title"
translatable=
"yes"
>
Preferences
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
t
</property>
<property
name=
"title"
translatable=
"yes"
>
File transfers
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
n
</property>
<property
name=
"title"
translatable=
"yes"
>
Start a new chat
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
j
</property>
<property
name=
"title"
translatable=
"yes"
>
Join a group chat
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
s
</property>
<property
name=
"title"
translatable=
"yes"
>
Set the status message
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
q
</property>
<property
name=
"title"
translatable=
"yes"
>
Quit Gajim
</property>
</object>
</child>
</object>
</child>
<child>
<object
class=
"GtkShortcutsGroup"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"title"
translatable=
"yes"
>
Appearance
</property>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
o
</property>
<property
name=
"title"
translatable=
"yes"
>
Show offline contacts
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
y
</property>
<property
name=
"title"
translatable=
"yes"
>
Show only active contacts
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
k
</property>
<property
name=
"title"
translatable=
"yes"
>
Enable roster filtering
</property>
</object>
</child>
</object>
</child>
<child>
<object
class=
"GtkShortcutsGroup"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"title"
translatable=
"yes"
>
Contacts
</property>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
<
ctrl
>
i
</property>
<property
name=
"title"
translatable=
"yes"
>
Contact information
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
F2
</property>
<property
name=
"title"
translatable=
"yes"
>
Rename contact
</property>
</object>
</child>
<child>
<object
class=
"GtkShortcutsShortcut"
>
<property
name=
"visible"
>
1
</property>
<property
name=
"accelerator"
>
Delete
</property>
<property
name=
"title"
translatable=
"yes"
>
Delete contact
</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
src/roster_window.py
View file @
6f6a8d3f
...
...
@@ -56,6 +56,7 @@ import tooltips
import
message_control
import
adhoc_commands
import
features_window
import
shortcuts_window
import
plugins
import
plugins.gui
...
...
@@ -3852,8 +3853,7 @@ class RosterWindow:
'http://trac.gajim.org/wiki/GajimFaq'
)
def
on_keyboard_shortcuts_menuitem_activate
(
self
,
widget
):
helpers
.
launch_browser_mailer
(
'url'
,
'http://trac.gajim.org/wiki/KeyboardShortcuts'
)
shortcuts_window
.
show
(
self
.
window
)
def
on_features_menuitem_activate
(
self
,
widget
):
features_window
.
FeaturesWindow
()
...
...
src/shortcuts_window.py
0 → 100644
View file @
6f6a8d3f
# -*- coding:utf-8 -*-
## src/shortcuts_window.py
##
## This file is part of Gajim.
##
## Gajim is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published
## by the Free Software Foundation; version 3 only.
##
## Gajim is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
##
import
gtkgui_helpers
class
ShortcutsWindow
:
def
__init__
(
self
):
self
.
window
=
None
def
show
(
self
,
parent
=
None
):
if
self
.
window
is
None
:
builder
=
gtkgui_helpers
.
get_gtk_builder
(
'shortcuts_window.ui'
)
self
.
window
=
builder
.
get_object
(
'shortcuts_window'
)
self
.
window
.
connect
(
'destroy'
,
self
.
_on_window_destroy
)
self
.
window
.
set_transient_for
(
parent
)
self
.
window
.
show_all
()
self
.
window
.
present
()
def
_on_window_destroy
(
self
,
widget
):
self
.
window
=
None
show
=
ShortcutsWindow
().
show
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