[vlc-commits] Only allow clearing playlist if current item can be edited
Edward Wang
git at videolan.org
Tue Jan 10 12:33:12 CET 2012
vlc/vlc-1.2 | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Mon Jan 9 17:09:15 2012 -0500| [08d06b22f765649c8e9fd99b05ec955017cf4e54] | committer: Jean-Baptiste Kempf
Only allow clearing playlist if current item can be edited
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 4f771d1d5cab79ff16a494edb2c97bb7366f923d)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=08d06b22f765649c8e9fd99b05ec955017cf4e54
---
.../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