From 65705e4f55560889ac6de638aa8f3245c06349c0 Mon Sep 17 00:00:00 2001 From: Jonathon Jongsma Date: Wed, 9 Dec 2009 14:29:49 -0600 Subject: Make the mail folder cache a proper GObject mail-folder-cache previously was a bit of a pseudo object (sort of a singleton) that operated on some file static data. This commit re-factors things so that it is a proper class named MailFolderCache. At the moment, this doesn't gain us much, but in the future, it will allow us to add signals, etc so that we can de-couple a lot of the interdependencies in here. This is essentially a pre-requisite to splitting up a lot of the mail backend stuff. https://bugzilla.gnome.org/show_bug.cgi?id=604627 --- mail/mail-vfolder.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mail/mail-vfolder.c') diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index d95ee2b876..f58886b214 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -255,7 +255,9 @@ vfolder_adduri_exec (struct _adduri_msg *m) /* we dont try lookup the cache if we are removing it, its no longer there */ - if (!m->remove && !mail_note_get_folder_from_uri(m->uri, &folder)) { + if (!m->remove && + !mail_folder_cache_get_folder_from_uri(mail_folder_cache_get_default (), + m->uri, &folder)) { g_warning("Folder '%s' disappeared while I was adding/remove it to/from my vfolder", m->uri); return; } @@ -707,7 +709,8 @@ rule_add_sources(GList *l, GList **sources_folderp, GList **sources_urip) while (l) { gchar *curi = em_uri_to_camel(l->data); - if (mail_note_get_folder_from_uri(curi, &newfolder)) { + if (mail_folder_cache_get_folder_from_uri + (mail_folder_cache_get_default (), curi, &newfolder)) { if (newfolder) sources_folder = g_list_append(sources_folder, newfolder); else -- cgit