Index: e-filter-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-filter-bar.c,v
retrieving revision 1.58
diff -u -p -r1.58 e-filter-bar.c
--- e-filter-bar.c	29 Sep 2006 07:37:56 -0000	1.58
+++ e-filter-bar.c	7 Oct 2006 18:41:45 -0000
@@ -120,7 +120,7 @@ rule_advanced_response (GtkWidget *dialo
 			
 			efb->current_query = rule;
 			g_object_ref (rule);
-			g_signal_emit_by_name (efb, "query_changed");
+			g_signal_emit_by_name (efb, "search_activated");
 
 			gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
 			gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, &(style->text[GTK_STATE_SELECTED]));
@@ -684,6 +684,8 @@ set_property (GObject *object, guint pro
 					view_id = xml_get_prop_int (node, "view_id");
 					scope = xml_get_prop_int (node, "searchscope");
 					item_id = xml_get_prop_int (node, "item_id");
+					if (item_id == -1)
+						item_id = 0;
 
 					if (scope == E_FILTERBAR_CURRENT_FOLDER_ID)
 						is_cur_folder = TRUE;
@@ -770,7 +772,9 @@ set_property (GObject *object, guint pro
 						gtk_widget_modify_text (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, NULL);		
 						gtk_widget_modify_base (((ESearchBar *)efb)->icon_entry, GTK_STATE_NORMAL, NULL);
 						e_search_bar_paint (esb);
-						efb->current_query = NULL;
+						efb->current_query = (FilterRule *)efb->option_rules->pdata[item_id - efb->option_base];
+						if (efb->config && efb->current_query)
+							efb->config (efb, efb->current_query, item_id, "", efb->config_data);						
 					}
 					
 					xmlFree (text);
