diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-02-15 05:33:58 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-02-15 05:33:58 +0800 |
commit | 5ef8138ee874c6ba2c3582e3b6b624611ce3418b (patch) | |
tree | dad5b8f3bf8fd20649bcb2a3ba57c222f3c7916b /mail/component-factory.c | |
parent | 6facd92e17699de1e036eab4be02b09e00f3d6de (diff) | |
download | gsoc2013-evolution-5ef8138ee874c6ba2c3582e3b6b624611ce3418b.tar.gz gsoc2013-evolution-5ef8138ee874c6ba2c3582e3b6b624611ce3418b.tar.zst gsoc2013-evolution-5ef8138ee874c6ba2c3582e3b6b624611ce3418b.zip |
Setup the Trash folder.
2001-02-14 Jeffrey Stedfast <fejj@ximian.com>
* component-factory.c (owner_set_cb): Setup the Trash folder.
* mail-ops.c (create_trash_vfolder): Do better error handling.
(populate_folder_urls): Oops, helps to strdup the url into the
array if we plan on freeing the data.
(mail_get_trash): New async function that may eventually replace
mail_do_setup_trash().
(do_setup_trash): Do better error handling.
* mail-local.c (mail_local_store_class_init): Override
get_folder_info.
(get_folder_info): Implement.
svn path=/trunk/; revision=8228
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r-- | mail/component-factory.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c index 376b3b14a7..f46a0a5f9b 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -54,6 +54,7 @@ CamelFolder *drafts_folder = NULL; CamelFolder *outbox_folder = NULL; CamelFolder *sent_folder = NULL; /* this one should be configurable? */ +CamelFolder *trash_folder = NULL; char *evolution_dir; #define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ShellComponentFactory" @@ -112,7 +113,7 @@ create_view (EvolutionShellComponent *shell_component, } static void -do_create_folder(char *uri, CamelFolder *folder, void *data) +do_create_folder (char *uri, CamelFolder *folder, void *data) { GNOME_Evolution_ShellComponentListener listener = data; CORBA_Environment ev; @@ -140,11 +141,12 @@ create_folder (EvolutionShellComponent *shell_component, CORBA_Environment ev; CORBA_exception_init(&ev); - if (!strcmp(type, "mail")) { + if (!strcmp (type, "mail")) { uri = g_strdup_printf ("mbox://%s", physical_uri); - mail_create_folder(uri, do_create_folder, CORBA_Object_duplicate(listener, &ev)); + mail_create_folder (uri, do_create_folder, CORBA_Object_duplicate (listener, &ev)); } else { - GNOME_Evolution_ShellComponentListener_notifyResult(listener, GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev); + GNOME_Evolution_ShellComponentListener_notifyResult ( + listener, GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev); } CORBA_exception_free(&ev); } @@ -158,13 +160,14 @@ static struct { { "Sent", &sent_folder }, }; -static void got_folder(char *uri, CamelFolder *folder, void *data) +static void +got_folder (char *uri, CamelFolder *folder, void *data) { CamelFolder **fp = data; - + if (folder) { *fp = folder; - camel_object_ref((CamelObject *)folder); + camel_object_ref (CAMEL_OBJECT (folder)); } } @@ -210,10 +213,14 @@ owner_set_cb (EvolutionShellComponent *shell_component, mail_msg_wait (mail_get_folder (uri, got_folder, standard_folders[i].folder)); g_free (uri); } - + + /*mail_msg_wait (mail_get_trash ("file:/", got_folder, &trash_folder));*/ + mail_do_setup_trash (_("Trash"), "file:/", &trash_folder); + mail_operation_wait_for_finish (); + mail_session_enable_interaction (TRUE); - - mail_autoreceive_setup(); + + mail_autoreceive_setup (); } static void |