vlc | branch: master | David Fuhrmann <[email protected]> | Mon Jun 11 18:45:48 2012 +0200| [cfaaf916909b5483d6128cd6cd9b36deb72779df] | committer: David Fuhrmann
macosx: sort items before adding to playlist over dock icon close #4358 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cfaaf916909b5483d6128cd6cd9b36deb72779df --- modules/gui/macosx/intf.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index 345909f..a123f2c 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -929,10 +929,11 @@ static VLCMain *_o_sharedMainInstance = nil; } free( psz_uri ); - NSMutableArray *o_result = [NSMutableArray arrayWithCapacity: [o_names count]]; - for( int i = 0; i < [o_names count]; i++ ) + NSArray *o_sorted_names = [o_names sortedArrayUsingSelector: @selector(caseInsensitiveCompare:)]; + 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 ) return NO; _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
