add (currently?) hidden pref for choosing to go to older/newer msg on delete
authorPaul <paul@claws-mail.org>
Mon, 12 Oct 2015 17:56:06 +0000 (18:56 +0100)
committerPaul <paul@claws-mail.org>
Mon, 12 Oct 2015 17:56:06 +0000 (18:56 +0100)
src/prefs_common.c
src/prefs_common.h
src/summaryview.c

index 59f3a1ee2198ae293fd4d3d6b679ba60da7149f8..559bf51700dd017221f79bc6dbce017ab7150de7 100644 (file)
@@ -450,7 +450,10 @@ static PrefParam param[] = {
        {"msgview_date_format", "FALSE", &prefs_common.msgview_date_format, P_BOOL,
         NULL, NULL, NULL},
 
-       {"bold_unread", "TRUE", &prefs_common.bold_unread, P_BOOL,
+       {"next_on_delete", "FALSE", &prefs_common.next_on_delete, P_BOOL,
+        NULL, NULL, NULL},
+
+        {"bold_unread", "TRUE", &prefs_common.bold_unread, P_BOOL,
         NULL, NULL, NULL},
 
        {"enable_thread", "TRUE", &prefs_common.enable_thread, P_BOOL,
index 2daf079334ab75ab642b7fceafcb376004a1a86e..6c98ae1eeadd55bf6b4594100b682b830f1048ef 100644 (file)
@@ -231,6 +231,7 @@ struct _PrefsCommon
        gint stripes_color_offset;
        gboolean enable_hscrollbar;
        gboolean bold_unread;
+       gboolean next_on_delete;
        gboolean enable_thread;
        gboolean thread_by_subject;
        gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded
index 4425a424db8736643fd019e5a2440d340b67ed70..4717efb102cd412413471b4dc7185d9d0002f587 100644 (file)
@@ -4431,11 +4431,11 @@ void summary_delete(SummaryView *summaryview)
 
        if (summaryview->sort_type == SORT_ASCENDING) {
                node = summary_find_next_msg(summaryview, sel_last);
-               if (!node)
+               if (!node || prefs_common.next_on_delete == FALSE)
                        node = summary_find_prev_msg(summaryview, sel_last);
        } else {
                node = summary_find_prev_msg(summaryview, sel_last);
-               if (!node)
+               if (!node || prefs_common.next_on_delete == FALSE)
                        node = summary_find_next_msg(summaryview, sel_last);
        }
        summary_select_node(summaryview, node, prefs_common.always_show_msg, TRUE);