1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 17:47:37 +00:00

Get rid of some more deprecation warnings (OS X)

This commit is contained in:
Mike Gelfand 2016-01-08 10:05:19 +00:00
parent 13a98a02b8
commit 2ca7ac7473
5 changed files with 7 additions and 8 deletions

View file

@ -3643,7 +3643,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
return NSZeroRect; return NSZeroRect;
frame.origin = [fTableView convertPoint: frame.origin toView: nil]; frame.origin = [fTableView convertPoint: frame.origin toView: nil];
frame.origin = [fWindow convertBaseToScreen: frame.origin]; frame = [fWindow convertRectToScreen: frame];
frame.origin.y -= frame.size.height; frame.origin.y -= frame.size.height;
return frame; return frame;
} }

View file

@ -195,7 +195,7 @@
return NSZeroRect; return NSZeroRect;
frame.origin = [fileOutlineView convertPoint: frame.origin toView: nil]; frame.origin = [fileOutlineView convertPoint: frame.origin toView: nil];
frame.origin = [[[self view] window] convertBaseToScreen: frame.origin]; frame = [[[self view] window] convertRectToScreen: frame];
frame.origin.y -= frame.size.height; frame.origin.y -= frame.size.height;
return frame; return frame;
} }

View file

@ -297,7 +297,7 @@ typedef enum
NSRect windowRect = [window frame], viewRect = [view frame]; NSRect windowRect = [window frame], viewRect = [view frame];
const CGFloat difference = (NSHeight(viewRect) - oldHeight) * [window userSpaceScaleFactor]; const CGFloat difference = NSHeight(viewRect) - oldHeight;
windowRect.origin.y -= difference; windowRect.origin.y -= difference;
windowRect.size.height += difference; windowRect.size.height += difference;
@ -308,7 +308,7 @@ typedef enum
const CGFloat screenHeight = NSHeight([[window screen] visibleFrame]); const CGFloat screenHeight = NSHeight([[window screen] visibleFrame]);
if (NSHeight(windowRect) > screenHeight) if (NSHeight(windowRect) > screenHeight)
{ {
const CGFloat difference = (screenHeight - NSHeight(windowRect)) * [window userSpaceScaleFactor]; const CGFloat difference = screenHeight - NSHeight(windowRect);
windowRect.origin.y -= difference; windowRect.origin.y -= difference;
windowRect.size.height += difference; windowRect.size.height += difference;

View file

@ -1462,7 +1462,7 @@
return; return;
NSRect windowRect = [window frame]; NSRect windowRect = [window frame];
const CGFloat difference = (NSHeight([view frame]) - NSHeight([[window contentView] frame])) * [window userSpaceScaleFactor]; const CGFloat difference = NSHeight([view frame]) - NSHeight([[window contentView] frame]);
windowRect.origin.y -= difference; windowRect.origin.y -= difference;
windowRect.size.height += difference; windowRect.size.height += difference;

View file

@ -652,10 +652,9 @@ bool trashDataFile(const char * filename, tr_error ** error)
if ([self isMagnet]) if ([self isMagnet])
return [NSImage imageNamed: @"Magnet"]; return [NSImage imageNamed: @"Magnet"];
#warning replace kGenericFolderIcon stuff with NSImageNameFolder on 10.6
if (!fIcon) if (!fIcon)
fIcon = [[[NSWorkspace sharedWorkspace] iconForFileType: [self isFolder] ? NSFileTypeForHFSTypeCode(kGenericFolderIcon) fIcon = [self isFolder] ? [[NSImage imageNamed: NSImageNameFolder] retain]
: [[self name] pathExtension]] retain]; : [[[NSWorkspace sharedWorkspace] iconForFileType: [[self name] pathExtension]] retain];
return fIcon; return fIcon;
} }