aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-05-08 04:36:18 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-05-08 04:36:18 +0800
commita02934f6a81406fa9509025e94199e9e78ea59a8 (patch)
tree936bd1e9a56db46f0358956f6166913b10799050 /mail/em-folder-tree.c
parent6b70641a976fd56ca4df9b49e620da0fd1b3e2df (diff)
downloadgsoc2013-evolution-a02934f6a81406fa9509025e94199e9e78ea59a8.tar.gz
gsoc2013-evolution-a02934f6a81406fa9509025e94199e9e78ea59a8.tar.zst
gsoc2013-evolution-a02934f6a81406fa9509025e94199e9e78ea59a8.zip
Fix for bug #57152.
2004-05-07 Jeffrey Stedfast <fejj@ximian.com> Fix for bug #57152. * em-folder-tree.c (emft_get_folder_info__got): If we queried for a recursive folder-info listing, then pass fully_loaded as TRUE to set_folder_info(). (emft_get_folder_info__got): If we find that a folder doesn't have children, set the expanded state to FALSE. * em-folder-tree-model.c (em_folder_tree_model_set_folder_info): Now takes a "fully_loaded" argument to hint to set_folder_info whether or not folder-info's without child nodes can possibly have children (eg. if fully_loaded is set and fi->child is NULL, then 'load' will be FALSE no matter what fi->flags contains). svn path=/trunk/; revision=25826
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 68bf9eceb2..bf814c1bb4 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -145,6 +145,8 @@ static void em_folder_tree_finalize (GObject *obj);
static gboolean emft_save_state (EMFolderTree *emft);
static void emft_queue_save_state (EMFolderTree *emft);
+static void emft_update_model_expanded_state (struct _EMFolderTreePrivate *priv, GtkTreeIter *iter, gboolean expanded);
+
static void emft_tree_row_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, EMFolderTree *emft);
static void emft_tree_row_collapsed (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *path, EMFolderTree *emft);
static void emft_tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *path, EMFolderTree *emft);
@@ -1701,10 +1703,13 @@ emft_get_folder_info__got (struct _mail_msg *mm)
if (fi == NULL) {
/* no children afterall... remove the "Loading..." placeholder node */
+ emft_update_model_expanded_state (priv, &root, FALSE);
gtk_tree_store_remove (model, &iter);
} else {
+ int fully_loaded = (m->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) ? TRUE : FALSE;
+
do {
- em_folder_tree_model_set_folder_info (priv->model, &iter, si, fi);
+ em_folder_tree_model_set_folder_info (priv->model, &iter, si, fi, fully_loaded);
if ((fi = fi->next) != NULL)
gtk_tree_store_append (model, &iter, &root);