* When you push backspace or delete in the playlist, it removes the selected item.
authorDerk-Jan Hartman <hartman@videolan.org>
Fri, 7 Feb 2003 01:31:14 +0000 (01:31 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Fri, 7 Feb 2003 01:31:14 +0000 (01:31 +0000)
extras/MacOSX/vlc.pbproj/project.pbxproj
modules/gui/macosx/playlist.m

index 4f37a48..7db15c6 100644 (file)
                        buildActionMask = 2147483647;
                        files = (
                                1058C7AFFEA557BF11CA2CBB,
+                               8E1803AE03F1C65F0059A3A7,
+                               8E1803AF03F1C65F0059A3A7,
                        );
                        isa = PBXFrameworksBuildPhase;
                        runOnlyForDeploymentPostprocessing = 0;
                1058C7ACFEA557BF11CA2CBB = {
                        children = (
                                1058C7ADFEA557BF11CA2CBB,
+                               8E1803AC03F1C65F0059A3A7,
+                               8E1803AD03F1C65F0059A3A7,
                        );
                        isa = PBXGroup;
                        name = "Linked Frameworks";
 //8E2
 //8E3
 //8E4
+               8E1803AC03F1C65F0059A3A7 = {
+                       isa = PBXFrameworkReference;
+                       name = AudioUnit.framework;
+                       path = /System/Library/Frameworks/AudioUnit.framework;
+                       refType = 0;
+               };
+               8E1803AD03F1C65F0059A3A7 = {
+                       isa = PBXFrameworkReference;
+                       name = CoreAudio.framework;
+                       path = /System/Library/Frameworks/CoreAudio.framework;
+                       refType = 0;
+               };
+               8E1803AE03F1C65F0059A3A7 = {
+                       fileRef = 8E1803AC03F1C65F0059A3A7;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               8E1803AF03F1C65F0059A3A7 = {
+                       fileRef = 8E1803AD03F1C65F0059A3A7;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
                8E68B0BE03E2EA230059A3A7 = {
                        isa = PBXFileReference;
                        name = README.MacOSX.rtf;
index 3450758..34cbbd3 100644 (file)
@@ -2,7 +2,7 @@
  * playlist.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: playlist.m,v 1.7 2003/01/31 02:53:52 jlj Exp $
+ * $Id: playlist.m,v 1.8 2003/02/07 01:31:14 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *
@@ -44,6 +44,7 @@
 - (void)keyDown:(NSEvent *)o_event
 {
     unichar key = 0;
+    int i_row;
     playlist_t * p_playlist;
     intf_thread_t * p_intf = [NSApp getIntf];
 
 
     p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                           FIND_ANYWHERE );
-    if( p_playlist != NULL )
+    
+    if ( p_playlist == NULL )
     {
-        vlc_mutex_lock( &p_playlist->object_lock );
+        return;
     }
-
+    
     switch( key )
     {
         case ' ':
+            vlc_mutex_lock( &p_playlist->object_lock );
             if( p_playlist != NULL && p_playlist->p_input != NULL )
             {
                 input_SetStatus( p_playlist->p_input, INPUT_STATUS_PAUSE );
             }
+            vlc_mutex_unlock( &p_playlist->object_lock );
             break;
 
+        case NSDeleteCharacter:
+        case NSDeleteFunctionKey:
+        case NSDeleteCharFunctionKey:
+        case NSBackspaceCharacter:
+            while( ( i_row = [self selectedRow] ) != -1 )
+            {
+                if( p_playlist->i_index == i_row && p_playlist->i_status )
+                {
+                    playlist_Stop( p_playlist );
+                }
+        
+                playlist_Delete( p_playlist, i_row ); 
+        
+                [self deselectRow: i_row];
+            }
+            [self reloadData];
+            break;
+            
         default:
             [super keyDown: o_event];
             break;
@@ -75,7 +97,6 @@
 
     if( p_playlist != NULL )
     {
-        vlc_mutex_unlock( &p_playlist->object_lock );
         vlc_object_release( p_playlist );
     }
 }