rhythmbox should allow multiple discontinuous genre/artist/album selections

Bug #23213 reported by David Mandelberg
8
Affects Status Importance Assigned to Milestone
rhythmbox (Ubuntu)
Invalid
Low
Sebastien Bacher

Bug Description

The rhythmbox library browser should allow control-clicking to select multiple
genres/artists/albums that aren't next to each other.

: $; dpkg -l rhythmbox | grep ^ii | awk '{print $2" "$3}'
rhythmbox 0.9.0-0ubuntu6

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for the bug report. It works charmingly nice for me. Could you elaborate
on what you are exactly trying to do or maybe provide a screenshot?

Revision history for this message
Sebastien Bacher (seb128) wrote :

works fine for me too

Revision history for this message
David Mandelberg (dseomn) wrote :

This is what happens:

Artist list:
*All
Bar
Baz
Foo

click Foo

Artist list:
All
Bar
Baz
*Foo

hold down control and click Bar

Artist list:
All
Bar
Baz
*Foo

the last artist list should be:
All
*Bar
Baz
*Foo

Revision history for this message
David Mandelberg (dseomn) wrote :

It seems to be working now.

Revision history for this message
David Mandelberg (dseomn) wrote :

It stopped working again and I found (what I think is) the problem by accident.

When mouse highlight on control is enabled (System -> Preferences -> Mouse ->
Cursors -> the checkbox at the bottom), it doesn't work (or it works at a few
"random" times) and when it's disabled it works consistently.

I think this might be a problem with X? something? not passing the control-click
to rhythmbox, but I'm not sure, so I'll leave this bug under rhythmbox because
it's the only place I've noticed this problem.

Revision history for this message
David Mandelberg (dseomn) wrote :

By the way, the relevent code is:

widgets/rb-property-view.c:
rb_property_view_set_selection_mode (RBPropertyView *view,
                                     GtkSelectionMode mode)
{
        g_return_if_fail (mode == GTK_SELECTION_SINGLE || mode ==
GTK_SELECTION_MULTIPLE);
        gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW
(view->priv->treeview)),
                                     mode);
}

and

sources/rb-library-source.c:
rb_property_view_set_selection_mode (source->priv->XXXXXX, GTK_SELECTION_MULTIPLE);

where XXXXXX is one of genre, album, and artist.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks David for investigating, however I'm not quite sure, what you intend us
to do now?

Revision history for this message
David Mandelberg (dseomn) wrote :

I want control-clicking to work when the mouse highlight is enabled. I don't
know whether the problem is in rhythmbox, gtk, or the highlighter program, but
if it's in the highlighter program, I think it should do something like:

grabKey(<control>)
grabKey(<control-release>)
if (key == <control>)
  passToApplication(<control>)
  previousKey = <control>
if (key == <control-release>)
  passToApplication(<control-release>)
  if (previousKey == <control>)
    highlightMouse()

In essence, if the problem is in the <control>-grabber program because it
doesn't pass all keys to the application or waits for a control-release to pass
the key(s), it should pass all keys unconditionally.

Revision history for this message
David Mandelberg (dseomn) wrote :

The package that does the highlighting is gnome-control-center. The grab code is
in gnome-settings-daemon/gnome-settings-mouse.c:

if (keyval == GDK_Control_L || keyval == GDK_Control_R)
        {
          if (xev->type == KeyPress)
            {
              XAllowEvents (gdk_x11_get_default_xdisplay (),
                            SyncKeyboard,
                            xev->xkey.time);
            }
          else
            {
              XAllowEvents (gdk_x11_get_default_xdisplay (),
                            AsyncKeyboard,
                            xev->xkey.time);
              gnome_settings_locate_pointer (screen);
            }
        }
      else
        {
          XAllowEvents (gdk_x11_get_default_xdisplay (),
                        ReplayKeyboard,
                        xev->xkey.time);
          XUngrabKeyboard (gdk_x11_get_default_xdisplay (),
                           xev->xkey.time);
        }

I found documentation of XAllowEvents with the {Replay,Sync,Async}Keyboard
options at http://tronche.com/gui/x/xlib/input/XAllowEvents.html and it looks
like the problem is with SyncKeyboard ("At this time, the keyboard again appears
to freeze."). I really don't know much about how X works, so I might be way off
mark.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Right, that's a duplicate of bug #9441 which is known upstream:
http://bugzilla.gnome.org/show_bug.cgi?id=125618. Feel free to comment on the
upstream bug

This bug has been marked as a duplicate of bug 9441.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.