diff options
| author | Tomáš Znamenáček | 2016-10-28 14:52:37 +0200 |
|---|---|---|
| committer | Tomáš Znamenáček | 2016-10-28 14:52:37 +0200 |
| commit | 0d54ede8699d90997022d2286ef65953b7761628 (patch) | |
| tree | b4cf9cab11c42ecc29d86d498b7f045a7a4cdc00 | |
| parent | f12ed861b095d0734173948594202e25ee7e926d (diff) | |
| download | MASShortcut-0d54ede8699d90997022d2286ef65953b7761628.tar.bz2 | |
Trying to fix conditional key mask definition on 10.12
| -rw-r--r-- | Framework/MASKeyMasks.h | 6 | ||||
| -rw-r--r-- | Framework/Shortcut.h | 3 | ||||
| -rw-r--r-- | MASShortcut.xcodeproj/project.pbxproj | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/Framework/MASKeyMasks.h b/Framework/MASKeyMasks.h index 1c3a0b9..e541c32 100644 --- a/Framework/MASKeyMasks.h +++ b/Framework/MASKeyMasks.h @@ -1,3 +1,5 @@ +#import <Availability.h> + // https://github.com/shpakovski/MASShortcut/issues/99 // // Long story short: NSControlKeyMask and friends were replaced with NSEventModifierFlagControl @@ -7,8 +9,8 @@ // since it breaks the build on older SDKs – in Travis, for example. // // It should be safe to remove this whole thing once the 10.12 SDK is ubiquitous. -// -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 + +#if __MAC_OS_X_VERSION_MAX_ALLOWED < 1012 #define NSEventModifierFlagCommand NSCommandKeyMask #define NSEventModifierFlagControl NSControlKeyMask #define NSEventModifierFlagOption NSAlternateKeyMask diff --git a/Framework/Shortcut.h b/Framework/Shortcut.h index e131395..5a8de8e 100644 --- a/Framework/Shortcut.h +++ b/Framework/Shortcut.h @@ -1,7 +1,8 @@ +#import "MASKeyMasks.h" #import "MASShortcut.h" #import "MASShortcutValidator.h" #import "MASShortcutMonitor.h" #import "MASShortcutBinder.h" #import "MASDictionaryTransformer.h" #import "MASShortcutView.h" -#import "MASShortcutView+Bindings.h"
\ No newline at end of file +#import "MASShortcutView+Bindings.h" diff --git a/MASShortcut.xcodeproj/project.pbxproj b/MASShortcut.xcodeproj/project.pbxproj index 74af59c..026fa5b 100644 --- a/MASShortcut.xcodeproj/project.pbxproj +++ b/MASShortcut.xcodeproj/project.pbxproj @@ -33,7 +33,7 @@ 0D827D9F19911A190010B8EF /* MASShortcutValidator.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D827D9D19911A190010B8EF /* MASShortcutValidator.m */; }; 0D827DA519912D240010B8EF /* MASShortcutMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D827DA319912D240010B8EF /* MASShortcutMonitor.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0D827DAD199132840010B8EF /* MASShortcutBinder.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D827DAB199132840010B8EF /* MASShortcutBinder.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0DA8BCFC1DC37D8000C96EB9 /* MASKeyMasks.h in Headers */ = {isa = PBXBuildFile; fileRef = 0DA8BCFB1DC37D8000C96EB9 /* MASKeyMasks.h */; }; + 0DA8BCFC1DC37D8000C96EB9 /* MASKeyMasks.h in Headers */ = {isa = PBXBuildFile; fileRef = 0DA8BCFB1DC37D8000C96EB9 /* MASKeyMasks.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0DC2F17619922798003A0131 /* MASHotKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 0DC2F17419922798003A0131 /* MASHotKey.h */; }; 0DC2F17719922798003A0131 /* MASHotKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DC2F17519922798003A0131 /* MASHotKey.m */; }; 0DC2F17C199232EA003A0131 /* MASShortcutMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D827DA419912D240010B8EF /* MASShortcutMonitor.m */; }; @@ -296,6 +296,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 0DA8BCFC1DC37D8000C96EB9 /* MASKeyMasks.h in Headers */, 0D827D9719910FF70010B8EF /* MASKeyCodes.h in Headers */, 0D827D2B1990D55E0010B8EF /* MASShortcutView.h in Headers */, 0D827D99199110F60010B8EF /* Prefix.pch in Headers */, @@ -303,7 +304,6 @@ 0DC2F19819938EFA003A0131 /* MASShortcutView+Bindings.h in Headers */, 0D827D9E19911A190010B8EF /* MASShortcutValidator.h in Headers */, 0DC2F18D1993708A003A0131 /* MASDictionaryTransformer.h in Headers */, - 0DA8BCFC1DC37D8000C96EB9 /* MASKeyMasks.h in Headers */, 0D827DA519912D240010B8EF /* MASShortcutMonitor.h in Headers */, 0D827DAD199132840010B8EF /* MASShortcutBinder.h in Headers */, 0D2CAB191B8339F4005431FC /* MASLocalization.h in Headers */, |
