Revision: 22899 http://sourceforge.net/p/bibdesk/svn/22899 Author: hofman Date: 2018-10-31 19:13:56 +0000 (Wed, 31 Oct 2018) Log Message: ----------- Some conditional code for newer SDKs
Modified Paths: -------------- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m =================================================================== --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2018-10-31 18:50:30 UTC (rev 22898) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2018-10-31 19:13:56 UTC (rev 22899) @@ -2982,10 +2982,10 @@ if ([_sliderWindow parentWindow] == nil) { NSRect sliderRect = tag == _bottomSliderTag ? [self _bottomSliderRect] : [self _topSliderRect]; sliderRect = [self convertRect:sliderRect toView:nil]; -#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 +#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 + sliderRect.origin = [[self window] convertPointToScreen:sliderRect.origin]; +#else sliderRect.origin = [[self window] convertBaseToScreen:sliderRect.origin]; -#else - sliderRect = [[self window] convertRectToScreen:sliderRect]; #endif // looks cool to use -animator here, but makes it hard to hit... if (NSEqualRects([_sliderWindow frame], sliderRect) == NO) @@ -4073,10 +4073,10 @@ { if (Nil == QLPreviewPanelClass || [FVPreviewer useQuickLookForURL:aURL] == NO) { iconRect = [self convertRect:iconRect toView:nil]; -#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 +#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 + iconRect.origin = [[self window] convertPointToScreen:iconRect.origin]; +#else iconRect.origin = [[self window] convertBaseToScreen:iconRect.origin]; -#else - iconRect = [[self window] convertRectToScreen:iconRect]; #endif #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 // note: controllingQLPreviewPanel is only true if QLPreviewPanelClass exists, but clang doesn't know that @@ -4244,10 +4244,10 @@ if (i != NSNotFound && [self _getGridRow:&r column:&c ofIndex:i]) { iconRect = [self _rectOfIconInRow:r column:c]; iconRect = [self convertRect:iconRect toView:nil]; -#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 +#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 + iconRect.origin = [[self window] convertPointToScreen:iconRect.origin]; +#else iconRect.origin = [[self window] convertBaseToScreen:iconRect.origin]; -#else - iconRect = [[self window] convertRectToScreen:iconRect]; #endif } return iconRect; @@ -4308,10 +4308,10 @@ - (id)accessibilityHitTest:(NSPoint)point { NSUInteger i, r, c; NSPoint localPoint; -#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 +#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 + localPoint = [self convertPoint:[[self window] convertPointFromScreen:point] fromView:nil]; +#else localPoint = [self convertPoint:[[self window] convertScreenToBase:point] fromView:nil]; -#else - localPoint = [self convertPoint:[[self window] convertPointFromScreen:point] fromView:nil]; #endif if ([self _getGridRow:&r column:&c atPoint:localPoint]) { i = [self _indexForGridRow:r column:c]; @@ -4339,10 +4339,10 @@ if ([element index] < [_orderedURLs count] && [self _getGridRow:&r column:&c ofIndex:[element index]]) { rect = [self _rectOfIconInRow:r column:c]; rect = [self convertRect:rect toView:nil]; -#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 +#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 + rect.origin = [[self window] convertPointToScreen:rect.origin]; +#else rect.origin = [[self window] convertBaseToScreen:rect.origin]; -#else - rect = [[self window] convertRectToScreen:rect]; #endif } return rect; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit