Use new symbols from macOS 10.12 SDK, which have the same values as the deprecated symbols.

CQTexperiment
Christopher Snowhill 2016-10-10 22:31:46 -07:00
parent 291e2ae676
commit c2bf3225d1
2 changed files with 12 additions and 12 deletions

View File

@ -343,16 +343,16 @@
[userDefaultsValuesDict setObject:fontSize forKey:@"fontSize"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:35] forKey:@"hotKeyPlayKeyCode"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:(NSControlKeyMask|NSCommandKeyMask)] forKey:@"hotKeyPlayModifiers"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:(NSEventModifierFlagControl|NSEventModifierFlagCommand)] forKey:@"hotKeyPlayModifiers"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:45] forKey:@"hotKeyNextKeyCode"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:(NSControlKeyMask|NSCommandKeyMask)] forKey:@"hotKeyNextModifiers"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:(NSEventModifierFlagControl|NSEventModifierFlagCommand)] forKey:@"hotKeyNextModifiers"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:15] forKey:@"hotKeyPreviousKeyCode"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:(NSControlKeyMask|NSCommandKeyMask)] forKey:@"hotKeyPreviousModifiers"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:(NSEventModifierFlagControl|NSEventModifierFlagCommand)] forKey:@"hotKeyPreviousModifiers"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:8] forKey:@"hotKeySpamKeyCode"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:(NSControlKeyMask|NSCommandKeyMask)] forKey:@"hotKeySpamModifiers"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:(NSEventModifierFlagControl|NSEventModifierFlagCommand)] forKey:@"hotKeySpamModifiers"];
NSString * feedURLdefault = @"https://f.losno.co/cog/mercury.xml";
NSString * feedURLbroken = @"https://kode54.net/cog/stable.xml";

View File

@ -179,16 +179,16 @@ static NSUInteger _characterForModifierFlags( unichar aBuff[kBufferSize], UInt32
{
NSUInteger thePos = 0;
memset( aBuff, 0, kBufferSize );
if(aModifierFlags & NSControlKeyMask)
if(aModifierFlags & NSEventModifierFlagControl)
aBuff[thePos++] = kControlUnicode;
if(aModifierFlags & NSAlternateKeyMask)
if(aModifierFlags & NSEventModifierFlagOption)
aBuff[thePos++] = kOptionUnicode;
if(aModifierFlags & NSShiftKeyMask)
if(aModifierFlags & NSEventModifierFlagShift)
aBuff[thePos++] = kShiftUnicode;
if(aModifierFlags & NSCommandKeyMask)
if(aModifierFlags & NSEventModifierFlagCommand)
aBuff[thePos++] = kCommandUnicode;
return thePos;
}
@ -201,16 +201,16 @@ NSUInteger NDCocoaModifierFlagsForCarbonModifierFlags( NSUInteger aModifierFlags
NSUInteger theCocoaModifierFlags = 0;
if(aModifierFlags & shiftKey)
theCocoaModifierFlags |= NSShiftKeyMask;
theCocoaModifierFlags |= NSEventModifierFlagShift;
if(aModifierFlags & controlKey)
theCocoaModifierFlags |= NSControlKeyMask;
theCocoaModifierFlags |= NSEventModifierFlagControl;
if(aModifierFlags & optionKey)
theCocoaModifierFlags |= NSAlternateKeyMask;
theCocoaModifierFlags |= NSEventModifierFlagOption;
if(aModifierFlags & cmdKey)
theCocoaModifierFlags |= NSCommandKeyMask;
theCocoaModifierFlags |= NSEventModifierFlagCommand;
return theCocoaModifierFlags;
}