GNOME Bugzilla – Bug 331740
Highlight browsed Genre/Artist/Album
Last modified: 2006-05-10 11:38:17 UTC
When the user selects Browse Genre/Artist/Album, the library browser should select that item in the browser (if it is visible). i.e. if the Album is selected and viewable, the browser should highlight that in the browser list. Also it should restrict the browser view, which is another special case of bug #322787.
This change in CVS actually implements this: 2006-03-16 Jonathan Matthew <jonathan@kaolin.wh9.net> * widgets/rb-library-browser.c: (rb_library_browser_set_selection): Restore the selection after rebuilding the child model, so the selection is shown correctly after using the 'browse this album/artist/genre' menu items.
There has been a regression against CVS HEAD. This no longer works, the browser doesn't highlight the selected album/artist/genre. Re-opening.
It might have been this change, haven't tested it yet: 2006-03-29 Jonathan Matthew <jonathan@kaolin.wh9.net> * widgets/rb-library-browser.c: (rb_library_browser_set_selection): No need to restore the selection after rebuilding the child model, since that can't have changed the selection.
Yep, backing out the 2006-03-29 change to widgets/rb-library-browser.c fixes it.
Created attachment 63449 [details] [review] Restores selection if using "Browse This Artist/Album/Genre" This avoids the "double-clicking" the artist problem when mouse is in the browser, but if called from the right-click context menu in the entry view "Browse This...", it will correctly highlight the selected item.
Created attachment 65088 [details] [review] Better patch by James Livingston to fix Python bindings too
This worked for me, James and Gareth Murphy as reported on IRC.
Created attachment 65131 [details] [review] alternate patch this also works, and it looks a bit less wrong to me.
(In reply to comment #8) > Created an attachment (id=65131) [edit] > alternate patch > > this also works, and it looks a bit less wrong to me. This fails to apply: $ patch -p1 < patches-manual/active/rb-browser-restore-moch.patch patching file bindings/python/rb.defs Hunk #1 succeeded at 1640 (offset 10 lines). Hunk #2 FAILED at 529. Hunk #3 FAILED at 549. Hunk #4 FAILED at 569. Hunk #5 FAILED at 36. Hunk #6 FAILED at 64. Hunk #7 FAILED at 629. 6 out of 7 hunks FAILED -- saving rejects to file bindings/python/rb.defs.rej Looks like it's missing the file names. What was wrong with the previous patch?
Created attachment 65140 [details] [review] Fixed Jonathan's alternate patch When patch fixed and updated to CVS, this works for me.
Looks good to me.
OK, committed. There wasn't really anything wrong with the other patch. It just didn't seem quite right, and I thought there had to be an easier way to do it.