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 | |
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')
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/component-factory.c | 17 |
2 files changed, 22 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index d784aa1f79..4bcf917cc4 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2001-07-22 Ettore Perazzoli <ettore@ximian.com> + + * component-factory.c (remove_folder): Updated to get a @type + argument. Return an error if the type isn't "mail". + (xfer_folder): Likewise. + 2001-07-21 Ettore Perazzoli <ettore@ximian.com> * component-factory.c: Make types "mailstorage" and "vtrash" 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); |