Commit 62ca4114 authored by Benjamin Pracht's avatar Benjamin Pracht

Some small cleaning

parent f302d243
...@@ -395,7 +395,8 @@ ...@@ -395,7 +395,8 @@
[o_outline_view setDoubleAction: @selector(playItem:)]; [o_outline_view setDoubleAction: @selector(playItem:)];
[o_outline_view registerForDraggedTypes: [o_outline_view registerForDraggedTypes:
[NSArray arrayWithObjects: NSFilenamesPboardType, nil]]; [NSArray arrayWithObjects: NSFilenamesPboardType,
@"VLCPlaylistItemPboardType", nil]];
[o_outline_view setIntercellSpacing: NSMakeSize (0.0, 1.0)]; [o_outline_view setIntercellSpacing: NSMakeSize (0.0, 1.0)];
/* We need to check whether _defaultTableHeaderSortImage exists, since it /* We need to check whether _defaultTableHeaderSortImage exists, since it
...@@ -1572,50 +1573,12 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -1572,50 +1573,12 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
[self removeItemsFrom: o_nodes_array ifChildrenOf: o_nodes_array]; [self removeItemsFrom: o_nodes_array ifChildrenOf: o_nodes_array];
[self removeItemsFrom: o_items_array ifChildrenOf: o_nodes_array]; [self removeItemsFrom: o_items_array ifChildrenOf: o_nodes_array];
#if 0
unsigned int j;
for( i = 0 ; i < [o_nodes_array count] ; i++ )
{
for ( j = 0 ; j < [o_nodes_array count] ; j++ )
{
if( j == i ) continue;
if( [self isItem: [[o_nodes_array objectAtIndex:i] pointerValue]
inNode: [[o_nodes_array objectAtIndex:j] pointerValue]] )
{
[o_nodes_array removeObjectAtIndex:i];
/* We need to execute the next iteration with the same index
since the current item has been deleted */
i--;
break;
}
}
}
for( i = 0 ; i < [o_items_array count] ; i++ )
{
for ( j = 0 ; j < [o_nodes_array count] ; j++ )
{
if( [self isItem: [[o_items_array objectAtIndex:i] pointerValue]
inNode: [[o_nodes_array objectAtIndex:j] pointerValue]] )
{
[o_items_array removeObjectAtIndex:i];
i--;
break;
}
}
}
#endif
/* We add the "VLCPlaylistItemPboardType" type to be able to recognize /* We add the "VLCPlaylistItemPboardType" type to be able to recognize
a Drop operation coming from the playlist. a Drop operation coming from the playlist. */
We need to add NSFilenamesPboardType otherwise the outlineview refuses
to the drop. */
[pboard declareTypes: [NSArray arrayWithObjects: [pboard declareTypes: [NSArray arrayWithObjects:
@"VLCPlaylistItemPboardType",NSFilenamesPboardType, nil] owner: self]; @"VLCPlaylistItemPboardType", nil] owner: self];
[pboard setData:[NSData data] forType:@"VLCPlaylistItemPboardType"]; [pboard setData:[NSData data] forType:@"VLCPlaylistItemPboardType"];
[pboard setPropertyList:[NSArray array]
forType:NSFilenamesPboardType];
vlc_object_release(p_playlist); vlc_object_release(p_playlist);
return YES; return YES;
......
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