aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/component-factory.c17
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);