aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-08-02 11:10:09 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-08-02 11:10:09 +0800
commit09741a2eb5188392855e96538cf957e492f38c3d (patch)
tree7a355e5970a2af2134e2a2c79ea6c0da99d3cd87
parent4fbcddb3957b4c3fff2c61ea854f67d843b00b79 (diff)
downloadgsoc2013-evolution-09741a2eb5188392855e96538cf957e492f38c3d.tar
gsoc2013-evolution-09741a2eb5188392855e96538cf957e492f38c3d.tar.gz
gsoc2013-evolution-09741a2eb5188392855e96538cf957e492f38c3d.tar.bz2
gsoc2013-evolution-09741a2eb5188392855e96538cf957e492f38c3d.tar.lz
gsoc2013-evolution-09741a2eb5188392855e96538cf957e492f38c3d.tar.xz
gsoc2013-evolution-09741a2eb5188392855e96538cf957e492f38c3d.tar.zst
gsoc2013-evolution-09741a2eb5188392855e96538cf957e492f38c3d.zip
always process all nodes we have, even if we have already seen the top
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. svn path=/trunk/; revision=29949
-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;
}