mirror of https://code.videolan.org/videolan/vlc
macosx: fix some compiler warnings / deprecated methods
This commit is contained in:
parent
935361b02f
commit
c8961ccb94
|
@ -179,7 +179,7 @@ The class is not thread safe
|
|||
/* A NSApplication delegate which is used to activate and deactivate listening to the remote control
|
||||
* dependent on the activation state of your application.
|
||||
* All events are delegated to the original NSApplication delegate if necessary */
|
||||
@interface AppleRemoteApplicationDelegate : NSObject {
|
||||
@interface AppleRemoteApplicationDelegate : NSObject<NSApplicationDelegate> {
|
||||
id applicationDelegate;
|
||||
}
|
||||
|
||||
|
|
|
@ -162,12 +162,12 @@ const NSTimeInterval HOLD_RECOGNITION_TIME_INTERVAL=0.4;
|
|||
if ([self listeningOnAppActivate]) return;
|
||||
AppleRemoteApplicationDelegate* appDelegate = [[AppleRemoteApplicationDelegate alloc] initWithApplicationDelegate: [NSApp delegate]];
|
||||
/* NSApp does not retain its delegate therefore we keep retain count on 1 */
|
||||
[NSApp setDelegate: appDelegate];
|
||||
[(NSApplication *)NSApp setDelegate: appDelegate];
|
||||
} else {
|
||||
if ([self listeningOnAppActivate]==NO) return;
|
||||
AppleRemoteApplicationDelegate* appDelegate = (AppleRemoteApplicationDelegate*)[NSApp delegate];
|
||||
id previousAppDelegate = [appDelegate applicationDelegate];
|
||||
[NSApp setDelegate: previousAppDelegate];
|
||||
[(NSApplication *)NSApp setDelegate: previousAppDelegate];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -378,21 +378,11 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
|
|||
iconRect = NSMakeRect(NSMidX(iconRect)-(actualIconSize.width/2.0f), NSMidY(iconRect)-(actualIconSize.height/2.0f), actualIconSize.width, actualIconSize.height);
|
||||
}
|
||||
|
||||
//Use 10.6 NSImage drawing if we can
|
||||
if(NSAppKitVersionNumber >= 1115.2) { // Lion
|
||||
[icon drawInRect:iconRect
|
||||
fromRect:NSZeroRect
|
||||
operation:NSCompositeSourceOver
|
||||
fraction:1
|
||||
respectFlipped:YES hints:nil];
|
||||
}
|
||||
else {
|
||||
[icon setFlipped:[self isFlipped]];
|
||||
[icon drawInRect:iconRect
|
||||
fromRect:NSZeroRect
|
||||
operation:NSCompositeSourceOver
|
||||
fraction:1];
|
||||
}
|
||||
[icon drawInRect:iconRect
|
||||
fromRect:NSZeroRect
|
||||
operation:NSCompositeSourceOver
|
||||
fraction:1
|
||||
respectFlipped:YES hints:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -356,8 +356,8 @@ void WindowClose(vout_window_t *p_wnd)
|
|||
if ([o_vout_dict count] == 1) {
|
||||
NSWindow * o_first_window = [o_vout_dict objectForKey: [[o_vout_dict allKeys] firstObject]];
|
||||
|
||||
NSPoint topleftbase = NSMakePoint(0, [o_first_window frame].size.height);
|
||||
top_left_point = [o_first_window convertBaseToScreen: topleftbase];
|
||||
NSRect topleftBaseRect = NSMakeRect(0, [o_first_window frame].size.height, 0, 0);
|
||||
top_left_point = [o_first_window convertRectToScreen: topleftBaseRect].origin;
|
||||
}
|
||||
|
||||
top_left_point = [o_new_video_window cascadeTopLeftFromPoint: top_left_point];
|
||||
|
|
|
@ -513,8 +513,8 @@
|
|||
NSSize windowMinSize = [self minSize];
|
||||
NSRect screenFrame = [[self screen] visibleFrame];
|
||||
|
||||
NSPoint topleftbase = NSMakePoint(0, [self frame].size.height);
|
||||
NSPoint topleftscreen = [self convertBaseToScreen: topleftbase];
|
||||
NSRect topleftbase = NSMakeRect(0, [self frame].size.height, 0, 0);
|
||||
NSPoint topleftscreen = [self convertRectToScreen: topleftbase].origin;
|
||||
|
||||
CGFloat f_width = size.width;
|
||||
CGFloat f_height = size.height;
|
||||
|
|
|
@ -407,7 +407,7 @@ static bool b_old_spaces_style = YES;
|
|||
NSRect frameRect = [self bounds];
|
||||
|
||||
[[NSColor selectedControlColor] set];
|
||||
NSFrameRectWithWidthUsingOperation(frameRect, 2., NSCompositeHighlight);
|
||||
NSFrameRectWithWidthUsingOperation(frameRect, 2., NSCompositeSourceOver);
|
||||
}
|
||||
|
||||
[super drawRect:dirtyRect];
|
||||
|
|
|
@ -2221,7 +2221,7 @@ o_moduleenabled = [NSNumber numberWithBool:NO];\
|
|||
// We don't ever want to drop onto a row, only between rows.
|
||||
if (op == NSTableViewDropOn)
|
||||
[table setDropRow:(row+1) dropOperation:NSTableViewDropAbove];
|
||||
return NSTableViewDropAbove;
|
||||
return NSDragOperationGeneric;
|
||||
}
|
||||
|
||||
- (BOOL)tableView:(NSTableView*)table acceptDrop:(id <NSDraggingInfo>)info
|
||||
|
|
Loading…
Reference in New Issue