From 97cc1d57adcdefb5b63a704f42f692e3cffb4014 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 23 Jul 2001 02:04:14 +0000 Subject: Add an extra @type arg to the xferFolder and removeFolder methods in the ShellComponent interface. Updated the EvolutionShellComponent GTK+ wrapper and all the component accordingly. Get the calendar to use this so it can delete both tasks and calendar folders. svn path=/trunk/; revision=11300 --- mail/component-factory.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'mail/component-factory.c') diff --git a/mail/component-factory.c b/mail/component-factory.c index c0d257399d..b005863c3a 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -93,7 +93,7 @@ static const EvolutionShellComponentFolderType folder_types[] = { { "mail", "evolution-inbox.png", TRUE, accepted_dnd_types, exported_dnd_types }, { "mailstorage", "evolution-inbox.png", FALSE, NULL, NULL }, { "vtrash", "evolution-trash.png", FALSE, accepted_dnd_types, exported_dnd_types }, - { NULL, NULL, NULL, NULL } + { NULL, NULL, FALSE, NULL, NULL } }; static const char *schema_types[] = { @@ -231,6 +231,7 @@ do_remove_folder (char *uri, gboolean removed, void *data) static void remove_folder (EvolutionShellComponent *shell_component, const char *physical_uri, + const char *type, const GNOME_Evolution_ShellComponentListener listener, void *closure) { @@ -238,6 +239,13 @@ remove_folder (EvolutionShellComponent *shell_component, CORBA_exception_init (&ev); + if (strcmp (type, "mail") != 0) { + GNOME_Evolution_ShellComponentListener_notifyResult (listener, + GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev); + CORBA_exception_free (&ev); + return; + } + mail_remove_folder (physical_uri, do_remove_folder, CORBA_Object_duplicate (listener, &ev)); GNOME_Evolution_ShellComponentListener_notifyResult (listener, GNOME_Evolution_ShellComponentListener_OK, &ev); @@ -267,6 +275,7 @@ static void xfer_folder (EvolutionShellComponent *shell_component, const char *source_physical_uri, const char *destination_physical_uri, + const char *type, gboolean remove_source, const GNOME_Evolution_ShellComponentListener listener, void *closure) @@ -282,6 +291,12 @@ xfer_folder (EvolutionShellComponent *shell_component, return; } + if (strcmp (type, "mail") != 0) { + GNOME_Evolution_ShellComponentListener_notifyResult (listener, + GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev); + return; + } + camel_exception_init (&ex); source = mail_tool_uri_to_folder (source_physical_uri, &ex); camel_exception_clear (&ex); -- cgit