aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-view-private.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-01 22:47:10 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-01 22:47:10 +0800
commit1351c8e4fb443a9705bb1225c3c574c05a36f8ca (patch)
treee049bafefac361ae66dfa43abdb956f1f3a730e0 /modules/mail/e-mail-shell-view-private.c
parent624f48121f523101fe26c3d3a8b51a4eeda90990 (diff)
parent42e75c9162402078ac629740821c3533925ee342 (diff)
downloadgsoc2013-evolution-1351c8e4fb443a9705bb1225c3c574c05a36f8ca.tar.gz
gsoc2013-evolution-1351c8e4fb443a9705bb1225c3c574c05a36f8ca.tar.zst
gsoc2013-evolution-1351c8e4fb443a9705bb1225c3c574c05a36f8ca.zip
Merge branch 'master' into kill-bonobo
Diffstat (limited to 'modules/mail/e-mail-shell-view-private.c')
-rw-r--r--modules/mail/e-mail-shell-view-private.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index d410abb9c2..ca2aa8592e 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -49,6 +49,51 @@ mail_shell_view_folder_tree_selected_cb (EMailShellView *mail_shell_view,
e_shell_view_update_actions (shell_view);
}
+static gboolean
+mail_shell_view_folder_tree_key_press_event_cb (EMailShellView *mail_shell_view,
+ GdkEventKey *event)
+{
+ EMailReader *reader;
+ gboolean handled = FALSE;
+
+ if ((event->state & GDK_CONTROL_MASK) != 0)
+ goto ctrl;
+
+ /* <keyval> alone */
+ switch (event->keyval) {
+ case GDK_period:
+ case GDK_comma:
+ case GDK_bracketleft:
+ case GDK_bracketright:
+ goto emit;
+
+ default:
+ goto exit;
+ }
+
+ctrl:
+ /* Ctrl + <keyval> */
+ switch (event->keyval) {
+ case GDK_period:
+ case GDK_comma:
+ goto emit;
+
+ default:
+ goto exit;
+ }
+
+ /* All branches jump past this. */
+ g_return_val_if_reached (FALSE);
+
+emit:
+ /* Forward the key press to the EMailReader interface. */
+ reader = E_MAIL_READER (mail_shell_view->priv->mail_shell_content);
+ g_signal_emit_by_name (reader, "key-press-event", event, &handled);
+
+exit:
+ return handled;
+}
+
static void
mail_shell_view_folder_tree_popup_event_cb (EShellView *shell_view,
GdkEventButton *event)
@@ -315,6 +360,11 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view)
mail_shell_view);
g_signal_connect_swapped (
+ folder_tree, "key-press-event",
+ G_CALLBACK (mail_shell_view_folder_tree_key_press_event_cb),
+ mail_shell_view);
+
+ g_signal_connect_swapped (
folder_tree, "popup-event",
G_CALLBACK (mail_shell_view_folder_tree_popup_event_cb),
mail_shell_view);