GNOME Bugzilla – Bug 626356
Typeahead search always uses Title field.
Last modified: 2010-08-08 11:59:50 UTC
Created attachment 167359 [details] [review] patch to improve the typeahead search It would be cool if rhythmbox used the current sort-by column for the typeahead search. I suppose I can only speak for myself, but I usually sort by Artist. Then, I would like to just type the first few letters of the artist I want to hear. Currently, rhythmbox always keys the typeahead search on the title. To me, that seems undesirable. I've attached a patch which implements this improvement. I'm more than willing to refactor it based on suggestions. thanks! -sjg
Review of attachment 167359 [details] [review]: Hi Scott, this feature request has already been raised in bug 329984, and there's some interesting discussion there about how it should work, so I'm going to close this bug as a duplicate. Please attach any further patches there. ::: widgets/rb-entry-view.c @@ +276,3 @@ gtk_tree_model_get (model, iter, 0, &entry, -1); folded = rb_search_fold (key); + entry_folded = rhythmdb_entry_get_string (entry, view->priv->sorting_folded_propid); By complicating this a bit, we can remove most of the rest of the patch: RhythmDBPropType prop_id; GList *renderers; renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (view->priv->sorting_column)); prop_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (renderers->data), CELL_PROPID_ITEM)); g_list_free (renderers); if (prop_id != 0 && rhythmdb_get_property_type (view->priv->db, prop_id) == G_TYPE_STRING) { entry_folded = rb_refstring_get_folded (rhythmdb_entry_get_refstring (entry, prop_id)); } else { entry_folded = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_TITLE_FOLDED); }
*** This bug has been marked as a duplicate of bug 329984 ***