aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
author0 <NotZed@Ximian.com>2001-10-30 11:28:40 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-30 11:28:40 +0800
commit093a00cf2bba85c4f1f0826dde1cb500ecc415d6 (patch)
treeafd4239a5665fbdd3f3e9dd048a818295084f44e /mail/component-factory.c
parente01b1cb6625883a4db723209c743dc03abc112ef (diff)
downloadgsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar.gz
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar.bz2
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar.lz
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar.xz
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar.zst
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.zip
Argh!!! Dont free the async op data here, the async op is still running
2001-10-30 <NotZed@Ximian.com> * subscribe-dialog.c (fe_cancel_op_foreach): Argh!!! Dont free the async op data here, the async op is still running and will access it! Just try to cancel it and mark it as cancelled (id == -1) (fe_done_subscribing): Only remove outselves from the hash table if we're not cancelled. The handle should always be set here, since this code runs in the gui thread. * message-list.c (on_cursor_activated_idle): If nothing selected/cursor not activated, then select no message. * mail-folder-cache.c (update_1folder): Make the trash count optional on EVOLUTION_COUNT_TRASH, becuase some lusers are just too stupid to understand what its for. * component-factory.c (storage_xfer_folder): Return slightly better error codes for copying folders, since its not implemented yet. * mail-vfolder.c, mail-local.c, mail-folder-cache.c, message-list.c component-factory.c, mail-ops.c, subscribe-dialog.c, mail-session.c: d() out some debug printfs, w() out some warnings. * folder-browser-ui.c (folder_browser_ui_add_message): Fix typo, Resent->Resend. svn path=/trunk/; revision=14412
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 2ac7a4a110..9d501ba815 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -55,6 +55,8 @@
#include "mail-vfolder.h"
#include "mail-autofilter.h"
+#define d(x)
+
char *default_drafts_folder_uri;
CamelFolder *drafts_folder = NULL;
char *default_sent_folder_uri;
@@ -324,7 +326,7 @@ xfer_folder (EvolutionShellComponent *shell_component,
GPtrArray *uids;
CamelURL *src, *dst;
- printf("Renaming folder '%s' to dest '%s' type '%s'\n", source_physical_uri, destination_physical_uri, type);
+ d(printf("Renaming folder '%s' to dest '%s' type '%s'\n", source_physical_uri, destination_physical_uri, type));
CORBA_exception_init (&ev);
@@ -687,11 +689,11 @@ unref_standard_folders (void)
*standard_folders[i].folder = NULL;
if (CAMEL_OBJECT (folder)->ref_count == 1)
- printf ("About to finalise folder %s\n", folder->full_name);
+ d(printf ("About to finalise folder %s\n", folder->full_name));
else
- printf ("Folder %s still has %d extra ref%s on it\n", folder->full_name,
- CAMEL_OBJECT (folder)->ref_count - 1,
- CAMEL_OBJECT (folder)->ref_count - 1 == 1 ? "" : "s");
+ d(printf ("Folder %s still has %d extra ref%s on it\n", folder->full_name,
+ CAMEL_OBJECT (folder)->ref_count - 1,
+ CAMEL_OBJECT (folder)->ref_count - 1 == 1 ? "" : "s"));
camel_object_unref (CAMEL_OBJECT (folder));
}
@@ -1160,7 +1162,7 @@ storage_xfer_folder (EvolutionStorage *storage,
char *src, *dst;
char *p, c, sep;
- printf("Transfer folder on store source = '%s' dest = '%s'\n", source_path, destination_path);
+ d(printf("Transfer folder on store source = '%s' dest = '%s'\n", source_path, destination_path));
/* Remap the 'path' to the camel friendly name based on the store dir separator */
sep = store->dir_sep;
@@ -1180,22 +1182,22 @@ storage_xfer_folder (EvolutionStorage *storage,
camel_exception_init (&ex);
if (remove_source) {
- printf("trying to rename\n");
+ d(printf("trying to rename\n"));
camel_store_rename_folder(store, src, dst, &ex);
+ if (camel_exception_is_set(&ex))
+ notify_listener (listener, GNOME_Evolution_Storage_GENERIC_ERROR);
+ else
+ notify_listener (listener, GNOME_Evolution_Storage_OK);
} else {
- printf("No remove, can't rename\n");
- camel_exception_setv(&ex, 1, "Can copy folders");
+ d(printf("No remove, can't rename\n"));
+ /* FIXME: Implement folder 'copy' for remote stores */
+ /* This exception never goes anywhere, so it doesn't need translating or using */
+ notify_listener (listener, GNOME_Evolution_Storage_UNSUPPORTED_OPERATION);
}
g_free(src);
g_free(dst);
- if (camel_exception_is_set(&ex)) {
- notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
- } else {
- notify_listener (listener, GNOME_Evolution_Storage_OK);
- }
-
camel_exception_clear (&ex);
}