aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-01-09 06:47:21 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-01-09 06:47:21 +0800
commit956b6f95d0c975a54f3a9963b304e4d599667605 (patch)
treea54e31af2f1ad03402d978b4e548eda5f044a65e /mail
parent9d39da64dcef90dde5a28ec9ab6401a4146d8a7e (diff)
downloadgsoc2013-evolution-956b6f95d0c975a54f3a9963b304e4d599667605.tar.gz
gsoc2013-evolution-956b6f95d0c975a54f3a9963b304e4d599667605.tar.zst
gsoc2013-evolution-956b6f95d0c975a54f3a9963b304e4d599667605.zip
When performing a wraparound, check to see if the first (or last depending
2002-01-08 Jeffrey Stedfast <fejj@ximian.com> * message-list.c (message_list_select): When performing a wraparound, check to see if the first (or last depending on direction) message fits the selection criteria before telling etable to find the next/previous matching node. * mail-account-gui.c (mail_account_gui_new): When connecting to the transport username changed event, pass the gui->transport not the gui->source. svn path=/trunk/; revision=15267
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/message-list.c25
2 files changed, 26 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 099e8e80a9..65af5a57ab 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,10 @@
2002-01-08 Jeffrey Stedfast <fejj@ximian.com>
+ * message-list.c (message_list_select): When performing a
+ wraparound, check to see if the first (or last depending on
+ direction) message fits the selection criteria before telling
+ etable to find the next/previous matching node.
+
* mail-account-gui.c (mail_account_gui_new): When connecting to
the transport username changed event, pass the gui->transport not
the gui->source.
diff --git a/mail/message-list.c b/mail/message-list.c
index c2f9f127a8..4ff1257a60 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -407,7 +407,7 @@ message_list_select (MessageList *message_list,
}
/* If it's -1, we want the last view row, not the last model row. */
- /* model_to_view_row etc simply dont work for sorted views. Sigh. */
+ /* model_to_view_row etc simply doesn't work for sorted views. Sigh. */
if (base_row == -1)
vrow = e_tree_row_count (message_list->tree) - 1;
else
@@ -437,10 +437,27 @@ message_list_select (MessageList *message_list,
}
if (wraparound) {
- if (direction == MESSAGE_LIST_SELECT_PREVIOUS)
- base_row = -1;
- else
+ ETreePath node;
+
+ if (direction == MESSAGE_LIST_SELECT_NEXT) {
base_row = 0;
+ vrow = 0;
+ } else {
+ base_row = -1;
+ vrow = e_tree_row_count (message_list->tree) - 1;
+ }
+
+ /* lets see if the first/last (depending on direction)
+ row matches our selection criteria */
+ node = e_tree_node_at_row (message_list->tree, vrow);
+ info = get_message_info (message_list, node);
+ if (info && (info->flags & mask) == flags) {
+ e_tree_set_cursor (message_list->tree, node);
+
+ gtk_signal_emit (GTK_OBJECT (message_list), message_list_signals[MESSAGE_SELECTED],
+ camel_message_info_uid (info));
+ return;
+ }
message_list_select (message_list, base_row, direction, flags, mask, FALSE);
}