mirror of https://github.com/procxx/kepka.git
Suppress new macOS deprecation warnings
This commit is contained in:
parent
76c14bb933
commit
9e875ff268
|
@ -530,7 +530,7 @@ bool UnsafeShowOpenWith(const QString &filepath) {
|
||||||
NSArray *appsPaths = [[NSFileManager defaultManager] URLsForDirectory:NSApplicationDirectory inDomains:NSLocalDomainMask];
|
NSArray *appsPaths = [[NSFileManager defaultManager] URLsForDirectory:NSApplicationDirectory inDomains:NSLocalDomainMask];
|
||||||
if ([appsPaths count]) [openPanel setDirectoryURL:[appsPaths firstObject]];
|
if ([appsPaths count]) [openPanel setDirectoryURL:[appsPaths firstObject]];
|
||||||
[openPanel beginWithCompletionHandler:^(NSInteger result){
|
[openPanel beginWithCompletionHandler:^(NSInteger result){
|
||||||
if (result == NSFileHandlingPanelOKButton) {
|
if (result == NSModalResponseOK) {
|
||||||
if ([[openPanel URLs] count] > 0) {
|
if ([[openPanel URLs] count] > 0) {
|
||||||
NSURL *app = [[openPanel URLs] objectAtIndex:0];
|
NSURL *app = [[openPanel URLs] objectAtIndex:0];
|
||||||
NSString *path = [app path];
|
NSString *path = [app path];
|
||||||
|
|
|
@ -177,7 +177,7 @@ ApplicationDelegate *_sharedDelegate = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) mediaKeyTap:(SPMediaKeyTap*)keyTap receivedMediaKeyEvent:(NSEvent*)e {
|
- (void) mediaKeyTap:(SPMediaKeyTap*)keyTap receivedMediaKeyEvent:(NSEvent*)e {
|
||||||
if (e && [e type] == NSSystemDefined && [e subtype] == SPSystemDefinedEventMediaKeys) {
|
if (e && [e type] == NSEventTypeSystemDefined && [e subtype] == SPSystemDefinedEventMediaKeys) {
|
||||||
objc_handleMediaKeyEvent(e);
|
objc_handleMediaKeyEvent(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -256,7 +256,7 @@ void objc_showOverAll(WId winId, bool canFocus) {
|
||||||
NSWindow *wnd = [reinterpret_cast<NSView *>(winId) window];
|
NSWindow *wnd = [reinterpret_cast<NSView *>(winId) window];
|
||||||
[wnd setLevel:NSPopUpMenuWindowLevel];
|
[wnd setLevel:NSPopUpMenuWindowLevel];
|
||||||
if (!canFocus) {
|
if (!canFocus) {
|
||||||
[wnd setStyleMask:NSUtilityWindowMask | NSNonactivatingPanelMask];
|
[wnd setStyleMask:NSWindowStyleMaskUtilityWindow | NSWindowStyleMaskNonactivatingPanel];
|
||||||
[wnd setCollectionBehavior:NSWindowCollectionBehaviorMoveToActiveSpace|NSWindowCollectionBehaviorStationary|NSWindowCollectionBehaviorFullScreenAuxiliary|NSWindowCollectionBehaviorIgnoresCycle];
|
[wnd setCollectionBehavior:NSWindowCollectionBehaviorMoveToActiveSpace|NSWindowCollectionBehaviorStationary|NSWindowCollectionBehaviorFullScreenAuxiliary|NSWindowCollectionBehaviorIgnoresCycle];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue