[vlc-commits] macosx: refuse file drops on the playlist table if the current root item is neither the local playlist nor the media library

Felix Paul Kühne git at videolan.org
Sun Apr 8 21:25:10 CEST 2012


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Apr  8 18:50:33 2012 +0200| [9edc234ff0dec4ce1ae0c8d6fbff528f06b5bfa7] | committer: Felix Paul Kühne

macosx: refuse file drops on the playlist table if the current root item is neither the local playlist nor the media library
(cherry picked from commit 7bb775484f81f6f848662103355089c191a960d1)

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

 modules/gui/macosx/playlist.m |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index 809fafc..26a2577 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -1573,7 +1573,7 @@
             if ([self currentPlaylistRoot] == p_playlist->p_local_category || [self currentPlaylistRoot] == p_playlist->p_ml_category) 
                 p_new_parent = [self currentPlaylistRoot];
             else
-                p_new_parent = p_playlist->p_local_category;
+                return NO;
         }
         else
             p_new_parent = [item pointerValue];
@@ -1649,6 +1649,9 @@
 
     else if( [[o_pasteboard types] containsObject: NSFilenamesPboardType] )
     {
+        if ([self currentPlaylistRoot] != p_playlist->p_local_category && [self currentPlaylistRoot] != p_playlist->p_ml_category) 
+            return NO;
+
         playlist_item_t *p_node = [item pointerValue];
 
         NSArray *o_values = [[o_pasteboard propertyListForType: NSFilenamesPboardType]



More information about the vlc-commits mailing list