aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-02-25 19:20:20 +0800
committerMilan Crha <mcrha@src.gnome.org>2009-02-25 19:20:20 +0800
commit610cdfa9fd132feda1398c778d5c11643cd6618e (patch)
tree0122a0973bc4e5fb7819c9bac62b0ace1c119f14 /mail
parent7a05751402b2f93604782568678fc91e8d47617a (diff)
downloadgsoc2013-evolution-610cdfa9fd132feda1398c778d5c11643cd6618e.tar.gz
gsoc2013-evolution-610cdfa9fd132feda1398c778d5c11643cd6618e.tar.zst
gsoc2013-evolution-610cdfa9fd132feda1398c778d5c11643cd6618e.zip
** Fix for bug #572268
2009-02-25 Milan Crha <mcrha@redhat.com> ** Fix for bug #572268 * em-subscribe-editor.c: (sub_fill_level): Do not duplicate "Loading..." node when adding to existing node. svn path=/trunk/; revision=37330
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-subscribe-editor.c11
2 files changed, 15 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 6c48396f08..4043d11b87 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,12 @@
2009-02-25 Milan Crha <mcrha@redhat.com>
+ ** Fix for bug #572268
+
+ * em-subscribe-editor.c: (sub_fill_level):
+ Do not duplicate "Loading..." node when adding to existing node.
+
+2009-02-25 Milan Crha <mcrha@redhat.com>
+
** Part of fix for bug #563212
* em-utils.c: (try_open_e_book_cb), (try_open_e_book),
diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c
index a6ce5d7485..bca062b096 100644
--- a/mail/em-subscribe-editor.c
+++ b/mail/em-subscribe-editor.c
@@ -288,6 +288,8 @@ sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, in
/* first, fill a level up */
fi = info;
while (fi) {
+ gboolean known = FALSE;
+
if ((node = g_hash_table_lookup(sub->folders, fi->full_name)) == NULL) {
gboolean state;
@@ -301,6 +303,7 @@ sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, in
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);
+ known = TRUE;
}
d(printf("flags & CAMEL_FOLDER_NOCHILDREN=%d, f & CAMEL_FOLDER_NOINFERIORS=%d\t fi->full_name=[%s], node->path=%p\n",
@@ -315,9 +318,11 @@ sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, in
sub_fill_level(sub, fi->child, &iter, FALSE);
} else if (!(fi->flags & CAMEL_FOLDER_NOCHILDREN)) {
GtkTreeIter new_iter;
- d(printf("flags: CAMEL_FOLDER_NOCHILDREN is not set '%s'\n", fi->full_name));
- gtk_tree_store_append(treestore, &new_iter, &iter);
- gtk_tree_store_set(treestore, &new_iter, 0, 0, 1, "Loading...", 2, NULL, -1);
+ d(printf("flags: CAMEL_FOLDER_NOCHILDREN is not set '%s', known:%d\n", fi->full_name, known?1:0));
+ if (!known) {
+ gtk_tree_store_append(treestore, &new_iter, &iter);
+ gtk_tree_store_set(treestore, &new_iter, 0, 0, 1, "Loading...", 2, NULL, -1);
+ }
}
else {
if (pending)