diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/em-folder-tree-model.c | 1 | ||||
-rw-r--r-- | mail/em-folder-tree.c | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index 9154e13c48..4322e5e9f4 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -1000,6 +1000,7 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model, COL_STRING_FULL_NAME, NULL, COL_BOOL_LOAD_SUBDIRS, FALSE, COL_BOOL_IS_STORE, FALSE, + COL_BOOL_IS_FOLDER, FALSE, COL_STRING_URI, NULL, COL_UINT_UNREAD, 0, COL_UINT_UNREAD_LAST_SEL, 0, -1); diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 12491c857e..0217a7aa58 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -243,11 +243,21 @@ folder_tree_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m) /* get the first child (which will be a dummy node) */ gtk_tree_model_iter_children (model, &iter, &root); - /* Traverse to the last valid iter */ + /* Traverse to the last valid iter, or the "Loading..." node */ titer = iter; - while (gtk_tree_model_iter_next (model, &iter)) + do { + gboolean is_store_node = FALSE, is_folder_node = FALSE; + titer = iter; /* Preserve the last valid iter */ + gtk_tree_model_get (model, &iter, COL_BOOL_IS_STORE, &is_store_node, COL_BOOL_IS_FOLDER, &is_folder_node, -1); + + /* stop on a "Loading..." node */ + if (!is_store_node && !is_folder_node) + break; + + } while (gtk_tree_model_iter_next (model, &iter)); + iter = titer; /* FIXME: camel's IMAP code is totally on crack here, @top's |