Commit 94b541ac authored by Felix Paul Kühne's avatar Felix Paul Kühne

* backport my compiler warning fix when using Apple's private API

parent 3efb9f67
......@@ -367,6 +367,18 @@
@end
/*****************************************************************************
* extension to NSOutlineView's interface to fix compilation warnings
* and let us access these 2 functions properly
* this uses a private Apple-API, but works finely on all current OSX releases
* keep checking for compatiblity with future releases though
*****************************************************************************/
@interface NSOutlineView (UndocumentedSortImages)
+ (NSImage *)_defaultTableHeaderSortImage;
+ (NSImage *)_defaultTableHeaderReverseSortImage;
@end
/*****************************************************************************
* VLCPlaylist implementation
*****************************************************************************/
......@@ -401,26 +413,11 @@
@"VLCPlaylistItemPboardType", nil]];
[o_outline_view setIntercellSpacing: NSMakeSize (0.0, 1.0)];
/* We need to check whether _defaultTableHeaderSortImage exists, since it
belongs to an Apple hidden private API, and then can "disapear" at any time*/
if( [[NSOutlineView class] respondsToSelector:@selector(_defaultTableHeaderSortImage)] )
{
/* this uses private Apple API which works fine on all releases incl. 10.4,
* but keep checking in the future!
* These methods were added artificially to NSOutlineView's public interface above */
o_ascendingSortingImage = [[NSOutlineView class] _defaultTableHeaderSortImage];
}
else
{
o_ascendingSortingImage = nil;
}
if( [[NSOutlineView class] respondsToSelector:@selector(_defaultTableHeaderReverseSortImage)] )
{
o_descendingSortingImage = [[NSOutlineView class] _defaultTableHeaderReverseSortImage];
}
else
{
o_descendingSortingImage = nil;
}
o_tc_sortColumn = nil;
......
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