aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree-model.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-16 05:36:43 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:08:50 +0800
commit08e62014fe4a11e3c9b4c4c46339684af36ef5ef (patch)
treef4ec2dd6001cc5f711c33d1e0da08f529f0381a7 /mail/em-folder-tree-model.c
parentc34f5d0503572d1942671d9047ee56d25e3d40ff (diff)
downloadgsoc2013-evolution-08e62014fe4a11e3c9b4c4c46339684af36ef5ef.tar
gsoc2013-evolution-08e62014fe4a11e3c9b4c4c46339684af36ef5ef.tar.gz
gsoc2013-evolution-08e62014fe4a11e3c9b4c4c46339684af36ef5ef.tar.bz2
gsoc2013-evolution-08e62014fe4a11e3c9b4c4c46339684af36ef5ef.tar.lz
gsoc2013-evolution-08e62014fe4a11e3c9b4c4c46339684af36ef5ef.tar.xz
gsoc2013-evolution-08e62014fe4a11e3c9b4c4c46339684af36ef5ef.tar.zst
gsoc2013-evolution-08e62014fe4a11e3c9b4c4c46339684af36ef5ef.zip
Adapt to new CamelSubscribable interface.
Diffstat (limited to 'mail/em-folder-tree-model.c')
-rw-r--r--mail/em-folder-tree-model.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index bbf9dd558c..05113d05b2 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -102,8 +102,11 @@ store_info_free (EMFolderTreeModelStoreInfo *si)
g_signal_handler_disconnect (si->store, si->created_id);
g_signal_handler_disconnect (si->store, si->deleted_id);
g_signal_handler_disconnect (si->store, si->renamed_id);
- g_signal_handler_disconnect (si->store, si->subscribed_id);
- g_signal_handler_disconnect (si->store, si->unsubscribed_id);
+
+ if (si->subscribed_id > 0)
+ g_signal_handler_disconnect (si->store, si->subscribed_id);
+ if (si->unsubscribed_id > 0)
+ g_signal_handler_disconnect (si->store, si->unsubscribed_id);
g_object_unref (si->store);
gtk_tree_row_reference_free (si->row);
@@ -922,7 +925,7 @@ folder_created_cb (CamelStore *store,
/* We only want created events to do more
* work if we don't support subscriptions. */
- if (camel_store_supports_subscriptions (store))
+ if (CAMEL_IS_SUBSCRIBABLE (store))
return;
/* process "folder-created" event only when store already loaded */
@@ -940,7 +943,7 @@ folder_deleted_cb (CamelStore *store,
{
/* We only want deleted events to do more
* work if we don't support subscriptions. */
- if (camel_store_supports_subscriptions (store))
+ if (CAMEL_IS_SUBSCRIBABLE (store))
return;
folder_unsubscribed_cb (store, fi, model);
@@ -1080,12 +1083,14 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model,
si->renamed_id = g_signal_connect (
store, "folder_renamed",
G_CALLBACK (folder_renamed_cb), model);
- si->subscribed_id = g_signal_connect (
- store, "folder_subscribed",
- G_CALLBACK (folder_subscribed_cb), model);
- si->unsubscribed_id = g_signal_connect (
- store, "folder_unsubscribed",
- G_CALLBACK (folder_unsubscribed_cb), model);
+ if (CAMEL_IS_SUBSCRIBABLE (store)) {
+ si->subscribed_id = g_signal_connect (
+ store, "folder_subscribed",
+ G_CALLBACK (folder_subscribed_cb), model);
+ si->unsubscribed_id = g_signal_connect (
+ store, "folder_unsubscribed",
+ G_CALLBACK (folder_unsubscribed_cb), model);
+ }
g_signal_emit (model, signals[LOADED_ROW], 0, path, &root);
gtk_tree_path_free (path);