Remove mark all read/unread (in current folder) entries in message
[claws.git] / src / mainwindow.c
index 9001ba20d539256363aa10bf567e598712c23cde..37b8e88aeae8bbe4a234df15e6dfd808aba32867 100644 (file)
@@ -713,8 +713,8 @@ static GtkActionEntry mainwin_entries[] =
        {"Message/Mark/MarkRead",                    NULL, N_("Mark as rea_d"), NULL, NULL, G_CALLBACK(mark_as_read_cb) },
        {"Message/Mark/MarkUnread",                  NULL, N_("Mark as unr_ead"), "<shift>exclam", NULL, G_CALLBACK(mark_as_unread_cb) },
        /* separation */
-       {"Message/Mark/MarkAllRead",                 NULL, N_("Mark all read"), NULL, NULL, G_CALLBACK(mark_all_read_cb) },
-       {"Message/Mark/MarkAllUnread",               NULL, N_("Mark all unread"), NULL, NULL, G_CALLBACK(mark_all_unread_cb) },
+       {"Message/Mark/MarkAllRead",                 NULL, N_("Mark all read in folder"), NULL, NULL, G_CALLBACK(mark_all_read_cb) },
+       {"Message/Mark/MarkAllUnread",               NULL, N_("Mark all unread in folder"), NULL, NULL, G_CALLBACK(mark_all_unread_cb) },
        /* separation */
        {"Message/Mark/IgnoreThread",                NULL, N_("Ignore thread"), NULL, NULL, G_CALLBACK(ignore_thread_cb) },
        {"Message/Mark/UnignoreThread",              NULL, N_("Unignore thread"), NULL, NULL, G_CALLBACK(unignore_thread_cb) },
@@ -2797,7 +2797,7 @@ void main_window_toggle_message_view(MainWindow *mainwin)
        }
        summary_grab_focus(summaryview);
        if (!summary_is_list(summaryview)) {
-               summary_show(summaryview, summaryview->folder_item);
+               summary_show(summaryview, summaryview->folder_item, FALSE);
        }
 }
 
@@ -3980,7 +3980,7 @@ static void add_mailbox_cb(GtkAction *action, gpointer data)
 static void update_folderview_cb(GtkAction *action, gpointer data)
 {
        MainWindow *mainwin = (MainWindow *)data;
-       summary_show(mainwin->summaryview, NULL);
+       summary_show(mainwin->summaryview, NULL, FALSE);
        folderview_check_new_all();
 }
 
@@ -4654,9 +4654,13 @@ static void thread_cb(GtkAction *action, gpointer data)
 {
        MainWindow *mainwin = (MainWindow *)data;
        gboolean threaded = FALSE;
+       guint selected_msgnum = 0;
+
        if (mainwin->menu_lock_count) return;
        if (!mainwin->summaryview->folder_item) return;
 
+       selected_msgnum = summary_get_msgnum(mainwin->summaryview, mainwin->summaryview->selected);
+
        threaded = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
 
        mainwin->summaryview->folder_item->threaded = threaded; 
@@ -4664,7 +4668,8 @@ static void thread_cb(GtkAction *action, gpointer data)
        mainwin->summaryview->threaded = threaded;
 
        summary_show(mainwin->summaryview, 
-                       mainwin->summaryview->folder_item);
+                       mainwin->summaryview->folder_item, FALSE);
+       summary_select_by_msgnum(mainwin->summaryview, selected_msgnum, FALSE);
 }
 
 static void expand_threads_cb(GtkAction *action, gpointer data)
@@ -4855,7 +4860,7 @@ static void update_summary_cb(GtkAction *action, gpointer data)
 
        folder_update_op_count();
        folder_item_scan(fitem);
-       summary_show(mainwin->summaryview, fitem);
+       summary_show(mainwin->summaryview, fitem, FALSE);
 }
 
 static void prev_cb(GtkAction *action, gpointer data)