Commit 65278746 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* When you push backspace or delete in the playlist, it removes the selected item.

parent 7518bb92
......@@ -446,6 +446,8 @@
buildActionMask = 2147483647;
files = (
1058C7AFFEA557BF11CA2CBB,
8E1803AE03F1C65F0059A3A7,
8E1803AF03F1C65F0059A3A7,
);
isa = PBXFrameworksBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
......@@ -530,6 +532,8 @@
1058C7ACFEA557BF11CA2CBB = {
children = (
1058C7ADFEA557BF11CA2CBB,
8E1803AC03F1C65F0059A3A7,
8E1803AD03F1C65F0059A3A7,
);
isa = PBXGroup;
name = "Linked Frameworks";
......@@ -584,6 +588,30 @@
//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;
......
......@@ -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];
......@@ -54,20 +55,41 @@
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 );
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment