aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-10-03 06:01:03 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-10-03 06:01:03 +0800
commit8d4f5ab1c8b538084e80ccee917168902f92b14e (patch)
tree6092c553c3222300a04002b953ad870c73409b10 /mail
parentc44b422cd64cd68a2d9b87261bdbe44fd0b61059 (diff)
downloadgsoc2013-evolution-8d4f5ab1c8b538084e80ccee917168902f92b14e.tar.gz
gsoc2013-evolution-8d4f5ab1c8b538084e80ccee917168902f92b14e.tar.zst
gsoc2013-evolution-8d4f5ab1c8b538084e80ccee917168902f92b14e.zip
Pass an empty flags argument to mail_tool_uri_to_folder.
2001-10-02 Jeffrey Stedfast <fejj@ximian.com> * mail-vfolder.c (vfolder_setup_do): Pass an empty flags argument to mail_tool_uri_to_folder. (vfolder_adduri_do): Same. * mail-session.c (get_folder): Pass an empty flags argument to mail_tool_uri_to_folder. * mail-send-recv.c (receive_get_folder): Pass an empty flags argument to mail_tool_uri_to_folder. * mail-ops.c (get_folder_get): Pass the flags to mail_tool_uri_to_folder. (mail_get_folder): Now takes a flags argument. (remove_folder_get): Pass an empty flags argument to mail_tool_uri_to_folder. (mail_send_message): Pass an empty argument flag to mail_tool_uri_to_folder. (transfer_messages_transfer): Same. Destination folder should already be created by this time. * folder-info.c (do_get_info): Pass an empty flags argument to mail_tool_uri_to_folder. * importers/evolution-mbox-importer.c (folder_created_cb): Pass the CREATE flag here too. (load_file_fn): And here. (load_file_fn): And here too. * importers/evolution-outlook-importer.c (load_file_fn): Pass the CREATE flag to mail_tool_uri_to_folder. * folder-browser.c (folder_browser_new): Pass an empty flags argument. (x_evolution_message_parse): Pass an empty flags argument to mail_tool_uri_to_folder. * component-factory.c (create_folder): Pass a CREATE flag to mail_get_folder here too. (owner_set_cb): And here. (xfer_folder): Shouldn't need the CREATE flag here, so not passing any flags. (destination_folder_handle_drop): Same. * mail-local.c (mail_local_store_add_folder): Pass a CREATE flag to mail_get_folder. (reconfigure_folder_reconfigure): Pass an empty flags argument to mail_tool_uri_to_folder. * mail-tools.c (mail_tool_uri_to_folder): Take a flags argument. (mail_tool_get_local_inbox): Pass an empty flags argument to mail_tool_uri_to_folder. svn path=/trunk/; revision=13353
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog54
-rw-r--r--mail/component-factory.c14
-rw-r--r--mail/folder-browser.c4
-rw-r--r--mail/folder-info.c2
-rw-r--r--mail/importers/evolution-mbox-importer.c6
-rw-r--r--mail/importers/evolution-outlook-importer.c2
-rw-r--r--mail/mail-local.c4
-rw-r--r--mail/mail-ops.c14
-rw-r--r--mail/mail-ops.h2
-rw-r--r--mail/mail-send-recv.c2
-rw-r--r--mail/mail-session.c2
-rw-r--r--mail/mail-tools.c6
-rw-r--r--mail/mail-tools.h2
-rw-r--r--mail/mail-vfolder.c4
14 files changed, 89 insertions, 29 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 7156e72bc1..31fcf9e5a9 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,57 @@
+2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-vfolder.c (vfolder_setup_do): Pass an empty flags argument
+ to mail_tool_uri_to_folder.
+ (vfolder_adduri_do): Same.
+
+ * mail-session.c (get_folder): Pass an empty flags argument to
+ mail_tool_uri_to_folder.
+
+ * mail-send-recv.c (receive_get_folder): Pass an empty flags
+ argument to mail_tool_uri_to_folder.
+
+ * mail-ops.c (get_folder_get): Pass the flags to
+ mail_tool_uri_to_folder.
+ (mail_get_folder): Now takes a flags argument.
+ (remove_folder_get): Pass an empty flags argument to
+ mail_tool_uri_to_folder.
+ (mail_send_message): Pass an empty argument flag to
+ mail_tool_uri_to_folder.
+ (transfer_messages_transfer): Same. Destination folder should
+ already be created by this time.
+
+ * folder-info.c (do_get_info): Pass an empty flags argument to
+ mail_tool_uri_to_folder.
+
+ * importers/evolution-mbox-importer.c (folder_created_cb): Pass
+ the CREATE flag here too.
+ (load_file_fn): And here.
+ (load_file_fn): And here too.
+
+ * importers/evolution-outlook-importer.c (load_file_fn): Pass the
+ CREATE flag to mail_tool_uri_to_folder.
+
+ * folder-browser.c (folder_browser_new): Pass an empty flags
+ argument.
+ (x_evolution_message_parse): Pass an empty flags argument to
+ mail_tool_uri_to_folder.
+
+ * component-factory.c (create_folder): Pass a CREATE flag to
+ mail_get_folder here too.
+ (owner_set_cb): And here.
+ (xfer_folder): Shouldn't need the CREATE flag here, so not passing
+ any flags.
+ (destination_folder_handle_drop): Same.
+
+ * mail-local.c (mail_local_store_add_folder): Pass a CREATE flag
+ to mail_get_folder.
+ (reconfigure_folder_reconfigure): Pass an empty flags argument to
+ mail_tool_uri_to_folder.
+
+ * mail-tools.c (mail_tool_uri_to_folder): Take a flags argument.
+ (mail_tool_get_local_inbox): Pass an empty flags argument to
+ mail_tool_uri_to_folder.
+
2001-10-02 Ettore Perazzoli <ettore@ximian.com>
* mail-account-gui.c (launch_signature_editor): Use
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 804829a491..b34fcc77d9 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -207,7 +207,8 @@ create_folder (EvolutionShellComponent *shell_component,
CORBA_exception_init (&ev);
if (!strcmp (type, "mail")) {
- mail_get_folder(physical_uri, create_folder_done, CORBA_Object_duplicate (listener, &ev), mail_thread_new);
+ mail_get_folder (physical_uri, CAMEL_STORE_FOLDER_CREATE, create_folder_done,
+ CORBA_Object_duplicate (listener, &ev), mail_thread_new);
} else {
GNOME_Evolution_ShellComponentListener_notifyResult (
listener, GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev);
@@ -323,7 +324,7 @@ xfer_folder (EvolutionShellComponent *shell_component,
}
camel_exception_init (&ex);
- source = mail_tool_uri_to_folder (source_physical_uri, &ex);
+ source = mail_tool_uri_to_folder (source_physical_uri, 0, &ex);
camel_exception_clear (&ex);
CORBA_exception_init (&ev);
@@ -485,7 +486,7 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *des
switch (type) {
case ACCEPTED_DND_TYPE_TEXT_URI_LIST:
- folder = mail_tool_uri_to_folder (physical_uri, NULL);
+ folder = mail_tool_uri_to_folder (physical_uri, 0, NULL);
if (!folder)
return FALSE;
@@ -527,7 +528,7 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *des
g_free (urls);
break;
case ACCEPTED_DND_TYPE_MESSAGE_RFC822:
- folder = mail_tool_uri_to_folder (physical_uri, &ex);
+ folder = mail_tool_uri_to_folder (physical_uri, 0, &ex);
if (!folder) {
camel_exception_clear (&ex);
return FALSE;
@@ -551,7 +552,7 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *des
inptr = strchr (in, ' ');
url = g_strndup (in, inptr - in);
- folder = mail_tool_uri_to_folder (url, &ex);
+ folder = mail_tool_uri_to_folder (url, 0, &ex);
g_free (url);
if (!folder) {
@@ -685,7 +686,8 @@ owner_set_cb (EvolutionShellComponent *shell_component,
for (i = 0; i < sizeof (standard_folders) / sizeof (standard_folders[0]); i++) {
*standard_folders[i].uri = g_strdup_printf ("file://%s/local/%s", evolution_dir, standard_folders[i].name);
- mail_msg_wait(mail_get_folder(*standard_folders[i].uri, got_folder, standard_folders[i].folder, mail_thread_new));
+ mail_msg_wait (mail_get_folder (*standard_folders[i].uri, CAMEL_STORE_FOLDER_CREATE,
+ got_folder, standard_folders[i].folder, mail_thread_new));
}
mail_session_enable_interaction (TRUE);
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index a3249c8064..9913363641 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -431,7 +431,7 @@ x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **uids)
inptr = strchr (in, ' ');
uri = g_strndup (in, inptr - in);
- folder = mail_tool_uri_to_folder (uri, NULL);
+ folder = mail_tool_uri_to_folder (uri, 0, NULL);
g_free (uri);
if (!folder)
@@ -1986,7 +1986,7 @@ folder_browser_new (const GNOME_Evolution_Shell shell, const char *uri)
folder_browser->uri = g_strdup (uri);
gtk_object_ref (GTK_OBJECT (folder_browser));
- mail_get_folder(folder_browser->uri, got_folder, folder_browser, mail_thread_new);
+ mail_get_folder (folder_browser->uri, 0, got_folder, folder_browser, mail_thread_new);
return GTK_WIDGET (folder_browser);
}
diff --git a/mail/folder-info.c b/mail/folder-info.c
index 268efe5e77..2280b72a46 100644
--- a/mail/folder-info.c
+++ b/mail/folder-info.c
@@ -113,7 +113,7 @@ do_get_info (struct _mail_msg *mm)
#endif
ex = camel_exception_new ();
- folder = mail_tool_uri_to_folder (m->foldername, ex);
+ folder = mail_tool_uri_to_folder (m->foldername, 0, ex);
if (camel_exception_is_set (ex)) {
g_warning ("Camel exception: %s", camel_exception_get_description (ex));
}
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index 5c3062236e..23fce7eb7a 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -204,7 +204,7 @@ folder_created_cb (BonoboListener *listener,
fullpath = g_strconcat ("file://", result->path, NULL);
ex = camel_exception_new ();
- importer->folder = mail_tool_uri_to_folder (fullpath, ex);
+ importer->folder = mail_tool_uri_to_folder (fullpath, CAMEL_STORE_FOLDER_CREATE, ex);
if (camel_exception_is_set (ex)) {
g_warning ("Error opening %s", fullpath);
@@ -269,7 +269,7 @@ load_file_fn (EvolutionImporter *eimporter,
fullpath = e_path_to_physical (homedir, folderpath);
ex = camel_exception_new ();
- importer->folder = mail_tool_uri_to_folder (fullpath, ex);
+ importer->folder = mail_tool_uri_to_folder (fullpath, CAMEL_STORE_FOLDER_CREATE, ex);
g_free (homedir);
if (camel_exception_is_set (ex) || importer->folder == NULL) {
@@ -291,7 +291,7 @@ load_file_fn (EvolutionImporter *eimporter,
mail_importer_create_folder (parent, name, NULL, listener);
camel_exception_free (ex);
ex = camel_exception_new ();
- importer->folder = mail_tool_uri_to_folder (fullpath, ex);
+ importer->folder = mail_tool_uri_to_folder (fullpath, CAMEL_STORE_FOLDER_CREATE, ex);
delayed = TRUE;
g_free (parent);
}
diff --git a/mail/importers/evolution-outlook-importer.c b/mail/importers/evolution-outlook-importer.c
index 50e386a388..058c365d17 100644
--- a/mail/importers/evolution-outlook-importer.c
+++ b/mail/importers/evolution-outlook-importer.c
@@ -268,7 +268,7 @@ load_file_fn (EvolutionImporter *eimporter,
if (folderpath == NULL || *folderpath == '\0')
importer->folder = mail_tool_get_local_inbox (NULL);
else
- importer->folder = mail_tool_uri_to_folder (folderpath, NULL);
+ importer->folder = mail_tool_uri_to_folder (folderpath, CAMEL_STORE_FOLDER_CREATE, NULL);
if (importer->folder == NULL){
g_warning ("Bad folder");
diff --git a/mail/mail-local.c b/mail/mail-local.c
index 759c464737..7ee5bbf841 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -846,7 +846,7 @@ static void mail_local_store_add_folder(MailLocalStore *mls, const char *uri, co
/* this is just so the folder is opened at least once to setup the folder
counts etc in the display. Joy eh? The result is discarded. */
- mail_get_folder(uri, NULL, NULL, mail_thread_queued_slow);
+ mail_get_folder (uri, CAMEL_STORE_FOLDER_CREATE, NULL, NULL, mail_thread_queued_slow);
}
}
@@ -1092,7 +1092,7 @@ reconfigure_folder_reconfigure (struct _mail_msg *mm)
return;
}
- local_folder = mail_tool_uri_to_folder (m->fb->uri, &mm->ex);
+ local_folder = mail_tool_uri_to_folder (m->fb->uri, 0, &mm->ex);
if (camel_exception_is_set (&mm->ex)) {
g_warning ("Can't resolve URI \"%s\" for reconfiguration!", m->fb->uri);
return;
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 8867ecb140..9f55bd2f0f 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -488,7 +488,7 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte
}
if (sent_folder_uri) {
- folder = mail_tool_uri_to_folder (sent_folder_uri, NULL);
+ folder = mail_tool_uri_to_folder (sent_folder_uri, 0, NULL);
g_free (sent_folder_uri);
if (!folder) {
/* FIXME */
@@ -881,7 +881,7 @@ transfer_messages_transfer (struct _mail_msg *mm)
desc = _("Copying");
}
- dest = mail_tool_uri_to_folder (m->dest_uri, &mm->ex);
+ dest = mail_tool_uri_to_folder (m->dest_uri, 0, &mm->ex);
if (camel_exception_is_set (&mm->ex))
return;
@@ -1202,6 +1202,7 @@ struct _get_folder_msg {
struct _mail_msg msg;
char *uri;
+ guint32 flags;
CamelFolder *folder;
void (*done) (char *uri, CamelFolder *folder, void *data);
void *data;
@@ -1220,7 +1221,7 @@ get_folder_get (struct _mail_msg *mm)
{
struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
- m->folder = mail_tool_uri_to_folder (m->uri, &mm->ex);
+ m->folder = mail_tool_uri_to_folder (m->uri, m->flags, &mm->ex);
}
static void
@@ -1250,13 +1251,16 @@ static struct _mail_msg_op get_folder_op = {
};
int
-mail_get_folder (const char *uri, void (*done)(char *uri, CamelFolder *folder, void *data), void *data, EThread *thread)
+mail_get_folder (const char *uri, guint32 flags,
+ void (*done)(char *uri, CamelFolder *folder, void *data),
+ void *data, EThread *thread)
{
struct _get_folder_msg *m;
int id;
m = mail_msg_new(&get_folder_op, NULL, sizeof(*m));
m->uri = g_strdup (uri);
+ m->flags = flags;
m->data = data;
m->done = done;
@@ -1364,7 +1368,7 @@ remove_folder_get (struct _mail_msg *mm)
m->removed = FALSE;
- folder = mail_tool_uri_to_folder (m->uri, &mm->ex);
+ folder = mail_tool_uri_to_folder (m->uri, 0, &mm->ex);
if (!folder)
return;
diff --git a/mail/mail-ops.h b/mail/mail-ops.h
index bc5a15df9a..c4a134a192 100644
--- a/mail/mail-ops.h
+++ b/mail/mail-ops.h
@@ -61,7 +61,7 @@ void mail_get_messages (CamelFolder *folder, GPtrArray *uids,
void *data);
/* same for a folder */
-int mail_get_folder (const char *uri,
+int mail_get_folder (const char *uri, guint32 flags,
void (*done) (char *uri, CamelFolder *folder, void *data), void *data,
EThread *thread);
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index d1d619b0dd..d758bd6dca 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -566,7 +566,7 @@ receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelExcep
camel_object_ref((CamelObject *)oldinfo->folder);
return oldinfo->folder;
}
- folder = mail_tool_uri_to_folder(uri, ex);
+ folder = mail_tool_uri_to_folder (uri, 0, ex);
if (!folder)
return NULL;
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 9c5907443e..0459549ddc 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -337,7 +337,7 @@ remove_timeout (CamelSession *session, guint handle)
static CamelFolder *
get_folder (CamelFilterDriver *d, const char *uri, void *data, CamelException *ex)
{
- return mail_tool_uri_to_folder(uri, ex);
+ return mail_tool_uri_to_folder (uri, 0, ex);
}
static CamelFilterDriver *
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 83b787019d..d134bfd4ca 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -71,7 +71,7 @@ mail_tool_get_local_inbox (CamelException *ex)
CamelFolder *folder;
url = g_strdup_printf("file://%s/local/Inbox", evolution_dir);
- folder = mail_tool_uri_to_folder (url, ex);
+ folder = mail_tool_uri_to_folder (url, 0, ex);
g_free (url);
return folder;
}
@@ -279,7 +279,7 @@ mail_tool_make_message_attachment (CamelMimeMessage *message)
}
CamelFolder *
-mail_tool_uri_to_folder (const char *uri, CamelException *ex)
+mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex)
{
CamelURL *url;
CamelStore *store = NULL;
@@ -315,7 +315,7 @@ mail_tool_uri_to_folder (const char *uri, CamelException *ex)
if (offset)
folder = camel_store_get_trash (store, ex);
else
- folder = camel_store_get_folder (store, name, 0, ex);
+ folder = camel_store_get_folder (store, name, flags, ex);
camel_object_unref (CAMEL_OBJECT (store));
}
diff --git a/mail/mail-tools.h b/mail/mail-tools.h
index 7d795cafa5..d19d6553ca 100644
--- a/mail/mail-tools.h
+++ b/mail/mail-tools.h
@@ -73,7 +73,7 @@ mail_tool_make_message_attachment (CamelMimeMessage *message);
/* Parse the ui into a real CamelFolder any way we know how. */
CamelFolder *
-mail_tool_uri_to_folder (const char *uri, CamelException *ex);
+mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex);
GHashTable *
mail_lookup_url_table (CamelMimeMessage *mime_message);
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 4bb56e8983..1faf912cc5 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -98,7 +98,7 @@ vfolder_setup_do(struct _mail_msg *mm)
l = m->sources_uri;
while (l) {
(printf(" Adding uri: %s\n", (char *)l->data));
- folder = mail_tool_uri_to_folder(l->data, &mm->ex);
+ folder = mail_tool_uri_to_folder (l->data, 0, &mm->ex);
if (folder) {
list = g_list_append(list, folder);
} else {
@@ -217,7 +217,7 @@ vfolder_adduri_do(struct _mail_msg *mm)
}
if (folder == NULL)
- folder = mail_tool_uri_to_folder(m->uri, &mm->ex);
+ folder = mail_tool_uri_to_folder (m->uri, 0, &mm->ex);
if (folder != NULL) {
if (folder != drafts_folder && folder != outbox_folder && folder != sent_folder) {