Commit 9d3beebf authored by Benjamin Pracht's avatar Benjamin Pracht

* Fixes a silly bug in the filling of the NSMutableDictionary that stores the...

* Fixes a silly bug in the filling of the NSMutableDictionary that stores the p_item->node correspondance in the playlist
* A side effect of this fix seems to be that adding a directory, deleting it and adding a new playlist item doesn't seem to crash VLC anymore
* Make the currently playling item, as well as its parent items bold 

parent a180b7f4
......@@ -330,6 +330,8 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
return NO;
}
if ( p_temp_item )
{
while( p_temp_item->i_parents > 0 )
{
int i;
......@@ -350,6 +352,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
}
}
}
}
vlc_object_release( p_playlist );
return NO;
......@@ -913,6 +916,31 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
}
}
- (void)outlineView:(NSOutlineView *)outlineView
willDisplayCell:(id)cell
forTableColumn:(NSTableColumn *)tableColumn
item:(id)item
{
playlist_t *p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
playlist_item_t *p_item = (playlist_item_t *)[item pointerValue];
if( !p_playlist ) return;
if( ( p_item == p_playlist->status.p_item ) ||
( p_item->i_children != 0 &&
[self isItem: p_playlist->status.p_item inNode: p_item] ) )
{
[cell setFont: [NSFont boldSystemFontOfSize: 0]];
}
else
{
[cell setFont: [NSFont systemFontOfSize: 0]];
}
vlc_object_release( p_playlist );
}
@end
@implementation VLCPlaylist (NSOutlineViewDataSource)
......@@ -995,13 +1023,9 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
vlc_object_release( p_playlist );
o_value = [[NSValue valueWithPointer: p_return] retain];
if( [o_outline_dict objectForKey: [NSString stringWithFormat:@"%p", p_return]] == nil )
{
[o_outline_dict setObject:o_value forKey:[NSString stringWithFormat:@"%p", p_return]];
}
return o_value;
}
......
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