aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-17 06:04:14 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-17 06:04:14 +0800
commit6bebd14b92660bd0c95eac2d003764b71e9253d1 (patch)
treea517df285b5dbaf54fa1c7e1a20e14ee69004657 /mail/component-factory.c
parent29672fc78d4142c6666f8546f055278f485b83c2 (diff)
downloadgsoc2013-evolution-6bebd14b92660bd0c95eac2d003764b71e9253d1.tar.gz
gsoc2013-evolution-6bebd14b92660bd0c95eac2d003764b71e9253d1.tar.zst
gsoc2013-evolution-6bebd14b92660bd0c95eac2d003764b71e9253d1.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. * mail-local.c (init_trash): No need to specify the vfolder expression here. This code was moved into camel-vtrash-folder.c ages ago. * component-factory.c: Let VTrash folders accept/export the same dnd types as normal folders. svn path=/trunk/; revision=11140
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 294506b670..5610ddc8c7 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -52,6 +52,8 @@
#include "mail-send-recv.h"
+#include <camel/camel-vtrash-folder.h>
+
char *default_drafts_folder_uri;
CamelFolder *drafts_folder = NULL;
char *default_sent_folder_uri;
@@ -273,7 +275,8 @@ xfer_folder (EvolutionShellComponent *shell_component,
do_xfer_folder,
CORBA_Object_duplicate (listener, &ev));
- GNOME_Evolution_ShellComponentListener_notifyResult (listener, GNOME_Evolution_ShellComponentListener_OK, &ev);
+ GNOME_Evolution_ShellComponentListener_notifyResult (listener, GNOME_Evolution_ShellComponentListener_OK,
+ &ev);
} else
GNOME_Evolution_ShellComponentListener_notifyResult (listener, GNOME_Evolution_ShellComponentListener_INVALID_URI, &ev);
CORBA_exception_free (&ev);
@@ -361,7 +364,7 @@ message_rfc822_dnd (CamelFolder *dest, CamelStream *stream, CamelException *ex)
}
static CORBA_boolean
-destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *folder,
+destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *dest_folder,
const char *physical_uri,
const GNOME_Evolution_ShellComponentDnd_DestinationFolder_Context *destination_context,
const GNOME_Evolution_ShellComponentDnd_Action action,
@@ -370,7 +373,7 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol
{
char *url, *in, *inptr, *inend;
gboolean retval = FALSE;
- CamelFolder *source;
+ CamelFolder *folder;
CamelStream *stream;
CamelException ex;
GPtrArray *uids;
@@ -390,8 +393,8 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol
switch (type) {
case ACCEPTED_DND_TYPE_TEXT_URI_LIST:
- source = mail_tool_uri_to_folder (physical_uri, NULL);
- if (!source)
+ folder = mail_tool_uri_to_folder (physical_uri, NULL);
+ if (!folder)
return FALSE;
url = g_strndup (data->bytes._buffer, data->bytes._length);
@@ -414,9 +417,9 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol
}
stream = camel_stream_fs_new_with_fd (fd);
- message_rfc822_dnd (source, stream, &ex);
+ message_rfc822_dnd (folder, stream, &ex);
camel_object_unref (CAMEL_OBJECT (stream));
- camel_object_unref (CAMEL_OBJECT (source));
+ camel_object_unref (CAMEL_OBJECT (folder));
retval = !camel_exception_is_set (&ex);
@@ -426,8 +429,8 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol
g_free (url);
break;
case ACCEPTED_DND_TYPE_MESSAGE_RFC822:
- source = mail_tool_uri_to_folder (physical_uri, &ex);
- if (!source) {
+ folder = mail_tool_uri_to_folder (physical_uri, &ex);
+ if (!folder) {
camel_exception_clear (&ex);
return FALSE;
}
@@ -437,9 +440,9 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol
camel_stream_write (stream, data->bytes._buffer, data->bytes._length);
camel_stream_reset (stream);
- message_rfc822_dnd (source, stream, &ex);
+ message_rfc822_dnd (folder, stream, &ex);
camel_object_unref (CAMEL_OBJECT (stream));
- camel_object_unref (CAMEL_OBJECT (source));
+ camel_object_unref (CAMEL_OBJECT (folder));
break;
case ACCEPTED_DND_TYPE_X_EVOLUTION_MESSAGE:
/* format: "uri uid1\0uid2\0uid3\0...\0uidn" */
@@ -450,10 +453,10 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol
inptr = strchr (in, ' ');
url = g_strndup (in, inptr - in);
- source = mail_tool_uri_to_folder (url, &ex);
+ folder = mail_tool_uri_to_folder (url, &ex);
g_free (url);
- if (!source) {
+ if (!folder) {
camel_exception_clear (&ex);
return FALSE;
}
@@ -471,11 +474,11 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol
inptr++;
}
- mail_transfer_messages (source, uids,
+ mail_transfer_messages (folder, uids,
action == GNOME_Evolution_ShellComponentDnd_ACTION_MOVE,
physical_uri, NULL, NULL);
- camel_object_unref (CAMEL_OBJECT (source));
+ camel_object_unref (CAMEL_OBJECT (folder));
break;
default:
break;