gui/qt: fix PLModel::isSupportedAction( ACTION_PLAY, ... )
commitc5f7d8ef66c790d32f9fb912a6464d9c28dfce23
authorFilip Roséen <filip@atch.se>
Sun, 24 Jul 2016 13:09:57 +0000 (24 15:09 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Sun, 24 Jul 2016 18:11:02 +0000 (24 20:11 +0200)
tree25943769584e6ca818090842fd28957225047bbd
parentfcd81218102abbdc13bc99ea925f7c8f62674acc
gui/qt: fix PLModel::isSupportedAction( ACTION_PLAY, ... )

Prior to this commit, ACTION_PLAY was supported if:

    - the index was not associated with the currently playing
      item, or;
    - the playlist was paused.

In other words, the option would not be enabled if the playlist was in
a stopped state.

This commit changes the associated logic to the following, meaning
that the action is supported:

    - when the user has right-clicked on an entity, and;
    - the playlist is either stopped or paused, and;
    - the associated index is not currently playing.

Usage of PL_LOCK/PL_UNLOCK has also been replaced by vlc_playlist_lock
to aid code-reasoning and maintenance.

Signed-off-by: Francois Cartegnie <fcvlcdev@free.fr>
modules/gui/qt/components/playlist/playlist_model.cpp