aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-08-12 23:45:38 +0800
committerDan Winship <danw@src.gnome.org>2000-08-12 23:45:38 +0800
commit88f9174bfd2a9177e7f9298ec40d6b7b331286a9 (patch)
tree36a51d942af1bc4bf2d735afbde1fd0a5977911b /mail
parentfa3aea8519074d45acac74a3417ffb73d8487bd5 (diff)
downloadgsoc2013-evolution-88f9174bfd2a9177e7f9298ec40d6b7b331286a9.tar
gsoc2013-evolution-88f9174bfd2a9177e7f9298ec40d6b7b331286a9.tar.gz
gsoc2013-evolution-88f9174bfd2a9177e7f9298ec40d6b7b331286a9.tar.bz2
gsoc2013-evolution-88f9174bfd2a9177e7f9298ec40d6b7b331286a9.tar.lz
gsoc2013-evolution-88f9174bfd2a9177e7f9298ec40d6b7b331286a9.tar.xz
gsoc2013-evolution-88f9174bfd2a9177e7f9298ec40d6b7b331286a9.tar.zst
gsoc2013-evolution-88f9174bfd2a9177e7f9298ec40d6b7b331286a9.zip
Toggling a flag is an "instantaneous" operation, so if we're only doing
* 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. svn path=/trunk/; revision=4778
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