Huge audit of ITKit, mostly everything has been updated to current coding
[ITKit.git] / ITHotKey.m
old mode 100755 (executable)
new mode 100644 (file)
index 0e2ddc3..940223d
@@ -1,91 +1,61 @@
-//
-//  ITHotKey.m
-//
-//  Created by Quentin Carnicelli on Sat Aug 02 2003.
-//  Copyright (c) 2003 iThink Software. All rights reserved.
-//
-
 #import "ITHotKey.h"
-
-#import "ITHotKeyCenter.h"
 #import "ITKeyCombo.h"
 
 @implementation ITHotKey
 
-- (id)init
-{
-       if ( (self = [super init]) )
-       {
-               [self setKeyCombo: [ITKeyCombo clearKeyCombo]];
+- (id)init {
+       if ((self = [super init])) {
+               [self setKeyCombo:[ITKeyCombo clearKeyCombo]];
        }
-       
        return self;
 }
 
-- (void)dealloc
-{
+- (void)dealloc {
        [mName release];
        [mKeyCombo release];
-       
        [super dealloc];
 }
 
-- (NSString*)description
-{
-       return [NSString stringWithFormat: @"<%@: %@>",
-        NSStringFromClass( [self class] ),
-        [self keyCombo]];
+- (NSString *)description {
+       return [NSString stringWithFormat:@"<%@: %@>", NSStringFromClass([self class]), [self keyCombo]];
 }
 
-#pragma mark -
-
-- (void)setKeyCombo: (ITKeyCombo*)combo
-{
-       [combo retain];
-       [mKeyCombo release];
-       mKeyCombo = combo;
+- (void)setKeyCombo:(ITKeyCombo *)combo {
+       [mKeyCombo autorelease];
+       mKeyCombo = [combo retain];
 }
 
-- (ITKeyCombo*)keyCombo
-{
+- (ITKeyCombo *)keyCombo {
        return mKeyCombo;
 }
 
-- (void)setName: (NSString*)name
-{
-       [name retain];
-       [mName release];
-       mName = name;
+- (void)setName:(NSString *)name {
+       [mName autorelease];
+       mName = [name retain];
 }
 
-- (NSString*)name
-{
+- (NSString *)name {
        return mName;
 }
 
-- (void)setTarget: (id)target
-{
+- (void)setTarget:(id)target {
        mTarget = target;
 }
 
-- (id)target
-{
+- (id)target {
        return mTarget;
 }
 
-- (void)setAction: (SEL)action
-{
+- (void)setAction:(SEL)action {
        mAction = action;
 }
 
-- (SEL)action
-{
+- (SEL)action {
        return mAction;
 }
 
-- (void)invoke
-{
-       [mTarget performSelector: mAction withObject: self];
+- (void)invoke {
+       [mTarget performSelector:mAction withObject:self];
 }
 
-@end
+@end
\ No newline at end of file