aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-06-01 17:12:45 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-06-01 17:14:20 +0800
commitf378be19c6015119dec558dc77a2334432c2fea9 (patch)
tree3d5c1564bc2be3ffb99833769185755a0ceaadc8 /mail
parent18a8cd2426a859fa16e514bcb672079317d9db94 (diff)
downloadgsoc2013-evolution-f378be19c6015119dec558dc77a2334432c2fea9.tar
gsoc2013-evolution-f378be19c6015119dec558dc77a2334432c2fea9.tar.gz
gsoc2013-evolution-f378be19c6015119dec558dc77a2334432c2fea9.tar.bz2
gsoc2013-evolution-f378be19c6015119dec558dc77a2334432c2fea9.tar.lz
gsoc2013-evolution-f378be19c6015119dec558dc77a2334432c2fea9.tar.xz
gsoc2013-evolution-f378be19c6015119dec558dc77a2334432c2fea9.tar.zst
gsoc2013-evolution-f378be19c6015119dec558dc77a2334432c2fea9.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);