After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626356 - Typeahead search always uses Title field.
Typeahead search always uses Title field.
Status: RESOLVED DUPLICATE of bug 329984
Product: rhythmbox
Classification: Other
Component: User Interface
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-08 10:42 UTC by Scott J. Goldman
Modified: 2010-08-08 11:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to improve the typeahead search (5.62 KB, patch)
2010-08-08 10:42 UTC, Scott J. Goldman
needs-work Details | Review

Description Scott J. Goldman 2010-08-08 10:42:36 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
Comment 1 Jonathan Matthew 2010-08-08 11:59:27 UTC
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);
  }
Comment 2 Jonathan Matthew 2010-08-08 11:59:50 UTC

*** This bug has been marked as a duplicate of bug 329984 ***