diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-07-23 10:04:14 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-07-23 10:04:14 +0800 |
commit | 97cc1d57adcdefb5b63a704f42f692e3cffb4014 (patch) | |
tree | 8cf6ca737156fa7ae603a5b479813f6a6c5830d5 /mail/component-factory.c | |
parent | 13c7f54818b9b6a25a47289768d17e5a885cec7a (diff) | |
download | gsoc2013-evolution-97cc1d57adcdefb5b63a704f42f692e3cffb4014.tar.gz gsoc2013-evolution-97cc1d57adcdefb5b63a704f42f692e3cffb4014.tar.zst gsoc2013-evolution-97cc1d57adcdefb5b63a704f42f692e3cffb4014.zip |
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
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r-- | mail/component-factory.c | 17 |
1 files changed, 16 insertions, 1 deletions
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); |