vlc | branch: master | Edward Wang <[email protected]> | Mon Jan  9 
17:09:15 2012 -0500| [b3203a51c486119b95cb183d53fc40fe8e887a22] | committer: 
Jean-Baptiste Kempf

Only allow clearing playlist if current item can be edited

Only allow clearing playlist if current item can be edited.
Thanks,
        Edward Wang

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b3203a51c486119b95cb183d53fc40fe8e887a22
---

 .../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 )

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to