diff options
author | Dan Winship <danw@src.gnome.org> | 2000-10-25 23:27:17 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-10-25 23:27:17 +0800 |
commit | 82185d7faa88274eccd75e495d2de2a3f8f4237c (patch) | |
tree | e6669af593c145764b36408f2bfe283a69f585b5 /camel/camel-store.c | |
parent | 945c7db44f9faab6e12411c82c8459cba30c60fe (diff) | |
download | gsoc2013-evolution-82185d7faa88274eccd75e495d2de2a3f8f4237c.tar.gz gsoc2013-evolution-82185d7faa88274eccd75e495d2de2a3f8f4237c.tar.zst gsoc2013-evolution-82185d7faa88274eccd75e495d2de2a3f8f4237c.zip |
Add a "parent" field to CamelFolderInfo.
* camel-store.h: Add a "parent" field to CamelFolderInfo.
* camel-store.c (camel_folder_info_build): Deal with "parent"
(camel_store_folder_subscribed, camel_store_subscribe_folder,
camel_store_unsubscribe_folder): Add g_return_if_fails checking
that the folder supports subscriptions.
* providers/imap/camel-imap-store.c (folder_subscribed,
subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the
mail subscribe UI won't prepend / to the folder names now.
(get_folder_info): Clear the "parent" field of the folderinfos
when removing an empty top level.
* providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed,
nntp_store_subscribe_folder, nntp_store_unsubscribe_folder):
Remove "+ 1"s since the mail subscribe UI won't prepend / to the
folder names now.
svn path=/trunk/; revision=6167
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r-- | camel/camel-store.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c index 706ade9b97..ac6337acac 100644 --- a/camel/camel-store.c +++ b/camel/camel-store.c @@ -557,9 +557,11 @@ camel_folder_info_build (GPtrArray *folders, CamelFolderInfo *top, g_ptr_array_add (folders, pfi); } fi->sibling = pfi->child; + fi->parent = pfi; pfi->child = fi; } else { fi->sibling = top->child; + fi->parent = top; top->child = fi; } } @@ -591,6 +593,7 @@ camel_store_folder_subscribed (CamelStore *store, const char *folder_name) { g_return_val_if_fail (CAMEL_IS_STORE (store), FALSE); + g_return_val_if_fail (store->flags & CAMEL_STORE_SUBSCRIPTIONS, FALSE); return CS_CLASS (store)->folder_subscribed (store, folder_name); } @@ -613,6 +616,7 @@ camel_store_subscribe_folder (CamelStore *store, CamelException *ex) { g_return_if_fail (CAMEL_IS_STORE (store)); + g_return_if_fail (store->flags & CAMEL_STORE_SUBSCRIPTIONS); CS_CLASS (store)->subscribe_folder (store, folder_name, ex); } @@ -636,6 +640,7 @@ camel_store_unsubscribe_folder (CamelStore *store, CamelException *ex) { g_return_if_fail (CAMEL_IS_STORE (store)); + g_return_if_fail (store->flags & CAMEL_STORE_SUBSCRIPTIONS); CS_CLASS (store)->unsubscribe_folder (store, folder_name, ex); } |