1
0
mirror of https://github.com/arsenetar/dupeguru-cocoa.git synced 2026-01-22 14:41:40 +00:00

Fix some deprecation warnings update submodules

This commit is contained in:
2020-12-29 20:40:44 -06:00
parent 99b98db93a
commit 2eada16210
13 changed files with 67 additions and 47 deletions

View File

@@ -24,14 +24,14 @@ http://www.gnu.org/licenses/gpl-3.0.html
{
// get flags and strip the lower 16 (device dependant) bits
// See modifierFlags's doc for details
return [self modifierFlags] & NSDeviceIndependentModifierFlagsMask;
return [self modifierFlags] & NSEventModifierFlagDeviceIndependentFlagsMask;
}
- (NSUInteger)modifierKeysFlags
{
// This is modifierFlags with only Command, Opt, Ctrl and Shift, without the rest of the flags
// to pollute.
return [self flags] & (NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask | NSCommandKeyMask);
return [self flags] & (NSEventModifierFlagShift | NSEventModifierFlagControl | NSEventModifierFlagOption | NSEventModifierFlagCommand);
}
- (BOOL)isDeleteOrBackspace

View File

@@ -101,7 +101,7 @@
[sourceImage drawInRect: thumbnailRect
fromRect: NSZeroRect
operation: NSCompositeSourceOver
operation: NSCompositingOperationSourceOver
fraction: 1.0];
[newImage unlockFocus];
@@ -111,4 +111,4 @@
return [newImage autorelease];
}
@end
@end

View File

@@ -49,7 +49,7 @@ static ProgressController *_mainPC = nil;
[_worker cancelJob];
[[NSNotificationCenter defaultCenter] postNotificationName:JobCancelledNotification object:self];
_running = NO;
[NSApp endSheet:[self window] returnCode:NSRunAbortedResponse];
[NSApp endSheet:[self window] returnCode:NSModalResponseAbort];
/* There's this really strange thing where when the app is inactive at the point we want to hide
the progress dialog, it becomes impossible to close it. I guess it's due to some strange
thread-related crap. Anyway, *DO NOT HIDE THE SHEET WHILE THE APP IS INACTIVE*. Do it later,

View File

@@ -164,8 +164,8 @@ http://www.gnu.org/licenses/gpl-3.0.html
NSString *data = [[self delegate] dataForCopyToPasteboard];
if (data != nil) {
NSPasteboard *p = [NSPasteboard generalPasteboard];
[p declareTypes:[NSArray arrayWithObjects:NSStringPboardType, nil] owner:nil];
[p setString:data forType:NSStringPboardType];
[p declareTypes:[NSArray arrayWithObjects:NSPasteboardTypeString, nil] owner:nil];
[p setString:data forType:NSPasteboardTypeString];
}
}