-
Notifications
You must be signed in to change notification settings - Fork 3
/
PresenceMenuController.m
47 lines (45 loc) · 1.2 KB
/
PresenceMenuController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// PresenceMenuController.m
// Jabber
//
// Created by David Chisnall on 09/10/2004.
// Copyright 2004 __MyCompanyName__. All rights reserved.
//
#import <XMPPKit/XMPPPresence.h>
#import "PresenceMenuController.h"
#import "JabberApp.h"
#import "CustomPresenceWindowController.h"
@implementation PresenceMenuController
#define SELECT_MENU_ITEM [current setState:NSOffState]; [sender setState:NSOnState]; current = sender;
- (IBAction) chat:(id) sender
{
SELECT_MENU_ITEM;
[(JabberApp*)[NSApp delegate] setPresence:PRESENCE_CHAT withMessage:nil];
}
- (IBAction) online:(id) sender
{
SELECT_MENU_ITEM;
[(JabberApp*)[NSApp delegate] setPresence:PRESENCE_ONLINE withMessage:nil];
}
- (IBAction) away:(id) sender
{
SELECT_MENU_ITEM;
[(JabberApp*)[NSApp delegate] setPresence:PRESENCE_AWAY withMessage:nil];
}
- (IBAction) xa:(id) sender
{
SELECT_MENU_ITEM;
[(JabberApp*)[NSApp delegate] setPresence:PRESENCE_XA withMessage:nil];
}
- (IBAction) dnd:(id) sender
{
SELECT_MENU_ITEM;
[(JabberApp*)[NSApp delegate] setPresence:PRESENCE_DND withMessage:nil];
}
- (IBAction) offline:(id) sender
{
SELECT_MENU_ITEM;
[(JabberApp*)[NSApp delegate] setPresence:PRESENCE_OFFLINE withMessage:nil];
}
#undef SELECT_MENU_ITEM
@end