aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-06-14 00:30:07 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-06-14 00:30:07 +0800
commit49ba34088bcdb9ab9cfae0c2b7fe11452fb60e24 (patch)
treeced4dd4c45416dcf15cf33b85c6b5103f5a5388a /mail/em-folder-tree.c
parentbe8ee5393471a83b24aed4de1669afd723cb3168 (diff)
downloadgsoc2013-evolution-49ba34088bcdb9ab9cfae0c2b7fe11452fb60e24.tar.gz
gsoc2013-evolution-49ba34088bcdb9ab9cfae0c2b7fe11452fb60e24.tar.zst
gsoc2013-evolution-49ba34088bcdb9ab9cfae0c2b7fe11452fb60e24.zip
Clean up EMFolderTreeModel.
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index de488c7258..0e0ff74417 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -614,7 +614,8 @@ emft_expand_node (EMFolderTreeModel *model, const gchar *key, EMFolderTree *emft
return;
}
- if (!(si = g_hash_table_lookup (priv->model->store_hash, store))) {
+ si = em_folder_tree_model_lookup_store_info (priv->model, store);
+ if (si == NULL) {
camel_object_unref (store);
return;
}
@@ -658,7 +659,7 @@ emft_maybe_expand_row (EMFolderTreeModel *model, GtkTreePath *tree_path, GtkTree
COL_BOOL_IS_STORE, &is_store,
-1);
- si = g_hash_table_lookup (model->store_hash, store);
+ si = em_folder_tree_model_lookup_store_info (model, store);
if ((account = e_get_account_by_name (si->display_name))) {
key = g_strdup_printf ("%s/%s", account->uid, full_name ? full_name : "");
} else if (CAMEL_IS_VEE_STORE (store)) {
@@ -1781,7 +1782,8 @@ emft_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m)
if (!gtk_tree_row_reference_valid (m->root))
return;
- if (!(si = g_hash_table_lookup (priv->model->store_hash, m->store))) {
+ si = em_folder_tree_model_lookup_store_info (priv->model, m->store);
+ if (si == NULL) {
/* store has been removed in the interim - do nothing */
return;
}
@@ -2356,18 +2358,6 @@ em_folder_tree_get_model (EMFolderTree *emft)
return emft->priv->model;
}
-EMFolderTreeModelStoreInfo *
-em_folder_tree_get_model_storeinfo (EMFolderTree *emft, CamelStore *store)
-{
- struct _EMFolderTreePrivate *priv = emft->priv;
- struct _EMFolderTreeModelStoreInfo *si;
-
- if (!(si = g_hash_table_lookup (priv->model->store_hash, store))) {
- g_return_val_if_reached (NULL);
- }
- return si;
-}
-
void
em_folder_tree_set_skip_double_click (EMFolderTree *emft, gboolean skip)
{