aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-06-01 17:12:45 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:22 +0800
commit56314d75e2b30367b4679298d5976a69957f66be (patch)
tree3eb26b3a31db83a3905907df67d59a9babab5020 /mail
parent37fa42f72f2c1f63599178cecbca0015662445f8 (diff)
downloadgsoc2013-evolution-56314d75e2b30367b4679298d5976a69957f66be.tar
gsoc2013-evolution-56314d75e2b30367b4679298d5976a69957f66be.tar.gz
gsoc2013-evolution-56314d75e2b30367b4679298d5976a69957f66be.tar.bz2
gsoc2013-evolution-56314d75e2b30367b4679298d5976a69957f66be.tar.lz
gsoc2013-evolution-56314d75e2b30367b4679298d5976a69957f66be.tar.xz
gsoc2013-evolution-56314d75e2b30367b4679298d5976a69957f66be.tar.zst
gsoc2013-evolution-56314d75e2b30367b4679298d5976a69957f66be.zip
mail_vfolder_add_folder(): Change parameters.
Take an EMailBackend instead of an EMailSession.
Diffstat (limited to 'mail')
-rw-r--r--mail/mail-vfolder.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index faa5a6ee26..c8e7babf5d 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -416,7 +416,7 @@ folder_is_spethal (CamelStore *store,
/**
* mail_vfolder_add_folder:
- * @session: an #EMailSession
+ * @backend: an #EMailBackend
* @store: a #CamelStore
* @folder: a folder name
* @remove: whether the folder should be removed or added
@@ -433,11 +433,12 @@ folder_is_spethal (CamelStore *store,
* NOTE: This function must be called from the main thread.
*/
static void
-mail_vfolder_add_folder (EMailSession *session,
+mail_vfolder_add_folder (EMailBackend *backend,
CamelStore *store,
const gchar *folder_name,
gint remove)
{
+ EMailSession *session;
EFilterRule *rule;
const gchar *source;
CamelVeeFolder *vf;
@@ -447,6 +448,8 @@ mail_vfolder_add_folder (EMailSession *session,
gint is_ignore;
gchar *uri;
+ session = e_mail_backend_get_session (backend);
+
provider = camel_service_get_provider (CAMEL_SERVICE (store));
remote = (provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0;
@@ -1018,18 +1021,18 @@ static void
folder_available_cb (MailFolderCache *cache,
CamelStore *store,
const gchar *folder_name,
- EMailSession *session)
+ EMailBackend *backend)
{
- mail_vfolder_add_folder (session, store, folder_name, FALSE);
+ mail_vfolder_add_folder (backend, store, folder_name, FALSE);
}
static void
folder_unavailable_cb (MailFolderCache *cache,
CamelStore *store,
const gchar *folder_name,
- EMailSession *session)
+ EMailBackend *backend)
{
- mail_vfolder_add_folder (session, store, folder_name, TRUE);
+ mail_vfolder_add_folder (backend, store, folder_name, TRUE);
}
static void
@@ -1156,10 +1159,10 @@ vfolder_load_storage (EMailBackend *backend)
g_signal_connect (
folder_cache, "folder-available",
- G_CALLBACK (folder_available_cb), session);
+ G_CALLBACK (folder_available_cb), backend);
g_signal_connect (
folder_cache, "folder-unavailable",
- G_CALLBACK (folder_unavailable_cb), session);
+ G_CALLBACK (folder_unavailable_cb), backend);
g_signal_connect (
folder_cache, "folder-deleted",
G_CALLBACK (folder_deleted_cb), backend);