aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-12-04 03:57:19 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-12-04 03:57:19 +0800
commit289a09f50122dfc36c4e91d7e4314d4ef54ed35f (patch)
treeb540c4131f83e6821a7b0011a190f6c87a4fb29c /mail/message-list.c
parentb82997411cf3d5ee05fa690d766345f83a16ca94 (diff)
downloadgsoc2013-evolution-289a09f50122dfc36c4e91d7e4314d4ef54ed35f.tar.gz
gsoc2013-evolution-289a09f50122dfc36c4e91d7e4314d4ef54ed35f.tar.zst
gsoc2013-evolution-289a09f50122dfc36c4e91d7e4314d4ef54ed35f.zip
If the path exists, make sure it's a regular file (or we can't possibly
2001-11-28 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (save_msg_ok): If the path exists, make sure it's a regular file (or we can't possibly save to it). Fix for #14127. 2001-11-28 Jeffrey Stedfast <fejj@ximian.com> * message-list.c (message_list_select): Cleaned up the code. * mail-callbacks.c (previous_unread_msg): Pass wraparound as TRUE. svn path=/trunk/; revision=14850
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c35
1 files changed, 22 insertions, 13 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index db6b48a1bf..61ff949ac5 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -386,11 +386,10 @@ message_list_select (MessageList *message_list,
{
CamelMessageInfo *info;
int vrow, last;
- ETree *et = message_list->tree;
if (!GTK_WIDGET_HAS_FOCUS (message_list))
gtk_widget_grab_focus (GTK_WIDGET (message_list));
-
+
switch (direction) {
case MESSAGE_LIST_SELECT_PREVIOUS:
last = -1;
@@ -404,28 +403,29 @@ message_list_select (MessageList *message_list,
g_warning("Invalid argument to message_list_select");
return;
}
-
+
/* 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. */
if (base_row == -1)
- vrow = e_tree_row_count(message_list->tree) - 1;
+ vrow = e_tree_row_count (message_list->tree) - 1;
else
- vrow = e_tree_model_to_view_row (et, base_row);
-
- if (base_row <= -1)
+ vrow = e_tree_model_to_view_row (message_list->tree, base_row);
+
+ if (vrow <= -1)
return;
+
/* This means that we'll move at least one message in 'direction'. */
if (vrow != last)
vrow += direction;
-
+
/* We don't know whether to use < or > due to "direction" */
while (vrow != last) {
- ETreePath node = e_tree_node_at_row (et, vrow);
-
+ ETreePath 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 (et, node);
+ 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));
@@ -433,6 +433,15 @@ message_list_select (MessageList *message_list,
}
vrow += direction;
}
+
+ if (wraparound) {
+ if (direction == MESSAGE_LIST_SELECT_PREVIOUS)
+ base_row = -1;
+ else
+ base_row = 0;
+
+ message_list_select (message_list, base_row, direction, flags, mask, FALSE);
+ }
}
@@ -2172,7 +2181,7 @@ message_list_hide_uids (MessageList *ml, GPtrArray *uids)
{
int i;
char *uid;
-
+
/* first see if we need to do any work, if so, then do it all at once */
for (i = 0; i < uids->len; i++) {
if (g_hash_table_lookup (ml->uid_nodemap, uids->pdata[i])) {