diff options
author | Not Zed <NotZed@Ximian.com> | 2004-11-12 13:54:07 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-11-12 13:54:07 +0800 |
commit | d25f16e9ea91dc50cc8477576c6a7def086d34c7 (patch) | |
tree | afd1003f6acc2573c505d25b74d3e1f3c8b1691c /mail/mail-component.c | |
parent | 8e212824134c1740d05fb36799f78716c5059801 (diff) | |
download | gsoc2013-evolution-d25f16e9ea91dc50cc8477576c6a7def086d34c7.tar.gz gsoc2013-evolution-d25f16e9ea91dc50cc8477576c6a7def086d34c7.tar.zst gsoc2013-evolution-d25f16e9ea91dc50cc8477576c6a7def086d34c7.zip |
** Merge in notzed-messageinfo-branch.
2004-11-12 Not Zed <NotZed@Ximian.com>
** Merge in notzed-messageinfo-branch.
svn path=/trunk/; revision=27899
Diffstat (limited to 'mail/mail-component.c')
-rw-r--r-- | mail/mail-component.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/mail/mail-component.c b/mail/mail-component.c index 54f544762b..fe52f409df 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -100,6 +100,10 @@ struct _store_info { /* we keep a reference to these so they remain around for the session */ CamelFolder *vtrash; CamelFolder *vjunk; + + /* for setup only */ + void (*done)(CamelStore *store, CamelFolderInfo *info, void *data); + void *done_data; }; struct _MailComponentPrivate { @@ -174,6 +178,21 @@ store_info_free(struct _store_info *si) g_free(si); } +static void +mc_add_store_done(CamelStore *store, CamelFolderInfo *info, void *data) +{ + struct _store_info *si = data; + + if (si->done) + si->done(store, info, si); + + /* let the counters know about the already opened junk/trash folders */ + if (si->vtrash) + mail_note_folder(si->vtrash); + if (si->vjunk) + mail_note_folder(si->vjunk); +} + /* Utility functions. */ static void mc_add_store(MailComponent *component, CamelStore *store, const char *name, void (*done)(CamelStore *store, CamelFolderInfo *info, void *data)) @@ -183,9 +202,10 @@ mc_add_store(MailComponent *component, CamelStore *store, const char *name, void MAIL_COMPONENT_DEFAULT(component); si = store_info_new(store, name); + si->done = done; g_hash_table_insert(component->priv->store_hash, store, si); em_folder_tree_model_add_store(component->priv->model, store, si->name); - mail_note_store(store, NULL, done, component); + mail_note_store(store, NULL, mc_add_store_done, si); } static void |