aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-local.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-02-23 06:27:40 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-02-23 06:27:40 +0800
commit351903ad90942abecccf363f97a6639c74ef2e58 (patch)
tree9ab0be988df48a43aac83f2a789a9918e24d2517 /mail/mail-local.c
parent7698a3941bb5ad9faf3b5b4831e0400f81cc9b64 (diff)
downloadgsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.tar
gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.tar.gz
gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.tar.bz2
gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.tar.lz
gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.tar.xz
gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.tar.zst
gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.zip
Make op cancellable/report internals. (get_folder_get):
2001-02-23 Not Zed <NotZed@Ximian.com> * mail-ops.c (create_folder_get): Make op cancellable/report internals. (get_folder_get): (sync_folder_sync): (get_folderinfo_get): Make op cancellable/report internals. * mail-vtrash.c (get_trash_get): Setup the operation registration, and create a pseudo "start/stop" operation. * component-factory.c (owner_set_cb): Make trash creation async. * mail-local.c (register_folder_desc): A description of what we're doing. * mail-mt.c (mail_msg_new): Set status callback to operation_new. (mail_operation_status): Operation status function, proxy messages to main thread, and attempt to present a meaningful ui experience for operations. svn path=/trunk/; revision=8351
Diffstat (limited to 'mail/mail-local.c')
-rw-r--r--mail/mail-local.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/mail/mail-local.c b/mail/mail-local.c
index eba6f36992..f27778aaac 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -445,6 +445,14 @@ struct _register_msg {
MailLocalFolder *local_folder;
};
+static char *register_folder_desc(struct _mail_msg *mm, int done)
+{
+ struct _register_msg *m = (struct _register_msg *)mm;
+
+ printf("returning description for %s\n", m->local_folder->uri);
+
+ return g_strdup_printf(_("Opening '%s'"), m->local_folder->uri);
+}
static void
register_folder_register(struct _mail_msg *mm)
@@ -488,7 +496,7 @@ register_folder_register(struct _mail_msg *mm)
camel_object_unref (CAMEL_OBJECT (store));
free_metainfo (meta);
- camel_operation_register(mm->cancel);
+ camel_operation_unregister(mm->cancel);
}
static void
@@ -518,17 +526,12 @@ register_folder_free(struct _mail_msg *mm)
}
static struct _mail_msg_op register_folder_op = {
- NULL,
+ register_folder_desc,
register_folder_register,
register_folder_registered,
register_folder_free,
};
-static void new_status(struct _CamelOperation *op, const char *what, int pc, void *data)
-{
- printf("oepration %s %d %% complete\n", what, pc);
-}
-
static void
local_storage_new_folder_cb (EvolutionStorageListener *storage_listener,
const char *path,
@@ -557,10 +560,6 @@ local_storage_new_folder_cb (EvolutionStorageListener *storage_listener,
m->local_folder = local_folder;
- /* HACK: so we reuse the cancel pointer */
- camel_operation_unref(m->msg.cancel);
- m->msg.cancel = camel_operation_new(new_status, m);
-
/* run synchronous, the shell expects it (I think) */
id = m->msg.seq;
e_thread_put(mail_thread_queued, (EMsg *)m);