[vlc-devel] [PATCH 16/18] gui/qt: fix #17184 (missing entries in context-menu)
Filip Roséen
filip at videolabs.io
Wed Jul 20 11:22:51 CEST 2016
> Stray spaces (No I don't have any stray spaces detector, I just clicked
> here by accident)
>
I am never so lucky, I guess I need to configurate my editor to let me know
about those nasty little stray spaces.
> + if( playlist_Status( THEPL ) == PLAYLIST_RUNNING )
> + {
> + if( isCurrent( index ) )
> + return false;
> + }
> if( playlist_Status( THEPL ) == PLAYLIST_RUNNING && isCurrent( index ) )
> return false;
> no?
See attached patch
------------------
Attached to this email is an updated patch, in regards of the old on - the
differences between the two are as follows.
diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp
index 3092895..739e722 100644
--- a/modules/gui/qt/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
@@ -1003,7 +1003,7 @@ bool PLModel::action( QAction *action, const QModelIndexList &indexes )
bool PLModel::isSupportedAction( actions action, const QModelIndex &index ) const
{
vlc_playlist_locker pl_lock ( THEPL );
-
+
bool const b_readonly = THEPL->p_root->i_flags & PLAYLIST_RO_FLAG;
AbstractPLItem * item = VLCModel::getItem( index );
@@ -1021,17 +1021,17 @@ bool PLModel::isSupportedAction( actions action, const QModelIndex &index ) cons
}
case ACTION_SORT:
{
- return rowCount() && b_readonly;
+ return rowCount() && b_readonly;
}
case ACTION_PLAY:
{
- if( playlist_Status( THEPL ) == PLAYLIST_RUNNING )
+ if( playlist_Status( THPL ) == PLAYLIST_RUNNING
+ && !isCurrent( index ) )
{
- if( isCurrent( index ) )
- return false;
+ return false;
}
- return index.isValid();;
+ return index.isValid();
}
case ACTION_PAUSE:
{
thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160720/38139777/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gui-qt-fix-17184-missing-entries-in-context-menu.patch
Type: text/x-diff
Size: 5348 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160720/38139777/attachment.patch>
More information about the vlc-devel
mailing list