aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-folder-tree-model.c4
-rw-r--r--mail/em-folder-tree.c9
3 files changed, 19 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index f750afb527..56744d90b9 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-28 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #543411
+
+ * mail/em-folder-tree-model.c: Dont load known folders.
+ * mail/em-folder-tree.c: Move iter to the last entry.
+
2008-07-25 Srinivasa Ragavan <sragavan@novell.com>
* mail/em-folder-browser.c: Make show unread/etc work well.
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index ce6e15a851..7037479c96 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -448,6 +448,10 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
const char *name;
guint32 flags;
+ /* make sure we don't already know about it? */
+ if (g_hash_table_lookup (si->full_hash, fi->full_name))
+ return;
+
if (!fully_loaded)
load = fi->child == NULL && !(fi->flags & (CAMEL_FOLDER_NOCHILDREN | CAMEL_FOLDER_NOINFERIORS));
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 3d2175a22a..0c0f5e14b0 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -1724,7 +1724,7 @@ emft_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m)
{
struct _EMFolderTreePrivate *priv = m->emft->priv;
struct _EMFolderTreeModelStoreInfo *si;
- GtkTreeIter root, iter;
+ GtkTreeIter root, iter, titer;
CamelFolderInfo *fi;
GtkTreeStore *model;
GtkTreePath *path;
@@ -1766,6 +1766,13 @@ emft_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m)
/* get the first child (which will be a dummy node) */
gtk_tree_model_iter_children ((GtkTreeModel *) model, &iter, &root);
+ /* Traverse to the last valid iter */
+ titer = iter;
+ while (gtk_tree_model_iter_next(model, &iter))
+ titer = iter; /* Preserve the last valid iter */
+
+ iter = titer;
+
/* FIXME: camel's IMAP code is totally on crack here, @top's
* folder info should be @fi and fi->child should be what we
* want to fill our tree with... *sigh* */