diff options
author | 0 <NotZed@Ximian.com> | 2001-09-11 08:32:20 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-09-11 08:32:20 +0800 |
commit | c7e1b2cbb026ff94c0a7daf4c623b5c4116116bf (patch) | |
tree | 95dd5ae2ba8e0ea6d1bc4198e2157a47ec8b1895 /mail/mail-ops.c | |
parent | ec9803b91dc499b6864c1d1a6a8cf615760d7649 (diff) | |
download | gsoc2013-evolution-c7e1b2cbb026ff94c0a7daf4c623b5c4116116bf.tar.gz gsoc2013-evolution-c7e1b2cbb026ff94c0a7daf4c623b5c4116116bf.tar.zst gsoc2013-evolution-c7e1b2cbb026ff94c0a7daf4c623b5c4116116bf.zip |
Dynamically create the folder type list from camel. (reconfigure_clicked):
2001-09-10 <NotZed@Ximian.com>
* mail-local.c (mail_local_reconfigure_folder): Dynamically create
the folder type list from camel.
(reconfigure_clicked): And change code to handle changes.
2001-09-10 <NotZed@Ximian.com>
* merged mail_local patch from peterw. Many changes.
svn path=/trunk/; revision=12759
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 87b2905901..a8b05560fd 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1380,80 +1380,6 @@ mail_get_store (const char *uri, void (*done) (char *uri, CamelStore *store, voi return id; } -/* ** CREATE FOLDER ******************************************************* */ - -/* trying to find a way to remove this entirely and just use get_folder() - to do the same thing. But i dont think it can be done, because one works on - shell uri's (get folder), and the other only works for mail uri's ? */ - -struct _create_folder_msg { - struct _mail_msg msg; - - char *uri; - CamelFolder *folder; - void (*done) (char *uri, CamelFolder *folder, void *data); - void *data; -}; - -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 (_("Creating folder %s"), m->uri); -} - -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); -} - -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); -} - -static void -create_folder_free (struct _mail_msg *mm) -{ - struct _create_folder_msg *m = (struct _create_folder_msg *)mm; - - g_free (m->uri); - if (m->folder) - camel_object_unref (CAMEL_OBJECT (m->folder)); -} - -static struct _mail_msg_op create_folder_op = { - create_folder_desc, - create_folder_get, - create_folder_got, - create_folder_free, -}; - -void -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->data = data; - m->done = done; - - e_thread_put (mail_thread_new, (EMsg *)m); -} - /* ** REMOVE FOLDER ******************************************************* */ struct _remove_folder_msg { |