vlc | branch: master | Marvin Scholz <[email protected]> | Sat Aug 18 01:31:59 2018 +0200| [91dde5a9f4d6bbd658590984243365e9e94c7fc5] | committer: Marvin Scholz
macosx: Remove private API for sort indicator images These "magic" strings are documented in the official documentation and exist since a long long time, Apple can't ever change those without breaking a number of apps, so using them seems better than relying on private API. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=91dde5a9f4d6bbd658590984243365e9e94c7fc5 --- modules/gui/macosx/VLCPlaylist.m | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/modules/gui/macosx/VLCPlaylist.m b/modules/gui/macosx/VLCPlaylist.m index 170492b126..3d8b98b7ed 100644 --- a/modules/gui/macosx/VLCPlaylist.m +++ b/modules/gui/macosx/VLCPlaylist.m @@ -52,19 +52,6 @@ #import <vlc_interface.h> #include <vlc_url.h> -/***************************************************************************** - * An extension to NSOutlineView's interface to fix compilation warnings - * and let us access these 2 functions properly. - * This uses a private API, but works fine on all current OSX releases. - * Radar ID 11739459 request a public API for this. However, it is probably - * easier and faster to recreate similar looking bitmaps ourselves. - *****************************************************************************/ - -@interface NSOutlineView (UndocumentedSortImages) -+ (NSImage *)_defaultTableHeaderSortImage; -+ (NSImage *)_defaultTableHeaderReverseSortImage; -@end - @interface VLCPlaylist () { NSImage *_descendingSortingImage; @@ -93,11 +80,8 @@ { self = [super init]; if (self) { - /* This uses a private API, but works fine on all current OSX releases. - * Radar ID 11739459 request a public API for this. However, it is probably - * easier and faster to recreate similar looking bitmaps ourselves. */ - _ascendingSortingImage = [[NSOutlineView class] _defaultTableHeaderSortImage]; - _descendingSortingImage = [[NSOutlineView class] _defaultTableHeaderReverseSortImage]; + _ascendingSortingImage = [NSImage imageNamed:@"NSAscendingSortIndicator"]; + _descendingSortingImage = [NSImage imageNamed:@"NSDescendingSortIndicator"]; [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(applicationWillTerminate:) name: NSApplicationWillTerminateNotification object: nil]; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
