Commit cfaaf916 authored by David Fuhrmann's avatar David Fuhrmann

macosx: sort items before adding to playlist over dock icon

close #4358
parent 13e2c3bd
...@@ -929,10 +929,11 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -929,10 +929,11 @@ static VLCMain *_o_sharedMainInstance = nil;
} }
free( psz_uri ); free( psz_uri );
NSMutableArray *o_result = [NSMutableArray arrayWithCapacity: [o_names count]]; NSArray *o_sorted_names = [o_names sortedArrayUsingSelector: @selector(caseInsensitiveCompare:)];
for( int i = 0; i < [o_names count]; i++ ) NSMutableArray *o_result = [NSMutableArray arrayWithCapacity: [o_sorted_names count]];
for( int i = 0; i < [o_sorted_names count]; i++ )
{ {
psz_uri = make_URI([[o_names objectAtIndex: i] UTF8String], "file" ); psz_uri = make_URI([[o_sorted_names objectAtIndex: i] UTF8String], "file" );
if( !psz_uri ) if( !psz_uri )
return NO; return NO;
......
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