fix annoyance where your current reading is disturbed when a new msg is filtered...
[claws.git] / src / summaryview.c
index 1bba49561af19f6700a04b4865095f2ae6a0f34e..2bc9e057c72f888c8c414467c7911fa83f88abab 100644 (file)
@@ -46,6 +46,7 @@
 #include "prefs_filtering.h"
 #include "account.h"
 #include "compose.h"
+#include "file-utils.h"
 #include "utils.h"
 #include "gtkutils.h"
 #include "stock_pixmap.h"
@@ -1478,7 +1479,7 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
                                                OPEN_SELECTED_ON_SEARCH_RESULTS);
                        else
                                summary_select_by_msgnum(summaryview, selected_msgnum,
-                                               OPEN_SELECTED_ON_FOLDER_OPEN);
+                                               FALSE);
 
                        summary_lock(summaryview);
                        if (!summaryview->selected) {
@@ -6665,7 +6666,6 @@ static GtkWidget *summary_ctree_create(SummaryView *summaryview)
        gtk_cmclist_set_column_width(GTK_CMCLIST(ctree), col_pos[S_COL_TAGS],
                                   prefs_common.summary_col_size[S_COL_TAGS]);
 
-       gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_NONE);
        gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
                             GTK_CMCTREE_EXPANDER_TRIANGLE);
 
@@ -6991,7 +6991,7 @@ static gboolean summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                        break;
                                case GDK_KEY_Down: case GDK_KEY_KP_Down:
                                        next = gtk_cmctree_node_nth(ctree,
-                                                       MIN(GTK_CMCLIST(ctree)->focus_row + 1, GTK_CMCLIST(ctree)->rows));
+                                                       MIN(GTK_CMCLIST(ctree)->focus_row + 1, GTK_CMCLIST(ctree)->rows - 1));
                                        break;
                                case GDK_KEY_Page_Up: case GDK_KEY_KP_Page_Up:
                                        next = gtk_cmctree_node_nth(ctree,
@@ -7009,7 +7009,8 @@ static gboolean summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                        break;
                        }
 
-                       if (next) {
+                       if (next != NULL &&
+                                       next != gtk_cmctree_node_nth(ctree, GTK_CMCLIST(ctree)->focus_row)) {
                                gtk_sctree_select_with_state
                                        (GTK_SCTREE(ctree), next, (event->state & ~GDK_CONTROL_MASK) );