diff options
author | Milan Crha <mcrha@redhat.com> | 2009-10-29 19:35:01 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-10-29 19:35:01 +0800 |
commit | 1f455a08558bac17ba1f33b3d53a6dde02cbeb31 (patch) | |
tree | bd684a09105c31419ee7c2259fdae5a41d15a123 /modules/mail | |
parent | 2b7aa4a797fc0545e9774a42fdbd6afae5271c6d (diff) | |
download | gsoc2013-evolution-1f455a08558bac17ba1f33b3d53a6dde02cbeb31.tar.gz gsoc2013-evolution-1f455a08558bac17ba1f33b3d53a6dde02cbeb31.tar.zst gsoc2013-evolution-1f455a08558bac17ba1f33b3d53a6dde02cbeb31.zip |
Bug #268644 - unread mail shortcut collides with gtk tree search
Re-applied, as it got lost on kill-bonobo merge
Diffstat (limited to 'modules/mail')
-rw-r--r-- | modules/mail/e-mail-shell-sidebar.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c index dd802fc98c..91d0a47072 100644 --- a/modules/mail/e-mail-shell-sidebar.c +++ b/modules/mail/e-mail-shell-sidebar.c @@ -365,6 +365,29 @@ mail_shell_sidebar_selection_changed_cb (EShellSidebar *shell_sidebar, } static void +tree_hidden_key_event_cb (EMFolderTree *emft, GdkEvent *event, EShellView *shell_view) +{ + if (event && event->type == GDK_KEY_PRESS && shell_view) { + MessageList *msg_list = e_mail_reader_get_message_list (E_MAIL_READER (e_shell_view_get_shell_content (shell_view))); + + g_return_if_fail (msg_list != NULL); + + switch (event->key.keyval) { + case '[': + case ',': + gtk_widget_grab_focus ((GtkWidget *) msg_list); + message_list_select (msg_list, MESSAGE_LIST_SELECT_PREVIOUS|MESSAGE_LIST_SELECT_WRAP, 0, CAMEL_MESSAGE_SEEN); + break; + case ']': + case '.': + gtk_widget_grab_focus ((GtkWidget *) msg_list); + message_list_select (msg_list, MESSAGE_LIST_SELECT_NEXT|MESSAGE_LIST_SELECT_WRAP, 0, CAMEL_MESSAGE_SEEN); + break; + } + } +} + +static void mail_shell_sidebar_get_property (GObject *object, guint property_id, GValue *value, @@ -461,6 +484,8 @@ mail_shell_sidebar_constructed (GObject *object) shell_settings, "mail-side-bar-search", widget, "enable-search"); + g_signal_connect (widget, "hidden-key-event", G_CALLBACK (tree_hidden_key_event_cb), shell_view); + tree_view = GTK_TREE_VIEW (mail_shell_sidebar->priv->folder_tree); selection = gtk_tree_view_get_selection (tree_view); model = gtk_tree_view_get_model (tree_view); |