summaryrefslogtreecommitdiffstats
path: root/DDHotKeyCenter.m
diff options
context:
space:
mode:
authorDave DeLong2010-08-15 11:23:20 -0600
committerDave DeLong2010-08-15 11:23:20 -0600
commit3907cfe61dc13daa38b779f7596a424222c1d74c (patch)
tree0d21ebce66c988d50ca771c6f5e451cd4c6c3eba /DDHotKeyCenter.m
parent8f564da37891b67325f86b6b0ec80150056d3d52 (diff)
downloadDDHotKey-3907cfe61dc13daa38b779f7596a424222c1d74c.tar.bz2
Updated macro to the more appropriate NS_BLOCKS_AVAILABLE
Diffstat (limited to 'DDHotKeyCenter.m')
-rw-r--r--DDHotKeyCenter.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/DDHotKeyCenter.m b/DDHotKeyCenter.m
index 7fc4af4..22d3c1c 100644
--- a/DDHotKeyCenter.m
+++ b/DDHotKeyCenter.m
@@ -25,7 +25,7 @@ NSUInteger dd_translateModifierFlags(NSUInteger flags);
SEL action;
id object;
-#if BUILD_FOR_SNOWLEOPARD
+#if NS_BLOCKS_AVAILABLE
DDHotKeyTask task;
#endif
@@ -38,7 +38,7 @@ NSUInteger dd_translateModifierFlags(NSUInteger flags);
@property (retain) id target;
@property SEL action;
@property (retain) id object;
-#if BUILD_FOR_SNOWLEOPARD
+#if NS_BLOCKS_AVAILABLE
@property (copy) DDHotKeyTask task;
#endif
@property unsigned short keyCode;
@@ -60,7 +60,7 @@ NSUInteger dd_translateModifierFlags(NSUInteger flags);
if (target != nil && action != nil && [target respondsToSelector:action]) {
[target performSelector:action withObject:event withObject:object];
}
-#if BUILD_FOR_SNOWLEOPARD
+#if NS_BLOCKS_AVAILABLE
else if (task != nil) {
task(event);
}
@@ -133,7 +133,7 @@ NSUInteger dd_translateModifierFlags(NSUInteger flags);
return ([[self hotKeysMatchingPredicate:predicate] count] > 0);
}
-#if BUILD_FOR_SNOWLEOPARD
+#if NS_BLOCKS_AVAILABLE
- (BOOL) registerHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags task:(DDHotKeyTask)task {
//we can't add a new hotkey if something already has this combo
if ([self hasRegisteredHotKeyWithKeyCode:keyCode modifierFlags:flags]) { return NO; }