aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-08-11 04:26:41 +0800
committerDan Winship <danw@src.gnome.org>2000-08-11 04:26:41 +0800
commit44b1cb734d895fc1a287a651101a6446af261697 (patch)
tree171e87db2b04a719e72b2e7a787199431ac994af
parent5bf17131df95ad49d7a98768b05177092ad2a618 (diff)
downloadgsoc2013-evolution-44b1cb734d895fc1a287a651101a6446af261697.tar
gsoc2013-evolution-44b1cb734d895fc1a287a651101a6446af261697.tar.gz
gsoc2013-evolution-44b1cb734d895fc1a287a651101a6446af261697.tar.bz2
gsoc2013-evolution-44b1cb734d895fc1a287a651101a6446af261697.tar.lz
gsoc2013-evolution-44b1cb734d895fc1a287a651101a6446af261697.tar.xz
gsoc2013-evolution-44b1cb734d895fc1a287a651101a6446af261697.tar.zst
gsoc2013-evolution-44b1cb734d895fc1a287a651101a6446af261697.zip
Add a "gboolean create" argument to pass to camel_store_get_folder.
* mail-tools.c (mail_tool_get_folder_from_urlname): Add a "gboolean create" argument to pass to camel_store_get_folder. * mail-ops.c (do_create_folder, do_setup_draftbox): * mail-local.c (mail_tool_local_uri_to_folder): * mail-vfolder.c (vfolder_uri_to_folder): Add create flag to mail_tool_get_folder_from_urlname calls. svn path=/trunk/; revision=4702
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/mail-local.c2
-rw-r--r--mail/mail-ops.c4
-rw-r--r--mail/mail-tools.c13
-rw-r--r--mail/mail-tools.h3
-rw-r--r--mail/mail-vfolder.c2
6 files changed, 23 insertions, 11 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index bae751424c..8584abeda7 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,13 @@
+2000-08-10 Dan Winship <danw@helixcode.com>
+
+ * mail-tools.c (mail_tool_get_folder_from_urlname): Add a
+ "gboolean create" argument to pass to camel_store_get_folder.
+
+ * mail-ops.c (do_create_folder, do_setup_draftbox):
+ * mail-local.c (mail_tool_local_uri_to_folder):
+ * mail-vfolder.c (vfolder_uri_to_folder): Add create flag to
+ mail_tool_get_folder_from_urlname calls.
+
2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
* mail-callbacks.c (composer_send_cb): Fix compile warning by
diff --git a/mail/mail-local.c b/mail/mail-local.c
index 840df79f28..02f856b769 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -163,7 +163,7 @@ mail_tool_local_uri_to_folder(const char *uri, CamelException *ex)
printf("store name is %s\n", storename);
- folder = mail_tool_get_folder_from_urlname (storename, meta->name, ex);
+ folder = mail_tool_get_folder_from_urlname (storename, meta->name, FALSE, ex);
camel_url_free(url);
free_metainfo(meta);
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 555fd53ec9..e732f887c6 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1337,7 +1337,7 @@ do_create_folder (gpointer in_data, gpointer op_data, CamelException * ex)
else {
camel_url = g_strdup_printf ("mbox://%s", input->uri);
folder = mail_tool_get_folder_from_urlname (camel_url,
- "mbox", ex);
+ "mbox", TRUE, ex);
g_free (camel_url);
if (!camel_exception_is_set (ex)) {
@@ -1747,7 +1747,7 @@ do_setup_draftbox (gpointer in_data, gpointer op_data, CamelException * ex)
gchar *url;
url = g_strdup_printf ("mbox://%s/local/Drafts", evolution_dir);
- drafts_folder = mail_tool_get_folder_from_urlname (url, "mbox", ex);
+ drafts_folder = mail_tool_get_folder_from_urlname (url, "mbox", TRUE, ex);
g_free (url);
}
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 2ae83229ef..e44d42a4df 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -88,7 +88,8 @@ void mail_tool_camel_lock_down (void)
/* **************************************** */
CamelFolder *
-mail_tool_get_folder_from_urlname (const gchar *url, const gchar *name, CamelException *ex)
+mail_tool_get_folder_from_urlname (const gchar *url, const gchar *name,
+ gboolean create, CamelException *ex)
{
CamelStore *store;
CamelFolder *folder;
@@ -110,7 +111,7 @@ mail_tool_get_folder_from_urlname (const gchar *url, const gchar *name, CamelExc
return NULL;
}
- folder = camel_store_get_folder (store, name, FALSE, ex);
+ folder = camel_store_get_folder (store, name, create, ex);
camel_object_unref (CAMEL_OBJECT (store));
mail_tool_camel_lock_down();
@@ -136,7 +137,7 @@ mail_tool_get_local_inbox (CamelException *ex)
CamelFolder *folder;
url = mail_tool_get_local_inbox_url();
- folder = mail_tool_get_folder_from_urlname (url, "mbox", ex);
+ folder = mail_tool_get_folder_from_urlname (url, "mbox", TRUE, ex);
g_free (url);
return folder;
}
@@ -145,7 +146,7 @@ CamelFolder *
mail_tool_get_inbox (const gchar *url, CamelException *ex)
{
/* FIXME: should be smarter? get_default_folder, etc */
- return mail_tool_get_folder_from_urlname (url, "inbox", ex);
+ return mail_tool_get_folder_from_urlname (url, "inbox", FALSE, ex);
}
@@ -212,7 +213,7 @@ mail_tool_do_movemail (const gchar *source_url, CamelException *ex)
/* Get the CamelFolder for our dest_path. */
- ret = mail_tool_get_folder_from_urlname (dest_url, "movemail", ex);
+ ret = mail_tool_get_folder_from_urlname (dest_url, "movemail", TRUE, ex);
g_free (dest_url);
return ret;
}
@@ -448,7 +449,7 @@ mail_tool_fetch_mail_into_searchable (const char *source_url, gboolean keep_on_s
gchar *url;
url = mail_tool_get_local_inbox_url();
- search_folder = mail_tool_get_folder_from_urlname (url, "movemail", ex);
+ search_folder = mail_tool_get_folder_from_urlname (url, "movemail", TRUE, ex);
g_free (url);
if (camel_exception_is_set (ex))
goto cleanup;
diff --git a/mail/mail-tools.h b/mail/mail-tools.h
index 03b2af8a9f..e9db4fceb3 100644
--- a/mail/mail-tools.h
+++ b/mail/mail-tools.h
@@ -33,7 +33,8 @@ void mail_tool_camel_lock_down (void);
/* Get a CamelFolder from a root url and a foldername (uses the global session)*/
CamelFolder *
-mail_tool_get_folder_from_urlname (const gchar *url, const gchar *name, CamelException *ex);
+mail_tool_get_folder_from_urlname (const gchar *url, const gchar *name,
+ gboolean create, CamelException *ex);
/* Get the url for the local inbox */
gchar *mail_tool_get_local_inbox_url (void);
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 1fc5b8b2e3..ba1a69517a 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -201,7 +201,7 @@ vfolder_uri_to_folder(const char *uri, CamelException *ex)
storeuri = g_strdup_printf("vfolder:%s/vfolder/%s", evolution_dir, info->name);
foldername = g_strdup_printf("mbox?%s", info->query);
- folder = mail_tool_get_folder_from_urlname (storeuri, foldername, ex);
+ folder = mail_tool_get_folder_from_urlname (storeuri, foldername, TRUE, ex);
sourceuri = NULL;
sources = 0;