[vlc-commits] Only allow clearing playlist if current item can be edited
Edward Wang
git at videolan.org
Mon Jan 9 23:39:00 CET 2012
vlc | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Mon Jan 9 17:09:15 2012 -0500| [4f771d1d5cab79ff16a494edb2c97bb7366f923d] | committer: Jean-Baptiste Kempf
Only allow clearing playlist if current item can be edited
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f771d1d5cab79ff16a494edb2c97bb7366f923d
---
.../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 )
More information about the vlc-commits
mailing list