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 331740 - Highlight browsed Genre/Artist/Album
Highlight browsed Genre/Artist/Album
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: User Interface
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on: 322787
Blocks:
 
 
Reported: 2006-02-19 04:05 UTC by Alex Lancaster
Modified: 2006-05-10 11:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Restores selection if using "Browse This Artist/Album/Genre" (3.84 KB, patch)
2006-04-14 10:12 UTC, Alex Lancaster
none Details | Review
Better patch by James Livingston to fix Python bindings too (4.96 KB, patch)
2006-05-09 13:01 UTC, Alex Lancaster
none Details | Review
alternate patch (4.55 KB, patch)
2006-05-09 23:45 UTC, Jonathan Matthew
none Details | Review
Fixed Jonathan's alternate patch (5.08 KB, patch)
2006-05-10 07:03 UTC, Alex Lancaster
committed Details | Review

Description Alex Lancaster 2006-02-19 04:05:37 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.
Comment 1 Alex Lancaster 2006-03-16 12:14:31 UTC
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.
Comment 2 Alex Lancaster 2006-04-14 09:22:21 UTC
There has been a regression against CVS HEAD.  This no longer works, the browser doesn't highlight the selected album/artist/genre.  Re-opening.
Comment 3 Alex Lancaster 2006-04-14 09:31:45 UTC
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.
Comment 4 Alex Lancaster 2006-04-14 09:36:25 UTC
Yep, backing out the 2006-03-29 change to widgets/rb-library-browser.c fixes it.
Comment 5 Alex Lancaster 2006-04-14 10:12:32 UTC
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.
Comment 6 Alex Lancaster 2006-05-09 13:01:18 UTC
Created attachment 65088 [details] [review]
Better patch by James Livingston to fix Python bindings too
Comment 7 Alex Lancaster 2006-05-09 13:12:33 UTC
This worked for me, James and  Gareth Murphy as reported on IRC.
Comment 8 Jonathan Matthew 2006-05-09 23:45:26 UTC
Created attachment 65131 [details] [review]
alternate patch

this also works, and it looks a bit less wrong to me.
Comment 9 Alex Lancaster 2006-05-10 00:03:25 UTC
(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?
Comment 10 Alex Lancaster 2006-05-10 07:03:10 UTC
Created attachment 65140 [details] [review]
Fixed Jonathan's alternate patch

When patch fixed and updated to CVS, this works for me.
Comment 11 James "Doc" Livingston 2006-05-10 09:16:17 UTC
Looks good to me.
Comment 12 Jonathan Matthew 2006-05-10 11:38:17 UTC
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.