aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-callbacks.c17
2 files changed, 21 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 2be1b1e017..3ad14af94e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,11 @@
2000-08-12 Dan Winship <danw@helixcode.com>
+ * mail-callbacks.c (delete_msg): Toggling a flag is an
+ "instantaneous" operation, so if we're only doing one, just do it
+ and return, rather than queueing it for the other thread. This
+ makes the "Delete" key work correctly (move to the next message)
+ again.
+
* mail-identify.c: Remove workaround for gnome-vfs 0.2 bug.
* mail-format.c (lookup_handler): Remove workaround for function
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 10e3c93b01..7850f9826c 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -449,8 +449,21 @@ delete_msg (GtkWidget *button, gpointer user_data)
uids = g_ptr_array_new ();
message_list_foreach (ml, enumerate_msg, uids);
- mail_do_flag_messages (ml->folder, uids, TRUE,
- CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED);
+ if (uids->len == 1) {
+ guint32 flags;
+ char *uid = uids->pdata[0];
+
+ mail_tool_camel_lock_up ();
+ flags = camel_folder_get_message_flags (ml->folder, uid);
+ camel_folder_set_message_flags (ml->folder, uid,
+ CAMEL_MESSAGE_DELETED,
+ ~flags);
+ mail_tool_camel_lock_down ();
+ } else {
+ mail_do_flag_messages (ml->folder, uids, TRUE,
+ CAMEL_MESSAGE_DELETED,
+ CAMEL_MESSAGE_DELETED);
+ }
}
void