make 'next_on_delete' hidden pref apply after trashing or moving a msg in addition...
authorPaul <paul@claws-mail.org>
Mon, 4 Jul 2016 10:02:58 +0000 (11:02 +0100)
committerPaul <paul@claws-mail.org>
Mon, 4 Jul 2016 10:02:58 +0000 (11:02 +0100)
fixes bug #3600.
document this hidden pref also

manual/advanced.xml
src/summaryview.c

index 2d49d00..223c9c9 100644 (file)
     View as is used in the Message List. Default is '0', turned off.
          </para>
        </listitem>
-      </varlistentry>      
+      </varlistentry>
+      <varlistentry>
+       <term><literal>next_on_delete</literal></term>
+       <listitem>
+         <para>
+    '0' or '1'. Controls the message selection after deleting, moving, or
+    trashing a message. Default is '0', select previous message.
+         </para>
+       </listitem>
+      </varlistentry>
       <varlistentry>
        <term><literal>outgoing_fallback_to_ascii</literal></term>
        <listitem>
index 731d24f..4a519df 100644 (file)
@@ -4594,11 +4594,11 @@ void summary_move_selected_to(SummaryView *summaryview, FolderItem *to_folder)
                GtkCMCTreeNode *node = NULL;
                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, summaryview->display_msg, TRUE);
@@ -4964,11 +4964,11 @@ gboolean summary_execute(SummaryView *summaryview)
                        summary_unselect_all(summaryview);
                        if (summaryview->sort_type == SORT_ASCENDING) {
                                new_selected = summary_find_next_msg(summaryview, node);
-                               if (!new_selected)
+                               if (!new_selected || prefs_common.next_on_delete == FALSE)
                                        new_selected = summary_find_prev_msg(summaryview, node);
                        } else {
                                new_selected = summary_find_prev_msg(summaryview, node);
-                               if (!new_selected)
+                               if (!new_selected || prefs_common.next_on_delete == FALSE)
                                        new_selected = summary_find_next_msg(summaryview, node);
                        }
                }