--- evolution-2.8.2.1.orig/mail/em-folder-tree-model.c	2006-04-10 10:53:15.000000000 +0200
+++ evolution-2.8.2.1/mail/em-folder-tree-model.c	2007-02-21 01:55:28.732596361 +0100
@@ -77,6 +77,7 @@ static GType col_types[] = {
 static void em_folder_tree_model_class_init (EMFolderTreeModelClass *klass);
 static void em_folder_tree_model_init (EMFolderTreeModel *model);
 static void em_folder_tree_model_finalize (GObject *obj);
+static void tree_model_touch_parents (EMFolderTreeModel *model, GtkTreeIter *iter);
 
 /* interface init methods */
 static void tree_model_iface_init (GtkTreeModelIface *iface);
@@ -307,6 +308,21 @@ em_folder_tree_model_finalize (GObject *
 	G_OBJECT_CLASS (parent_class)->finalize (obj);
 }
 
+static void
+tree_model_touch_parents (EMFolderTreeModel *model, GtkTreeIter *iter)
+{
+	GtkTreeIter cur_iter = *iter;
+	GtkTreeIter parent;
+	GtkTreePath *path;
+	
+	while (gtk_tree_model_iter_parent (model, &parent, &cur_iter)) {
+		cur_iter = parent;
+
+		path = gtk_tree_model_get_path (model, &cur_iter);
+		gtk_tree_model_row_changed (model, path, &cur_iter);
+		gtk_tree_path_free (path);
+	}
+}
 
 static void
 tree_model_iface_init (GtkTreeModelIface *iface)
@@ -506,6 +522,7 @@ em_folder_tree_model_set_folder_info (EM
 
 	if (unread != ~0)
 		gtk_tree_store_set ((GtkTreeStore *) model, iter, COL_UINT_UNREAD, unread, -1);
+	tree_model_touch_parents (model, iter);
 	
 	if (load) {
 		/* create a placeholder node for our subfolders... */
@@ -797,6 +814,8 @@ em_folder_tree_model_add_store (EMFolder
 			    COL_BOOL_LOAD_SUBDIRS, TRUE,
 			    COL_BOOL_IS_STORE, TRUE,
 			    COL_STRING_URI, uri, -1);
+	tree_model_touch_parents (model, &iter);
+	
 	
 	path = gtk_tree_model_get_path ((GtkTreeModel *) model, &iter);
 	row = gtk_tree_row_reference_new ((GtkTreeModel *) model, path);
@@ -1144,6 +1163,7 @@ em_folder_tree_model_set_unread_count (E
 	gtk_tree_path_free (tree_path);
 	
 	gtk_tree_store_set ((GtkTreeStore *) model, &iter, COL_UINT_UNREAD, unread, -1);
+	tree_model_touch_parents (model, &iter);
 }
 
 
