diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-08-21 05:49:09 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-08-21 05:49:09 +0800 |
commit | a1a0a6bc4c8b444afe9ba4ee3feaec28192252ae (patch) | |
tree | 4a81395fc00f583a469cf04bd4983a56fa7d507a /mail/mail-ops.c | |
parent | ecda947f67aa5a7f2068fa73cea779c81df6806d (diff) | |
download | gsoc2013-evolution-a1a0a6bc4c8b444afe9ba4ee3feaec28192252ae.tar.gz gsoc2013-evolution-a1a0a6bc4c8b444afe9ba4ee3feaec28192252ae.tar.zst gsoc2013-evolution-a1a0a6bc4c8b444afe9ba4ee3feaec28192252ae.zip |
Modify the url and set the protocol to mbox rather than hacking it and
2001-08-20 Jeffrey Stedfast <fejj@ximian.com>
* component-factory.c (create_folder): Modify the url and set the
protocol to mbox rather than hacking it and prepending mbox: to
the uri.
* mail-local.c (get_folder): Don't prepend the folder_name with
the store's path because the hash key is folder_name, not
/folder_name.
svn path=/trunk/; revision=12325
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 40b943f99c..96c3683f2a 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1293,7 +1293,7 @@ mail_get_folder (const char *uri, void (*done) (char *uri, CamelFolder *folder, struct _get_folder_msg *m; int id; - m = mail_msg_new (&get_folder_op, NULL, sizeof(*m)); + m = mail_msg_new (&get_folder_op, NULL, sizeof (*m)); m->uri = g_strdup (uri); m->data = data; m->done = done; @@ -1387,38 +1387,43 @@ struct _create_folder_msg { void *data; }; -static char *create_folder_desc(struct _mail_msg *mm, int done) +static char * +create_folder_desc (struct _mail_msg *mm, int done) { struct _create_folder_msg *m = (struct _create_folder_msg *)mm; - return g_strdup_printf(_("Opening folder %s"), m->uri); + return g_strdup_printf (_("Creating folder %s"), m->uri); } -static void create_folder_get(struct _mail_msg *mm) +static void +create_folder_get (struct _mail_msg *mm) { struct _create_folder_msg *m = (struct _create_folder_msg *)mm; - + /* FIXME: supply a way to make indexes optional */ - m->folder = mail_tool_get_folder_from_urlname(m->uri, "mbox", - CAMEL_STORE_FOLDER_CREATE|CAMEL_STORE_FOLDER_BODY_INDEX, - &mm->ex); + m->folder = mail_tool_get_folder_from_urlname (m->uri, "mbox", + CAMEL_STORE_FOLDER_CREATE | + CAMEL_STORE_FOLDER_BODY_INDEX, + &mm->ex); } -static void create_folder_got(struct _mail_msg *mm) +static void +create_folder_got (struct _mail_msg *mm) { struct _create_folder_msg *m = (struct _create_folder_msg *)mm; - + if (m->done) - m->done(m->uri, m->folder, m->data); + m->done (m->uri, m->folder, m->data); } -static void create_folder_free(struct _mail_msg *mm) +static void +create_folder_free (struct _mail_msg *mm) { struct _create_folder_msg *m = (struct _create_folder_msg *)mm; - - g_free(m->uri); + + g_free (m->uri); if (m->folder) - camel_object_unref((CamelObject *)m->folder); + camel_object_unref (CAMEL_OBJECT (m->folder)); } static struct _mail_msg_op create_folder_op = { @@ -1429,16 +1434,16 @@ static struct _mail_msg_op create_folder_op = { }; void -mail_create_folder(const char *uri, void (*done) (char *uri, CamelFolder *folder, void *data), void *data) +mail_create_folder (const char *uri, void (*done) (char *uri, CamelFolder *folder, void *data), void *data) { struct _create_folder_msg *m; - - m = mail_msg_new(&create_folder_op, NULL, sizeof(*m)); - m->uri = g_strdup(uri); + + m = mail_msg_new (&create_folder_op, NULL, sizeof(*m)); + m->uri = g_strdup (uri); m->data = data; m->done = done; - - e_thread_put(mail_thread_new, (EMsg *)m); + + e_thread_put (mail_thread_new, (EMsg *)m); } /* ** REMOVE FOLDER ******************************************************* */ |