[evolution] Bug 759493 - Provide keyboard shortcuts window
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 759493 - Provide keyboard shortcuts window
- Date: Fri, 21 Jun 2019 15:16:32 +0000 (UTC)
commit f41a317fb478a2a27529648c154d0a9c5113000b
Author: Milan Crha <mcrha redhat com>
Date: Fri Jun 21 17:18:02 2019 +0200
Bug 759493 - Provide keyboard shortcuts window
Closes https://bugzilla.gnome.org/show_bug.cgi?id=759493
data/ui/CMakeLists.txt | 1 +
data/ui/evolution-shell.ui | 1 +
data/ui/evolution-shortcuts.ui | 346 +++++++++++++++++++++++++++++++++++++
po/POTFILES.in | 1 +
src/shell/e-shell-window-actions.c | 25 +++
src/shell/e-shell-window-actions.h | 2 +
6 files changed, 376 insertions(+)
---
diff --git a/data/ui/CMakeLists.txt b/data/ui/CMakeLists.txt
index 996d072575..7f383b142d 100644
--- a/data/ui/CMakeLists.txt
+++ b/data/ui/CMakeLists.txt
@@ -5,5 +5,6 @@ install(FILES evolution-calendars.ui
evolution-memos.ui
evolution-shell.ui
evolution-tasks.ui
+ evolution-shortcuts.ui
DESTINATION ${uidir}
)
diff --git a/data/ui/evolution-shell.ui b/data/ui/evolution-shell.ui
index c2face2d43..ac634aa0cf 100644
--- a/data/ui/evolution-shell.ui
+++ b/data/ui/evolution-shell.ui
@@ -76,6 +76,7 @@
</menu>
<menu action='help-menu'>
<menuitem action='contents'/>
+ <menuitem action='shortcuts'/>
<separator/>
<menuitem action='submit-bug'/>
<separator/>
diff --git a/data/ui/evolution-shortcuts.ui b/data/ui/evolution-shortcuts.ui
new file mode 100644
index 0000000000..180980e2f2
--- /dev/null
+++ b/data/ui/evolution-shortcuts.ui
@@ -0,0 +1,346 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!--<requires lib="gtk+" version="3.22"/>-->
+ <object class="GtkShortcutsWindow" id="evolution-shortcuts">
+ <property name="modal">1</property>
+ <child>
+ <object class="GtkShortcutsSection">
+ <property name="section-name">general</property>
+ <property name="title" translatable="yes" context="shortcut window">Keyboard Shortcuts</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkShortcutsGroup">
+ <property name="title" translatable="yes" context="shortcut window">General</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>1</property>
+ <property name="title" translatable="yes" context="shortcut window">Select Mail
component</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>2</property>
+ <property name="title" translatable="yes" context="shortcut window">Select Contacts
component</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>3</property>
+ <property name="title" translatable="yes" context="shortcut window">Select Calendar
component</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>4</property>
+ <property name="title" translatable="yes" context="shortcut window">Select Tasks
component</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>5</property>
+ <property name="title" translatable="yes" context="shortcut window">Select Memos
component</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>n</property>
+ <property name="title" translatable="yes" context="shortcut window">Create a new item in
current component</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator">F6</property>
+ <property name="title" translatable="yes" context="shortcut window">Cycle focus between
panes</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator">F1</property>
+ <property name="title" translatable="yes" context="shortcut window">Open the Evolution user
guide</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="title" translatable="yes" context="shortcut window">Keyboard
Shortcuts</property>
+ <property name="accelerator"><ctrl><shift>question</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>q</property>
+ <property name="title" translatable="yes" context="shortcut window">Clear search
bar</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>v</property>
+ <property name="title" translatable="yes" context="shortcut window">Move mails or contacts
to folder</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>y</property>
+ <property name="title" translatable="yes" context="shortcut window">Copy mails or contacts
to folder</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>s</property>
+ <property name="title" translatable="yes" context="shortcut window">Preferences</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>w</property>
+ <property name="title" translatable="yes" context="shortcut window">Open new
window</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>w</property>
+ <property name="title" translatable="yes" context="shortcut window">Close window</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>q</property>
+ <property name="title" translatable="yes" context="shortcut window">Quit Evolution</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsGroup">
+ <property name="title" translatable="yes" context="shortcut window">Mail</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>m</property>
+ <property name="title" translatable="yes" context="shortcut window">Create a new
message</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator">F12</property>
+ <property name="title" translatable="yes" context="shortcut window">Send and receive
messages</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>y</property>
+ <property name="title" translatable="yes" context="shortcut window">Apply filters to
selection</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>o Return</property>
+ <property name="title" translatable="yes" context="shortcut window">Open selection in new
window</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>g</property>
+ <property name="title" translatable="yes" context="shortcut window">Go to folder</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>k</property>
+ <property name="title" translatable="yes" context="shortcut window">Mark selected messages
as read</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>k</property>
+ <property name="title" translatable="yes" context="shortcut window">Mark selected messages
as unread</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator">period bracketright</property>
+ <property name="title" translatable="yes" context="shortcut window">Jump to the next unread
message</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator">comma bracketleft</property>
+ <property name="title" translatable="yes" context="shortcut window">Jump to the previous
unread message</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>f</property>
+ <property name="title" translatable="yes" context="shortcut window">Forward selected
messages</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>r</property>
+ <property name="title" translatable="yes" context="shortcut window">Reply to
sender</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>l</property>
+ <property name="title" translatable="yes" context="shortcut window">Reply to list</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>r</property>
+ <property name="title" translatable="yes" context="shortcut window">Reply to all
recipients</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator">BackSpace</property>
+ <property name="title" translatable="yes" context="shortcut window">Scroll up</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator">space</property>
+ <property name="title" translatable="yes" context="shortcut window">Scroll down</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsGroup">
+ <property name="title" translatable="yes" context="shortcut window">Calendar</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>a</property>
+ <property name="title" translatable="yes" context="shortcut window">Create a new
appointment</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>e</property>
+ <property name="title" translatable="yes" context="shortcut window">Create a new
meeting</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>t</property>
+ <property name="title" translatable="yes" context="shortcut window">Create a new
task</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>o</property>
+ <property name="title" translatable="yes" context="shortcut window">Create a new
memo</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>t</property>
+ <property name="title" translatable="yes" context="shortcut window">Go to today</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>g</property>
+ <property name="title" translatable="yes" context="shortcut window">Go to date</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>y</property>
+ <property name="title" translatable="yes" context="shortcut window">Day View</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>j</property>
+ <property name="title" translatable="yes" context="shortcut window">Work Week View</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>k</property>
+ <property name="title" translatable="yes" context="shortcut window">Week View</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>m</property>
+ <property name="title" translatable="yes" context="shortcut window">Month View</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl>l</property>
+ <property name="title" translatable="yes" context="shortcut window">List View</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsGroup">
+ <property name="title" translatable="yes" context="shortcut window">Contacts</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>c</property>
+ <property name="title" translatable="yes" context="shortcut window">Create a new
contact</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><ctrl><shift>l</property>
+ <property name="title" translatable="yes" context="shortcut window">Create a new contact
list</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b9d5d9488f..3ebf40b265 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -21,6 +21,7 @@ data/org.gnome.evolution.spamassassin.gschema.xml.in
data/org.gnome.evolution.text-highlight.gschema.xml.in
data/org.gnome.Evolution.appdata.xml.in.in
data/org.gnome.Evolution.desktop.in.in
+[type: gettext/glade]data/ui/evolution-shortcuts.ui
data/views/addressbook/galview.xml
data/views/calendar/galview.xml
data/views/mail/galview.xml
diff --git a/src/shell/e-shell-window-actions.c b/src/shell/e-shell-window-actions.c
index 7e38da48bc..346eaf5382 100644
--- a/src/shell/e-shell-window-actions.c
+++ b/src/shell/e-shell-window-actions.c
@@ -98,6 +98,24 @@ action_contents_cb (GtkAction *action,
e_shell_utils_run_help_contents (e_shell_window_get_shell (shell_window));
}
+static void
+action_shortcuts_cb (GtkAction *action,
+ EShellWindow *shell_window)
+{
+ GtkBuilder *builder;
+ GtkWidget *widget;
+
+ builder = gtk_builder_new ();
+ e_load_ui_builder_definition (builder, "evolution-shortcuts.ui");
+
+ widget = e_builder_get_widget (builder, "evolution-shortcuts");
+ gtk_window_set_transient_for (GTK_WINDOW (widget), GTK_WINDOW (shell_window));
+
+ gtk_widget_show (widget);
+
+ g_object_unref (builder);
+}
+
static void
action_custom_rule_cb (GtkAction *action,
EShellWindow *shell_window)
@@ -952,6 +970,13 @@ static GtkActionEntry shell_entries[] = {
N_("Select all text"),
NULL }, /* Handled by EFocusTracker */
+ { "shortcuts",
+ NULL,
+ N_("_Keyboard Shortcuts"),
+ "<Control><Shift>question",
+ N_("Show keyboard shortcuts"),
+ G_CALLBACK (action_shortcuts_cb) },
+
{ "submit-bug",
NULL,
N_("Submit _Bug Report..."),
diff --git a/src/shell/e-shell-window-actions.h b/src/shell/e-shell-window-actions.h
index 534f6601ab..1f6fa89fb9 100644
--- a/src/shell/e-shell-window-actions.h
+++ b/src/shell/e-shell-window-actions.h
@@ -74,6 +74,8 @@
E_SHELL_WINDOW_ACTION ((window), "search-save")
#define E_SHELL_WINDOW_ACTION_SELECT_ALL(window) \
E_SHELL_WINDOW_ACTION ((window), "select-all")
+#define E_SHELL_WINDOW_ACTION_SHORTCUTS(window) \
+ E_SHELL_WINDOW_ACTION ((window), "shortcuts")
#define E_SHELL_WINDOW_ACTION_SHOW_MENUBAR(window) \
E_SHELL_WINDOW_ACTION ((window), "show-menubar")
#define E_SHELL_WINDOW_ACTION_SHOW_SIDEBAR(window) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]