aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-17 07:54:13 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-17 07:54:13 +0800
commit36f546f021b1f0ef8fd6a634ce448cb99e3d5230 (patch)
tree900ba4ed58cc65fc2919d52e2126c1b02aedc661 /mail
parentb6a828eddf400a4623326bf770c5f19a62d8b309 (diff)
downloadgsoc2013-evolution-36f546f021b1f0ef8fd6a634ce448cb99e3d5230.tar.gz
gsoc2013-evolution-36f546f021b1f0ef8fd6a634ce448cb99e3d5230.tar.zst
gsoc2013-evolution-36f546f021b1f0ef8fd6a634ce448cb99e3d5230.zip
Use g_strcasecmp() when looking for a Trash folder - it may be lowercase
2001-07-16 Jeffrey Stedfast <fejj@ximian.com> * mail-ops.c (add_vtrash_info): Use g_strcasecmp() when looking for a Trash folder - it may be lowercase or something funky. (transfer_messages_transfer): Special-case vtrash folders. svn path=/trunk/; revision=11142
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog1
-rw-r--r--mail/mail-ops.c27
2 files changed, 20 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 0231256e99..41188d71e5 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -2,6 +2,7 @@
* mail-ops.c (add_vtrash_info): Use g_strcasecmp() when looking
for a Trash folder - it may be lowercase or something funky.
+ (transfer_messages_transfer): Special-case vtrash folders.
* mail-local.c (init_trash): No need to specify the vfolder
expression here. This code was moved into camel-vtrash-folder.c
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 3c8818020d..e6c516a46e 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -35,6 +35,7 @@
#include <gal/widgets/e-unicode.h>
#include <camel/camel-mime-filter-from.h>
#include <camel/camel-operation.h>
+#include <camel/camel-vtrash-folder.h>
#include "mail.h"
#include "mail-tools.h"
#include "mail-ops.h"
@@ -893,7 +894,7 @@ transfer_messages_transfer (struct _mail_msg *mm)
void (*func) (CamelFolder *, GPtrArray *,
CamelFolder *,
CamelException *);
-
+
if (m->delete) {
func = camel_folder_move_messages_to;
desc = _("Moving");
@@ -901,20 +902,30 @@ transfer_messages_transfer (struct _mail_msg *mm)
func = camel_folder_copy_messages_to;
desc = _("Copying");
}
-
+
dest = mail_tool_uri_to_folder (m->dest_uri, &mm->ex);
if (camel_exception_is_set (&mm->ex))
return;
-
+
camel_folder_freeze (m->source);
camel_folder_freeze (dest);
- (func) (m->source, m->uids, dest, &mm->ex);
+ if (CAMEL_IS_VTRASH_FOLDER (dest)) {
+ if (m->delete) {
+ int i;
+
+ for (i = 0; i < m->uids->len; i++)
+ camel_folder_delete_message (m->source, m->uids->pdata[i]);
+ } else {
+ /* no-op - can't copy messages to*/
+ }
+ } else
+ (func) (m->source, m->uids, dest, &mm->ex);
- camel_folder_thaw(m->source);
- camel_folder_thaw(dest);
- camel_folder_sync(dest, FALSE, NULL);
- camel_object_unref((CamelObject *)dest);
+ camel_folder_thaw (m->source);
+ camel_folder_thaw (dest);
+ camel_folder_sync (dest, FALSE, NULL);
+ camel_object_unref (CAMEL_OBJECT (dest));
}
static void