diff options
author | Milan Crha <mcrha@redhat.com> | 2009-09-30 01:54:09 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-09-30 01:54:09 +0800 |
commit | a0d0dd604b52dfa4d2a2f5378ee384292dfde5cd (patch) | |
tree | 129e9006069562718fba50b4776b25543553c561 /mail | |
parent | 274fd1329d6b1badd59f14435b34d41e0c231110 (diff) | |
download | gsoc2013-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')
-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 |