adium/adium
Clone
Summary
Browse
Changes
Graph
Update build.sh to find the 10.6 SDK with Xcode 4.3. However, hardcode CC to gcc (from MacPorts).
2012-05-08, Thijs Alkemade
67a03e758cf8
Update build.sh to find the 10.6 SDK with Xcode 4.3. However, hardcode CC to gcc (from MacPorts).
Building at least GLib with clang never worked right for me.
//
// SGHotKey.m
// SGHotKeyCenter
//
// Created by Justin Williams on 7/26/09.
// Copyright 2009 Second Gear. All rights reserved.
//
#import "SGHotKey.h"
#import "SGKeyCombo.h"
@implementation
SGHotKey
@synthesize
identifier
;
@synthesize
name
;
@synthesize
keyCombo
;
@synthesize
target
;
@synthesize
action
;
@synthesize
hotKeyID
;
-
(
void
)
dealloc
{
[
identifier
release
];
[
name
release
];
[
keyCombo
release
];
[
super
dealloc
];
}
-
(
id
)
init
{
return
[
self
initWithIdentifier
:
nil
keyCombo
:
nil
];
}
-
(
id
)
initWithIdentifier:
(
id
)
theIdentifier
keyCombo:
(
SGKeyCombo
*
)
theCombo
{
if
((
self
=
[
super
init
]))
{
self
.
identifier
=
theIdentifier
;
self
.
keyCombo
=
theCombo
;
}
return
self
;
}
-
(
id
)
initWithIdentifier:
(
id
)
theIdentifier
keyCombo:
(
SGKeyCombo
*
)
theCombo
target:
(
id
)
theTarget
action:
(
SEL
)
theAction
{
if
((
self
=
[
super
init
]))
{
self
.
identifier
=
theIdentifier
;
self
.
keyCombo
=
theCombo
;
self
.
target
=
theTarget
;
self
.
action
=
theAction
;
}
return
self
;
}
-
(
BOOL
)
matchesHotKeyID:
(
EventHotKeyID
)
theKeyID
{
return
(
hotKeyID
.
id
==
theKeyID
.
id
)
&&
(
hotKeyID
.
signature
==
theKeyID
.
signature
);
}
-
(
void
)
invoke
{
[
self
.
target
performSelector
:
self
.
action
withObject
:
self
];
}
-
(
void
)
setKeyCombo:
(
SGKeyCombo
*
)
theKeyCombo
{
if
(
theKeyCombo
==
nil
)
theKeyCombo
=
[
SGKeyCombo
clearKeyCombo
];
keyCombo
=
[
theKeyCombo
retain
];
}
-
(
NSString
*
)
description
{
return
[
NSString
stringWithFormat
:
@"<%@: %@, %@>"
,
NSStringFromClass
([
self
class
]),
self
.
identifier
,
self
.
keyCombo
];
}
@end