[evolution] I#312 - Allow change of magic-spacebar accelerators
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#312 - Allow change of magic-spacebar accelerators
- Date: Wed, 5 Feb 2020 14:52:58 +0000 (UTC)
commit 58d5766f81d99e1aba5e4271754fc5bd34759f27
Author: Milan Crha <mcrha redhat com>
Date: Wed Feb 5 15:50:56 2020 +0100
I#312 - Allow change of magic-spacebar accelerators
Closes https://gitlab.gnome.org/GNOME/evolution/issues/312
data/ui/evolution-mail.ui | 3 +++
src/modules/mail/e-mail-shell-view-actions.c | 4 ++--
src/modules/mail/e-mail-shell-view-private.c | 18 +-----------------
src/shell/e-shell-window-private.c | 3 +--
4 files changed, 7 insertions(+), 21 deletions(-)
---
diff --git a/data/ui/evolution-mail.ui b/data/ui/evolution-mail.ui
index 1b2c1b3b68..9148161742 100644
--- a/data/ui/evolution-mail.ui
+++ b/data/ui/evolution-mail.ui
@@ -1,4 +1,7 @@
<ui evolution-ui-version="1.0">
+ <accelerator action='mail-smart-backward'/>
+ <accelerator action='mail-smart-forward'/>
+
<menubar name='main-menu'>
<menu action='file-menu'>
<placeholder name='mail-send-receiver'>
diff --git a/src/modules/mail/e-mail-shell-view-actions.c b/src/modules/mail/e-mail-shell-view-actions.c
index e6c1742542..c7339f3a52 100644
--- a/src/modules/mail/e-mail-shell-view-actions.c
+++ b/src/modules/mail/e-mail-shell-view-actions.c
@@ -1774,14 +1774,14 @@ static GtkActionEntry mail_entries[] = {
{ "mail-smart-backward",
NULL,
NULL, /* No menu item; key press only */
- NULL,
+ "BackSpace",
NULL,
G_CALLBACK (action_mail_smart_backward_cb) },
{ "mail-smart-forward",
NULL,
NULL, /* No menu item; key press only */
- NULL,
+ "space",
NULL,
G_CALLBACK (action_mail_smart_forward_cb) },
diff --git a/src/modules/mail/e-mail-shell-view-private.c b/src/modules/mail/e-mail-shell-view-private.c
index 364e08ea5d..633b87b4cc 100644
--- a/src/modules/mail/e-mail-shell-view-private.c
+++ b/src/modules/mail/e-mail-shell-view-private.c
@@ -258,7 +258,6 @@ mail_shell_view_process_key_press_event (EMailShellView *mail_shell_view,
EMailView *mail_view;
EMailReader *reader;
EMailDisplay *mail_display;
- GtkAction *action;
shell_view = E_SHELL_VIEW (mail_shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
@@ -280,22 +279,7 @@ mail_shell_view_process_key_press_event (EMailShellView *mail_shell_view,
return pass_event;
}
- switch (event->keyval) {
- case GDK_KEY_space:
- action = ACTION (MAIL_SMART_FORWARD);
- break;
-
- case GDK_KEY_BackSpace:
- action = ACTION (MAIL_SMART_BACKWARD);
- break;
-
- default:
- return FALSE;
- }
-
- gtk_action_activate (action);
-
- return TRUE;
+ return FALSE;
}
static gboolean
diff --git a/src/shell/e-shell-window-private.c b/src/shell/e-shell-window-private.c
index 8558fe8b5e..c941d9c304 100644
--- a/src/shell/e-shell-window-private.c
+++ b/src/shell/e-shell-window-private.c
@@ -356,8 +356,7 @@ e_shell_window_key_press_event_cb (GtkWidget *widget,
event->keyval == GDK_KEY_Return ||
event->keyval == GDK_KEY_Escape ||
event->keyval == GDK_KEY_KP_Tab ||
- event->keyval == GDK_KEY_KP_Enter ||
- event->keyval == GDK_KEY_BackSpace)
+ event->keyval == GDK_KEY_KP_Enter)
return FALSE;
if (e_shell_window_get_need_input (E_SHELL_WINDOW (widget), event)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]