aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-browser.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-07-29 03:54:35 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-07-29 03:54:35 +0800
commit7bd256d97649646e83488df7ac0ea90048970f8a (patch)
treec40f5d2c1d836bb6977de430e02df310a0bffc72 /mail/em-folder-browser.c
parent432afcd653612f18b48922cda544b83911c3ab5d (diff)
downloadgsoc2013-evolution-7bd256d97649646e83488df7ac0ea90048970f8a.tar.gz
gsoc2013-evolution-7bd256d97649646e83488df7ac0ea90048970f8a.tar.zst
gsoc2013-evolution-7bd256d97649646e83488df7ac0ea90048970f8a.zip
** Fix for bug #237989
svn path=/trunk/; revision=33870
Diffstat (limited to 'mail/em-folder-browser.c')
-rw-r--r--mail/em-folder-browser.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 30d755a20d..b0f467d313 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -58,6 +58,7 @@
#include <camel/camel-stream.h>
#include <camel/camel-url.h>
+#include <camel/camel-folder.h>
#include <camel/camel-vee-folder.h>
#include <camel/camel-vee-store.h>
@@ -1174,16 +1175,26 @@ emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev,
case GDK_space:
if (!emfb->view.preview->caret_mode) {
state = gtk_html_command(((EMFormatHTML *)((EMFolderView *) emfb)->preview)->html, "scroll-forward");
- if (!state)
+ if (!state) {
folder_choose = message_list_select(((EMFolderView *) emfb)->list, MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN);
+ if (!folder_choose)
+ folder_choose = message_list_select(((EMFolderView *) emfb)->list,
+ MESSAGE_LIST_SELECT_NEXT | MESSAGE_LIST_SELECT_WRAP, 0, CAMEL_MESSAGE_SEEN);
+ }
+
} else
em_utils_adjustment_page(gtk_scrolled_window_get_vadjustment((GtkScrolledWindow *)emfb->priv->scroll), TRUE);
break;
case GDK_BackSpace:
if (!emfb->view.preview->caret_mode) {
state = gtk_html_command(((EMFormatHTML *)((EMFolderView *) emfb)->preview)->html, "scroll-backward");
- if (!state)
+ if (!state) {
folder_choose = message_list_select(((EMFolderView *) emfb)->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, CAMEL_MESSAGE_SEEN);
+ if (!folder_choose)
+ folder_choose = message_list_select(((EMFolderView *) emfb)->list,
+ MESSAGE_LIST_SELECT_PREVIOUS | MESSAGE_LIST_SELECT_WRAP, 0, CAMEL_MESSAGE_SEEN);
+ }
+
} else
em_utils_adjustment_page(gtk_scrolled_window_get_vadjustment((GtkScrolledWindow *)emfb->priv->scroll), FALSE);
break;
@@ -1192,8 +1203,16 @@ emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev,
}
if (!folder_choose && !emfb->view.preview->caret_mode) {
+ //check for unread messages. if yes .. rewindback to the folder
EMFolderTree *emft = g_object_get_data((GObject*)emfb, "foldertree");
- em_folder_tree_select_next_path (emft);
+ switch (ev->key.keyval) {
+ case GDK_space:
+ em_folder_tree_select_next_path (emft);
+ break;
+ case GDK_BackSpace:
+ em_folder_tree_select_prev_path (emft);
+ break;
+ }
gtk_widget_grab_focus ((GtkWidget *)((EMFolderView *) emfb)->list);
}
return TRUE;