Index: sources/rb-iradio-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-iradio-source.c,v
retrieving revision 1.112
diff -u -r1.112 rb-iradio-source.c
--- sources/rb-iradio-source.c	3 Mar 2006 00:33:37 -0000	1.112
+++ sources/rb-iradio-source.c	6 Mar 2006 00:45:49 -0000
@@ -500,6 +500,10 @@
 impl_search (RBSource *asource, const char *search_text)
 {
 	RBIRadioSource *source = RB_IRADIO_SOURCE (asource);
+	RhythmDBEntryType entry_type;
+	RhythmDBQueryModel *query_model;
+	RhythmDBPropertyModel *prop_model;
+	GPtrArray *query;
 
 	if (source->priv->initialized) {
 		if (search_text == NULL && source->priv->search_text == NULL)
@@ -517,6 +521,43 @@
 	g_free (source->priv->search_text);
 	source->priv->search_text = g_strdup (search_text);
 	rb_iradio_source_do_query (source, RB_IRADIO_QUERY_TYPE_SEARCH);
+	
+	g_object_get (G_OBJECT (source), "entry-type", &entry_type, NULL);
+
+	query = rhythmdb_query_parse (source->priv->db,
+				      RHYTHMDB_QUERY_PROP_EQUALS,
+				      RHYTHMDB_PROP_TYPE,
+				      entry_type,
+				      RHYTHMDB_QUERY_END);
+	query_model = rhythmdb_query_model_new_empty (source->priv->db);
+
+	prop_model = rb_property_view_get_model (source->priv->genres);
+
+	if (source->priv->search_text) {
+		GPtrArray *subquery = rhythmdb_query_parse (source->priv->db,
+							    RHYTHMDB_QUERY_PROP_LIKE,
+							    RHYTHMDB_PROP_GENRE_FOLDED,
+							    source->priv->search_text,
+							    RHYTHMDB_QUERY_DISJUNCTION,
+							    RHYTHMDB_QUERY_PROP_LIKE,
+							    RHYTHMDB_PROP_TITLE_FOLDED,
+							    source->priv->search_text,
+							    RHYTHMDB_QUERY_END);
+		rhythmdb_query_append (source->priv->db,
+				       query,
+				       RHYTHMDB_QUERY_SUBQUERY,
+				       subquery,
+				       RHYTHMDB_QUERY_END);
+	}
+
+
+	rhythmdb_do_full_query_parsed (source->priv->db, 
+				       RHYTHMDB_QUERY_RESULTS (query_model), 
+				       query);
+	rhythmdb_query_free (query);
+	g_object_set (G_OBJECT (prop_model), "query-model", query_model, NULL);
+
+	rb_property_view_set_model (source->priv->genres, prop_model);
 
 	rb_source_notify_filter_changed (RB_SOURCE (source));
 }
