2004-10-03 [colin] 0.9.12cvs119.3
[claws.git] / src / summaryview.c
index c0e18b1c9ce00cdea4b858dbc90079e75a6c47b4..e5928fb0056540c3dbef3ff5a59e3bb7f70b30c0 100644 (file)
@@ -1241,9 +1241,16 @@ static void summary_set_menu_sensitive(SummaryView *summaryview)
 void summary_select_prev_unread(SummaryView *summaryview)
 {
        GtkCTreeNode *node;
+       gboolean skip_cur = FALSE;
+
+       if (summaryview->displayed 
+       &&  summaryview->selected == summaryview->displayed) {
+               debug_print("skipping current\n");
+               skip_cur = TRUE;
+       }
 
        node = summary_find_prev_flagged_msg
-               (summaryview, summaryview->selected, MSG_UNREAD, TRUE);
+               (summaryview, summaryview->selected, MSG_UNREAD, skip_cur);
 
        if (!node) {
                AlertValue val = 0;
@@ -1280,9 +1287,17 @@ void summary_select_next_unread(SummaryView *summaryview)
 {
        GtkCTreeNode *node = summaryview->selected;
        GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
+       gboolean skip_cur = FALSE;
+       
+       if (summaryview->displayed 
+       &&  summaryview->selected == summaryview->displayed) {
+               debug_print("skipping cur\n");
+               skip_cur = TRUE;
+       }
+
 
        node = summary_find_next_flagged_msg
-               (summaryview, node, MSG_UNREAD, TRUE);
+               (summaryview, node, MSG_UNREAD, skip_cur);
        
        if (node)
                summary_select_node(summaryview, node, TRUE, FALSE);