play song in playlist by clicking on it with RMB, not LMB

This commit is contained in:
Andrzej Rybczak
2009-05-25 22:03:45 +02:00
parent d965f4e517
commit 049d0d9b35

View File

@@ -137,11 +137,14 @@ void Playlist::MouseButtonPressed(MEVENT me)
{ {
if (w->Empty() || !w->hasCoords(me.x, me.y) || size_t(me.y) >= w->Size()) if (w->Empty() || !w->hasCoords(me.x, me.y) || size_t(me.y) >= w->Size())
return; return;
if (me.bstate & BUTTON1_PRESSED) if (me.bstate & BUTTON1_PRESSED || me.bstate & BUTTON3_PRESSED)
{ {
w->Goto(me.y); w->Goto(me.y);
Mpd->Play(w->Current().GetPosition()); if (me.bstate & BUTTON3_PRESSED)
UpdateStatusImmediately = 1; {
Mpd->Play(w->Current().GetPosition());
UpdateStatusImmediately = 1;
}
} }
else else
Screen< Menu<MPD::Song> >::MouseButtonPressed(me); Screen< Menu<MPD::Song> >::MouseButtonPressed(me);