diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/em-folder-view.c | 10 |
2 files changed, 14 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index d22638b3e9..4a6ee47524 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2004-02-13 Sarfraaz Ahmed <asarfraaz@novell.com> + + * em-folder-view.c (emfv_popup_delete): added the code to get + the previous mail in a list, if get_next_mail fails. This is a + fix for #54195 + (emfv_list_key_press): Same as above + 2004-02-13 Not Zed <NotZed@Ximian.com> * importers/netscape-importer.c: use mail-importer to import the diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index dfad679d16..8c8deec7f1 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -611,9 +611,10 @@ emfv_popup_delete(GtkWidget *w, EMFolderView *emfv) uids = message_list_get_selected(emfv->list); em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED); - if (uids->len == 1) - message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0, FALSE); - + if (uids->len == 1) { + if (!message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0, FALSE)) + message_list_select(emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, 0, FALSE); + } em_utils_uids_free(uids); } @@ -1833,6 +1834,9 @@ emfv_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, emfv_popup_undelete(NULL, emfv); else emfv_popup_delete(NULL, emfv); + + if (!message_list_select (emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0, FALSE)) + message_list_select (emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, 0, FALSE); break; case GDK_Menu: /* FIXME: location of popup */ |