[evolution/wip/gsettings] Add em_folder_tree_model_list_stores().



commit 4abf3ae25f6519a6378a215d35b7a2955b903f9b
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat May 28 18:15:21 2011 -0400

    Add em_folder_tree_model_list_stores().
    
    Lists all the CamelStores added to EMFolderTreeModel.  Note that
    CamelStores with a corresponding EAccount are only added if the EAccount
    is enabled, so it's safe to assume all returned CamelStores are enabled.

 mail/em-folder-tree-model.c |    8 ++++++++
 mail/em-folder-tree-model.h |    2 ++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 7c4bbeb..7995550 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -1111,6 +1111,14 @@ em_folder_tree_model_remove_store (EMFolderTreeModel *model,
 	em_folder_tree_model_remove_folders (model, si, &iter);
 }
 
+GList *
+em_folder_tree_model_list_stores (EMFolderTreeModel *model)
+{
+	g_return_val_if_fail (EM_IS_FOLDER_TREE_MODEL (model), NULL);
+
+	return g_hash_table_get_keys (model->priv->store_index);
+}
+
 void
 em_folder_tree_model_remove_folders (EMFolderTreeModel *model,
                                      EMFolderTreeModelStoreInfo *si,
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h
index 419323a..40c2afc 100644
--- a/mail/em-folder-tree-model.h
+++ b/mail/em-folder-tree-model.h
@@ -137,6 +137,8 @@ void		em_folder_tree_model_add_store
 void		em_folder_tree_model_remove_store
 					(EMFolderTreeModel *model,
 					 CamelStore *store);
+GList *		em_folder_tree_model_list_stores
+					(EMFolderTreeModel *model);
 void		em_folder_tree_model_remove_folders
 					(EMFolderTreeModel *model,
 					 EMFolderTreeModelStoreInfo *si,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]