aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/em-subscribe-editor.c29
2 files changed, 21 insertions, 13 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 4f0437f8d6..ac1d83c66e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-01 Not Zed <NotZed@Ximian.com>
+
+ * em-subscribe-editor.c (sub_fill_level): always process all nodes
+ we have, even if we have already seen the top result.
+
2005-07-29 Not Zed <NotZed@Ximian.com>
** See bug #300607.
diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c
index 92588c76f9..205776e858 100644
--- a/mail/em-subscribe-editor.c
+++ b/mail/em-subscribe-editor.c
@@ -294,7 +294,7 @@ sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, in
/* first, fill a level up */
fi = info;
while (fi) {
- if (g_hash_table_lookup(sub->folders, fi->full_name) == NULL) {
+ if ((node = g_hash_table_lookup(sub->folders, fi->full_name)) == NULL) {
gboolean state;
gtk_tree_store_append(treestore, &iter, parent);
@@ -302,20 +302,23 @@ sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, in
node->info = fi;
state = (fi->flags & CAMEL_FOLDER_SUBSCRIBED) != 0;
gtk_tree_store_set(treestore, &iter, 0, state, 1, fi->name, 2, node, -1);
- if ((fi->flags & CAMEL_FOLDER_NOINFERIORS) == 0) {
+ if ((fi->flags & CAMEL_FOLDER_NOINFERIORS) == 0)
node->path = gtk_tree_model_get_path((GtkTreeModel *)treestore, &iter);
- if (node->path) {
- /* save time, if we have any children alread, dont re-scan */
- if (fi->child) {
- d(printf("scanning child '%s'\n", fi->child->full_name));
- sub_fill_level(sub, fi->child, &iter, FALSE);
- } else {
- if (pending)
- e_dlist_addtail(&sub->pending, (EDListNode *)node);
- }
- }
- }
g_hash_table_insert(sub->folders, fi->full_name, node);
+ } else if (node->path) {
+ gtk_tree_model_get_iter(gtk_tree_view_get_model(sub->tree), &iter, node->path);
+ }
+
+ if ((fi->flags & CAMEL_FOLDER_NOINFERIORS) == 0
+ && node->path) {
+ /* save time, if we have any children alread, dont re-scan */
+ if (fi->child) {
+ d(printf("scanning child '%s'\n", fi->child->full_name));
+ sub_fill_level(sub, fi->child, &iter, FALSE);
+ } else {
+ if (pending)
+ e_dlist_addtail(&sub->pending, (EDListNode *)node);
+ }
}
fi = fi->next;
}