[vlc-devel] [PATCH] Only allow clearing playlist if current item can be edited
Edward Wang
edward.c.wang at compdigitec.com
Mon Jan 9 23:09:15 CET 2012
Only allow clearing playlist if current item can be edited.
Thanks,
Edward Wang
---
.../gui/qt4/components/playlist/playlist_model.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 4e69d3c..a23f9c9 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -978,8 +978,10 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode
menu.addSeparator();
- menu.addAction( QIcon( ":/toolbar/clear" ), qtr("Clear playlist"),
- this, SLOT( clearPlaylist() ) );
+ if( canEdit() ) {
+ menu.addAction( QIcon( ":/toolbar/clear" ), qtr("Clear playlist"),
+ this, SLOT( clearPlaylist() ) );
+ }
/* Playlist sorting */
if( !sortingMenu )
--
1.7.5.4
More information about the vlc-devel
mailing list