--- evolution-2.0.0/mail/em-folder-browser.c.~1~	2004-07-09 18:31:04.000000000 -0700
+++ evolution-2.0.0/mail/em-folder-browser.c	2004-09-22 19:52:35.570630329 -0700
@@ -544,6 +544,14 @@
 }
 
 static void
+emfb_edit_select_subthread(BonoboUIComponent *uid, void *data, const char *path)
+{
+	EMFolderView *emfv = data;
+	
+	message_list_select_subthread(emfv->list);
+}
+
+static void
 emfb_folder_properties(BonoboUIComponent *uid, void *data, const char *path)
 {
 	EMFolderBrowser *emfb = data;
@@ -686,6 +694,7 @@
 
 	BONOBO_UI_UNSAFE_VERB ("EditInvertSelection", emfb_edit_invert_selection),
 	BONOBO_UI_UNSAFE_VERB ("EditSelectAll", emfb_edit_select_all),
+	BONOBO_UI_UNSAFE_VERB ("EditSelectSubthread", emfb_edit_select_subthread),
         BONOBO_UI_UNSAFE_VERB ("EditSelectThread", emfb_edit_select_thread),
 	BONOBO_UI_UNSAFE_VERB ("ChangeFolderProperties", emfb_folder_properties),
 	BONOBO_UI_UNSAFE_VERB ("FolderExpunge", emfb_folder_expunge),
@@ -722,6 +731,7 @@
 static const EMFolderViewEnable emfb_enable_map[] = {
 	{ "EditInvertSelection", EM_POPUP_SELECT_FOLDER },
 	{ "EditSelectAll", EM_POPUP_SELECT_FOLDER },
+	{ "EditSelectSubthread", EM_FOLDER_VIEW_SELECT_THREADED },
 	{ "EditSelectThread", EM_FOLDER_VIEW_SELECT_THREADED },
 	{ "FolderExpunge", EM_POPUP_SELECT_FOLDER },
 	{ "MailPost", EM_POPUP_SELECT_FOLDER },
--- evolution-2.0.0/mail/message-list.c.~1~	2004-08-17 19:29:32.000000000 -0700
+++ evolution-2.0.0/mail/message-list.c	2004-09-22 19:56:21.081099256 -0700
@@ -704,30 +704,62 @@
 }
 
 static void
-thread_select_foreach (ETreePath path, gpointer user_data)
+select_thread (MessageList *message_list, void (*selector)(ETreePath, gpointer))
+{
+	ETreeSelectionModel *etsm;
+	thread_select_info_t tsi;
+	
+	tsi.ml = message_list;
+	tsi.paths = g_ptr_array_new ();
+	
+	etsm = (ETreeSelectionModel *) e_tree_get_selection_model (message_list->tree);
+	
+	e_tree_selected_path_foreach (message_list->tree, selector, &tsi);
+
+	e_tree_selection_model_select_paths(etsm, tsi.paths);
+	
+	g_ptr_array_free (tsi.paths, TRUE);
+	
+}
+
+static void
+subthread_select_foreach (ETreePath path, gpointer user_data)
 {
 	thread_select_info_t *tsi = (thread_select_info_t *) user_data;
 	ETreeModel *model = tsi->ml->model;
-	ETreePath node;
-	
-	/* @path part of the initial selection. If it has children,
-	 * we select them as well. If it doesn't, we select its siblings and
-	 * their children (ie, the current node must be inside the thread
-	 * that the user wants to mark.
-	 */
 	
-	if (e_tree_model_node_get_first_child (model, path)) {
-		node = path;
-	} else {
-		node = e_tree_model_node_get_parent (model, path);
-		
-		/* Let's make an exception: if no parent, then we're about
-		 * to mark the whole tree. No. */
-		if (e_tree_model_node_is_root (model, node)) 
-			node = path;
-	}
+	e_tree_model_node_traverse (model, path, select_node, tsi);
+}
+
+/**
+ * message_list_select_subthread:
+ * @message_list: Message List widget
+ *
+ * Selects all messages in the current subthread (based on cursor).
+ **/
+void
+message_list_select_subthread (MessageList *message_list)
+{
+	select_thread(message_list, subthread_select_foreach);
+}
+
+static void
+thread_select_foreach (ETreePath path, gpointer user_data)
+{
+	thread_select_info_t *tsi = (thread_select_info_t *) user_data;
+	ETreeModel *model = tsi->ml->model;
+	ETreePath node, last;
 	
-	e_tree_model_node_traverse (model, node, select_node, tsi);
+	node = path;
+
+	do {
+		last = node;
+		node = e_tree_model_node_get_parent(model, node);
+	} while (!e_tree_model_node_is_root(model, node));
+
+	g_ptr_array_add(tsi->paths, last);
+
+	e_tree_model_node_traverse (model, last, select_node, tsi);
 }
 
 /**
@@ -739,21 +772,7 @@
 void
 message_list_select_thread (MessageList *message_list)
 {
-	ETreeSelectionModel *etsm;
-	thread_select_info_t tsi;
-	int i;
-	
-	tsi.ml = message_list;
-	tsi.paths = g_ptr_array_new ();
-	
-	etsm = (ETreeSelectionModel *) e_tree_get_selection_model (message_list->tree);
-	
-	e_tree_selected_path_foreach (message_list->tree, thread_select_foreach, &tsi);
-	
-	for (i = 0; i < tsi.paths->len; i++)
-		e_tree_selection_model_add_to_selection (etsm, tsi.paths->pdata[i]);
-	
-	g_ptr_array_free (tsi.paths, TRUE);
+	select_thread(message_list, thread_select_foreach);	
 }
 
 
--- evolution-2.0.0/mail/message-list.h.~1~	2004-07-27 19:55:52.000000000 -0700
+++ evolution-2.0.0/mail/message-list.h	2004-09-22 19:52:35.572629837 -0700
@@ -200,6 +200,7 @@
 
 /* selection manipulation */
 void           message_list_select_all (MessageList *ml);
+void           message_list_select_subthread (MessageList *ml);
 void           message_list_select_thread (MessageList *ml);
 void           message_list_invert_selection (MessageList *ml);
 
--- evolution-2.0.0/ui/evolution-mail-list.xml.~1~	2004-06-05 01:55:25.000000000 -0700
+++ evolution-2.0.0/ui/evolution-mail-list.xml	2004-09-22 19:52:35.573629591 -0700
@@ -22,6 +22,10 @@
      _tip="Select all visible messages"
      accel="*Control*a"/>
 
+    <cmd name="EditSelectSubthread"
+     _tip="Select all replies to the currently selected message"
+     accel="*Control**Shift*h"/>
+
     <cmd name="EditSelectThread"
      _tip="Select all messages in the same thread as the selected message"
      accel="*Control*h"/>
@@ -80,6 +84,7 @@
         <placeholder name="MailListEdit">
           <menuitem name="EditSelectAll" verb="" _label="Select _All"/>
           <menuitem name="EditSelectThread" verb="" _label="Select _Thread"/>
+          <menuitem name="EditSelectSubthread" verb="" _label="Select _Subthread"/>
           <menuitem name="EditInvertSelection" verb="" _label="_Invert Selection"/>
 
 	  <separator f="" name="emaillist2"/>
