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:
parent
13a98a02b8
commit
2ca7ac7473
5 changed files with 7 additions and 8 deletions
|
@ -3643,7 +3643,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
|||
return NSZeroRect;
|
||||
|
||||
frame.origin = [fTableView convertPoint: frame.origin toView: nil];
|
||||
frame.origin = [fWindow convertBaseToScreen: frame.origin];
|
||||
frame = [fWindow convertRectToScreen: frame];
|
||||
frame.origin.y -= frame.size.height;
|
||||
return frame;
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@
|
|||
return NSZeroRect;
|
||||
|
||||
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;
|
||||
return frame;
|
||||
}
|
||||
|
|
|
@ -297,7 +297,7 @@ typedef enum
|
|||
|
||||
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.size.height += difference;
|
||||
|
||||
|
@ -308,7 +308,7 @@ typedef enum
|
|||
const CGFloat screenHeight = NSHeight([[window screen] visibleFrame]);
|
||||
if (NSHeight(windowRect) > screenHeight)
|
||||
{
|
||||
const CGFloat difference = (screenHeight - NSHeight(windowRect)) * [window userSpaceScaleFactor];
|
||||
const CGFloat difference = screenHeight - NSHeight(windowRect);
|
||||
windowRect.origin.y -= difference;
|
||||
windowRect.size.height += difference;
|
||||
|
||||
|
|
|
@ -1462,7 +1462,7 @@
|
|||
return;
|
||||
|
||||
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.size.height += difference;
|
||||
|
||||
|
|
|
@ -652,10 +652,9 @@ bool trashDataFile(const char * filename, tr_error ** error)
|
|||
if ([self isMagnet])
|
||||
return [NSImage imageNamed: @"Magnet"];
|
||||
|
||||
#warning replace kGenericFolderIcon stuff with NSImageNameFolder on 10.6
|
||||
if (!fIcon)
|
||||
fIcon = [[[NSWorkspace sharedWorkspace] iconForFileType: [self isFolder] ? NSFileTypeForHFSTypeCode(kGenericFolderIcon)
|
||||
: [[self name] pathExtension]] retain];
|
||||
fIcon = [self isFolder] ? [[NSImage imageNamed: NSImageNameFolder] retain]
|
||||
: [[[NSWorkspace sharedWorkspace] iconForFileType: [[self name] pathExtension]] retain];
|
||||
return fIcon;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue