aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Leach <jleach@ximian.com>2001-07-25 08:39:34 +0800
committerJacob Leach <jleach@src.gnome.org>2001-07-25 08:39:34 +0800
commitb834d6590e8f93b21f4d07edc0d666a6c9035473 (patch)
tree9c0271c34307188fb939d0a2c60246bbe5a7966d
parente951bf718e130e43567187f4b71c27672cd6e996 (diff)
downloadgsoc2013-evolution-b834d6590e8f93b21f4d07edc0d666a6c9035473.tar.gz
gsoc2013-evolution-b834d6590e8f93b21f4d07edc0d666a6c9035473.tar.zst
gsoc2013-evolution-b834d6590e8f93b21f4d07edc0d666a6c9035473.zip
If we're the last row and we're deleting, select the previous message, not
2001-07-24 Jason Leach <jleach@ximian.com> * mail-callbacks.c (delete_msg): If we're the last row and we're deleting, select the previous message, not next, which actually selects nothing. Fixes #5323. svn path=/trunk/; revision=11391
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-callbacks.c10
2 files changed, 14 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d16b628130..b13f16a1c4 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2001-07-24 Jason Leach <jleach@ximian.com>
+
+ * mail-callbacks.c (delete_msg): If we're deleting the last
+ message, select the previous, not next, which actually selects
+ nothing. Fixes #5323.
+
2001-07-24 Jeffrey Stedfast <fejj@ximian.com>
* mail-ops.c (save_part_save): Pass the O_TRUNC flag to open so
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 6b3a9faa8f..756ade4d0d 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -1551,8 +1551,14 @@ delete_msg (GtkWidget *button, gpointer user_data)
if (deleted == 1) {
row = e_tree_row_of_node (fb->message_list->tree,
e_tree_get_cursor (fb->message_list->tree));
- message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_NEXT,
- 0, 0);
+
+ /* If this is the last message, select the previous */
+ if (row+1 == e_tree_row_count (fb->message_list->tree))
+ message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_PREVIOUS,
+ 0, 0);
+ else
+ message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_NEXT,
+ 0, 0);
}
}