Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.1517
diff -u -r1.1517 ChangeLog
--- ChangeLog	2001/08/08 18:24:53	1.1517
+++ ChangeLog	2001/08/08 18:47:19
@@ -1,5 +1,13 @@
 2001-08-08  Peter Williams  <peterw@ximian.com>
 
+	* mail-folder-cache.c: Display how many messages are selected,
+	too.
+	(make_folder_status): If multiple messages are selected, add that
+	to the string (the 0 and 1 cases are boring)
+	(selection_changed): New function, update the selected count.
+	(mail_folder_cache_note_fb): Connect to the selection_changed
+	signal.
+
 	* subscribe-dialog.c (sc_selection_changed): New function. Set the
 	sensitivity of the subscribe buttons based on whether any folders
 	are selected.
Index: mail-folder-cache.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-folder-cache.c,v
retrieving revision 1.15
diff -u -r1.15 mail-folder-cache.c
--- mail-folder-cache.c	2001/08/06 16:39:15	1.15
+++ mail-folder-cache.c	2001/08/08 18:47:19
@@ -50,7 +50,8 @@
 	MAIL_FIF_PATH_VALID = (1 << 5),
 	MAIL_FIF_NAME_VALID = (1 << 6),
 	MAIL_FIF_UPDATE_QUEUED = (1 << 7),
-	MAIL_FIF_FB_VALID = (1 << 8)
+	MAIL_FIF_FB_VALID = (1 << 8),
+	MAIL_FIF_SELECTED_VALID = (1 << 9)
 } mfif;
 
 typedef enum mail_folder_info_update_mode {
@@ -73,7 +74,7 @@
 	gchar *name;
 
 	guint flags;
-	guint unread, total, hidden;
+	guint unread, total, hidden, selected;
 
 	FolderBrowser *fb;
 
@@ -154,6 +155,13 @@
 		set_one = TRUE;
 	}
 		
+	if (mfi->flags & MAIL_FIF_SELECTED_VALID && mfi->selected > 1) {
+		if (set_one)
+			work = g_string_append (work, _(", "));
+		g_string_sprintfa (work, _("%d selected"), mfi->selected);
+		set_one = TRUE;
+	}
+		
 	if (mfi->flags & MAIL_FIF_TOTAL_VALID) {
 		if (set_one)
 			work = g_string_append (work, _(", "));
@@ -424,6 +432,23 @@
 }
 
 static void
+selection_changed (ESelectionModel *esm, gpointer user_data)
+{
+	mail_folder_info *mfi = user_data;
+	
+	d(g_message ("Selection model %p changed, checking selected", esm));
+
+	LOCK_FOLDERS ();
+
+	mfi->selected = e_selection_model_selected_count (esm);
+	mfi->flags |= MAIL_FIF_SELECTED_VALID;
+
+	UNLOCK_FOLDERS ();
+
+	maybe_update (mfi);
+}
+
+static void
 check_for_fb_match (gpointer key, gpointer value, gpointer user_data)
 {
 	mail_folder_info *mfi = (mail_folder_info *) value;
@@ -634,6 +659,8 @@
 
 	gtk_signal_connect (GTK_OBJECT (fb->message_list), "message_list_built",
 			    message_list_built, mfi);
+	gtk_signal_connect (GTK_OBJECT (e_tree_get_selection_model (fb->message_list->tree)),
+			    "selection_changed", selection_changed, mfi);
 
 	UNLOCK_FOLDERS ();
 
