X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/676d1feebedb6b04b4da4bb58b3ca1282d7740f5..7a218424c6a92eb4979564a7260f862edd46052d:/ITHotKey.m diff --git a/ITHotKey.m b/ITHotKey.m old mode 100755 new mode 100644 index 0e2ddc3..940223d --- a/ITHotKey.m +++ b/ITHotKey.m @@ -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