item->sort_type == SORT_DESCENDING
? 0 : GTK_CMCLIST(ctree)->rows - 1);
summary_unlock(summaryview);
- summary_select_node(summaryview, node, FALSE, TRUE);
+ summary_select_node(summaryview, node, 0, TRUE);
summary_lock(summaryview);
}
} else {
}
summary_unlock(summaryview);
- if (node) {
- gboolean show = (prefs_common.always_show_msg == OPENMSG_ALWAYS) ||
- (prefs_common.always_show_msg == OPENMSG_WHEN_VIEW_VISIBLE &&
- messageview_is_visible(summaryview->messageview));
- summary_select_node(summaryview, node, show, TRUE);
- }
+ if (node)
+ summary_select_node(summaryview, node, -1, TRUE);
summary_lock(summaryview);
}
if (!node)
alertpanel_notice(_("No unread messages."));
else
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, -1, FALSE);
}
void summary_select_next_unread(SummaryView *summaryview)
skip_cur = TRUE;
}
-
node = summary_find_next_flagged_msg
(summaryview, node, MSG_UNREAD, skip_cur);
if (node)
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, -1, FALSE);
else {
node = summary_find_next_flagged_msg
(summaryview, NULL, MSG_UNREAD, FALSE);
if (val == G_ALERTALTERNATE)
folderview_select_next_with_flag(summaryview->folderview, MSG_UNREAD, TRUE);
} else {
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, -1, FALSE);
}
}
}
if (!node)
alertpanel_notice(_("No new messages."));
else
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, -1, FALSE);
}
void summary_select_next_new(SummaryView *summaryview)
skip_cur = TRUE;
}
-
node = summary_find_next_flagged_msg
(summaryview, node, MSG_NEW, skip_cur);
if (node)
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, -1, FALSE);
else {
node = summary_find_next_flagged_msg
(summaryview, NULL, MSG_NEW, FALSE);
else
return;
} else
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, -1, FALSE);
}
}
if (!node)
alertpanel_notice(_("No marked messages."));
else
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, -1, FALSE);
}
void summary_select_next_marked(SummaryView *summaryview)
skip_cur = TRUE;
}
-
node = summary_find_next_flagged_msg
(summaryview, node, MSG_MARKED, skip_cur);
if (node)
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, -1, FALSE);
else {
node = summary_find_next_flagged_msg
(summaryview, NULL, MSG_MARKED, FALSE);
else
return;
} else
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, -1, FALSE);
}
}
if (!node)
alertpanel_notice(_("No labeled messages."));
else
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, -1, FALSE);
}
void summary_select_next_labeled(SummaryView *summaryview)
if (!node)
alertpanel_notice(_("No labeled messages."));
else
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, -1, FALSE);
}
void summary_select_parent(SummaryView *summaryview)
if (summaryview->selected)
node = GTK_CMCTREE_ROW(summaryview->selected)->parent;
if (node)
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, -1, FALSE);
}
void summary_select_by_msgnum(SummaryView *summaryview, guint msgnum)
GtkCMCTreeNode *node;
node = summary_find_msg_by_msgnum(summaryview, msgnum);
- summary_select_node(summaryview, node, FALSE, TRUE);
+ summary_select_node(summaryview, node, 0, TRUE);
}
void summary_display_by_msgnum(SummaryView *summaryview, guint msgnum)
GtkCMCTreeNode *node;
node = summary_find_msg_by_msgnum(summaryview, msgnum);
- summary_select_node(summaryview, node, TRUE, FALSE);
+ summary_select_node(summaryview, node, 1, FALSE);
}
void summary_select_by_msg_list(SummaryView *summaryview, GSList *msginfos)
* summary_select_node:
* @summaryview: Summary view.
* @node: Summary tree node.
- * @display_msg: TRUE to display the selected message.
+ * @force_display: -1 unset, 0 don't show the msg, 1 show the msg.
* @do_refresh: TRUE to refresh the widget.
*
* Select @node (bringing it into view by scrolling and expanding its
- * thread, if necessary) and unselect all others. If @display_msg is
- * TRUE, display the corresponding message in the message view.
+ * thread, if necessary) and unselect all others. If @force_display is
+ * 1, display the corresponding message in the message view, if
+ * @force_display is -1, obey prefs_common.always_show_msg.
* If @do_refresh is TRUE, the widget is refreshed.
**/
void summary_select_node(SummaryView *summaryview, GtkCMCTreeNode *node,
- gboolean display_msg, gboolean do_refresh)
+ gint force_display, gboolean do_refresh)
{
GtkCMCTree *ctree = GTK_CMCTREE(summaryview->ctree);
+ gboolean display_msg;
+
+ display_msg = force_display > -1? force_display :
+ (prefs_common.always_show_msg == OPENMSG_ALWAYS) ||
+ ((prefs_common.always_show_msg == OPENMSG_WHEN_VIEW_VISIBLE &&
+ messageview_is_visible(summaryview->messageview)));
if (summary_is_locked(summaryview)
&& !GTK_SCTREE(ctree)->selecting_range
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);
+ summary_select_node(summaryview, node, -1, TRUE);
if (prefs_common.immediate_exec || folder_has_parent_of_type(item, F_TRASH)) {
summary_execute(summaryview);
}
END_LONG_OPERATION(summaryview);
- summaryview->display_msg = (prefs_common.always_show_msg == OPENMSG_ALWAYS) ||
- ((prefs_common.always_show_msg == OPENMSG_WHEN_VIEW_VISIBLE &&
- messageview_is_visible(summaryview->messageview)));
-
if (prefs_common.immediate_exec) {
summary_execute(summaryview);
} else {
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);
+ summary_select_node(summaryview, node, -1, TRUE);
summary_status_show(summaryview);
}
GtkCMCTreeNode *node = gtk_cmctree_node_nth (GTK_CMCTREE(summaryview->ctree),
GTK_CMCLIST(summaryview->ctree)->rows - 1);
if (node)
- summary_select_node(summaryview, node, summaryview->display_msg, TRUE);
+ summary_select_node(summaryview, node, -1, TRUE);
}
}
node = gtk_cmctree_node_nth(GTK_CMCTREE(summaryview->ctree), 0);
if (node)
- summary_select_node(summaryview, node, TRUE, TRUE);
+ summary_select_node(summaryview, node, 1, TRUE);
}
gint summaryview_export_mbox_list(SummaryView *summaryview)