aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-09-30 01:54:09 +0800
committerMilan Crha <mcrha@redhat.com>2009-09-30 01:54:09 +0800
commita0d0dd604b52dfa4d2a2f5378ee384292dfde5cd (patch)
tree129e9006069562718fba50b4776b25543553c561 /mail/em-folder-tree.c
parent274fd1329d6b1badd59f14435b34d41e0c231110 (diff)
downloadgsoc2013-evolution-a0d0dd604b52dfa4d2a2f5378ee384292dfde5cd.tar.gz
gsoc2013-evolution-a0d0dd604b52dfa4d2a2f5378ee384292dfde5cd.tar.zst
gsoc2013-evolution-a0d0dd604b52dfa4d2a2f5378ee384292dfde5cd.zip
Bug #594015 - Keeps "Loading..." node on the first fetch
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c14
1 files changed, 12 insertions, 2 deletions
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