From 467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 3 Mar 2004 06:39:14 +0000 Subject: if we have the folder opened already, and its the outbox, then use the 2004-03-03 Not Zed * em-inline-filter.c (emif_scan): * em-folder-tree-model.c (em_folder_tree_model_set_folder_info): if we have the folder opened already, and its the outbox, then use the total count instead of unread count. Bit of hack, but copies mail-folder-cache stuff. * mail-component.c (mc_add_store): renamed from mail_component_add_store, internal call. Added a done callback. (mc_add_local_store): renamed from mc_add_store, callback for local store. (mail_component_add_store): call mc_add_store to do the work. (mc_add_local_store_done): ugh, the target of all this shit - note all the default folders now they should be setup. * mail-folder-cache.c (mail_note_folder): clean up the logic a bit. was gonna do osmething else but it didn't work. 2004-03-02 Not Zed * mail-send-recv.c (mail_send): if we're already sending, up the again count to tell it we need to re-send again. (receive_done): if we've been asked to run a send again while we were already running it, run it again to make sure we didn't miss any new messages. See bug #46839. * em-mailer-prefs.c (em_mailer_prefs_construct): update check_incoming_imap changes for merge conflicts. (settings_changed): i have no idea what these changes jeff did do, but check_incoming_imap is no longer needed, so i've deleted most of it. 2004-02-27 Not Zed * em-format.c (emf_multipart_encrypted, emf_multipart_signed): If validation fails, display as multipart/mixed rather than unkown attachment type, and make the error a little clearer that its an error. See #52939. 2004-02-26 Not Zed * message-list.c (regen_list_regened): NOOP if the folder has changed. * mail-session.c (mail_session_check_junk_notify): remove check_incoming_imap test. (mail_session_init): " * evolution-mail.schemas.in.in: Remove check_incoming_imap option. * mail-config.glade: Remove check incoming imap checkbox. * em-mailer-prefs.c (em_mailer_prefs_construct): remove check_incoming_imap test. (em_mailer_prefs_apply): " (settings_changed): " svn path=/trunk/; revision=24944 --- mail/mail-component.c | 65 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 25 deletions(-) (limited to 'mail/mail-component.c') diff --git a/mail/mail-component.c b/mail/mail-component.c index f2d2304736..ec02f61196 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -106,16 +106,6 @@ struct _MailComponentPrivate { CamelStore *local_store; }; -/* Utility functions. */ -static void -mc_add_store(CamelStore *store, const char *name, MailComponent *mc) -{ - mail_component_add_store(mc, store, name); - - camel_object_unref(store); - g_object_unref(mc); -} - /* indexed by _mail_component_folder_t */ static struct { char *name; @@ -129,6 +119,44 @@ static struct { { "Inbox", }, /* 'always local' inbox */ }; +/* Utility functions. */ +static void +mc_add_store(MailComponent *component, CamelStore *store, const char *name, void (*done)(CamelStore *store, CamelFolderInfo *info, void *data)) +{ + char *service_name = NULL; + + MAIL_COMPONENT_DEFAULT(component); + + if (name == NULL) + name = service_name = camel_service_get_name ((CamelService *) store, TRUE); + + camel_object_ref(store); + g_hash_table_insert(component->priv->store_hash, store, g_strdup(name)); + em_folder_tree_model_add_store(component->priv->model, store, name); + mail_note_store(store, NULL, done, component); + g_free(service_name); +} + +static void +mc_add_local_store_done(CamelStore *store, CamelFolderInfo *info, void *data) +{ + MailComponent *mc = data; + int i; + + for (i=0;ilocal_store); - mail_async_event_emit(p->async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)mc_add_store, p->local_store, _("On This Computer"), mc); + mail_async_event_emit(p->async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)mc_add_local_store, p->local_store, _("On This Computer"), mc); return; fail: @@ -329,8 +357,6 @@ impl_dispose (GObject *object) { MailComponentPrivate *priv = MAIL_COMPONENT (object)->priv; - printf("mail dispose?\n"); - if (priv->activity_handler != NULL) { g_object_unref (priv->activity_handler); priv->activity_handler = NULL; @@ -706,18 +732,7 @@ mail_component_peek_activity_handler (MailComponent *component) void mail_component_add_store (MailComponent *component, CamelStore *store, const char *name) { - char *service_name = NULL; - - MAIL_COMPONENT_DEFAULT(component); - - if (name == NULL) - name = service_name = camel_service_get_name ((CamelService *) store, TRUE); - - camel_object_ref(store); - g_hash_table_insert(component->priv->store_hash, store, g_strdup(name)); - em_folder_tree_model_add_store(component->priv->model, store, name); - mail_note_store(store, NULL, NULL, NULL); - g_free(service_name); + mc_add_store(component, store, name, NULL); } /** -- cgit v1.2.3