From 8079db6e4695e37c2b7777e61d6e657e7eadc564 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 1 Jun 2009 20:12:34 +0200 Subject: Bug #337082 - Do not produce unnamed folders in a folder tree --- mail/em-folder-tree.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mail') diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 25c7809c54..182a40df36 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -1775,9 +1775,12 @@ emft_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m) gint fully_loaded = (m->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) ? TRUE : FALSE; do { - em_folder_tree_model_set_folder_info (priv->model, &iter, si, fi, fully_loaded); + gboolean known = g_hash_table_lookup (si->full_hash, fi->full_name) != NULL; - if ((fi = fi->next) != NULL) + if (!known) + em_folder_tree_model_set_folder_info (priv->model, &iter, si, fi, fully_loaded); + + if ((fi = fi->next) != NULL && !known) gtk_tree_store_append (model, &iter, &root); } while (fi != NULL); } @@ -1863,8 +1866,7 @@ emft_tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *t return; } - /* do not set LOAD_SUBDIRS to FALSE until we are really done with loading */ - /* gtk_tree_store_set ((GtkTreeStore *)model, root, COL_BOOL_LOAD_SUBDIRS, FALSE, -1); */ + gtk_tree_store_set ((GtkTreeStore *)model, root, COL_BOOL_LOAD_SUBDIRS, FALSE, -1); m = mail_msg_new (&get_folder_info_info); m->root = gtk_tree_row_reference_new (model, tree_path); -- cgit v1.2.3