-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathChatLogMenuController.m
More file actions
30 lines (28 loc) · 927 Bytes
/
ChatLogMenuController.m
File metadata and controls
30 lines (28 loc) · 927 Bytes
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
//
// ChatLogMenuController.m
// Jabber
//
// Created by David Chisnall on 18/02/2005.
// Copyright 2005 __MyCompanyName__. All rights reserved.
//
#import <XMPPKit/XMPPPerson.h>
#import <XMPPKit/XMPPChatLog.h>
#import "ChatLogMenuController.h"
#import "MessageWindowController.h"
#import "RosterController.h"
@implementation ChatLogMenuController
- (IBAction) openChatLog:(id)sender
{
id frontWindowController = [[NSApp mainWindow] delegate];
NSMutableString * logFolder = [NSMutableString stringWithString:[XMPPChatLog logPath]];
if([frontWindowController isKindOfClass:[MessageWindowController class]])
{
XMPPPerson * person = [[(MessageWindowController*)frontWindowController conversation] remotePerson];
if([[NSFileManager defaultManager] fileExistsAtPath:logFolder])
{
[logFolder appendFormat:@"%@/%@", [person group], [person name]];
}
}
[[NSWorkspace sharedWorkspace] openFile:logFolder];
}
@end