Keep the EKEzvOutgoingFileTransfer.m around so long as it is sending, regardless...
[adiumx.git] / Source / AIDockIconPreviewController.m
blobe3ef6acefc18931514241a7385ab9215ec796a32
1 /* 
2 * Adium is the legal property of its developers, whose names are listed in the copyright file included
3  * with this source distribution.
4  * 
5  * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
6  * General Public License as published by the Free Software Foundation; either version 2 of the License,
7  * or (at your option) any later version.
8  * 
9  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
10  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
11  * Public License for more details.
12  * 
13  * You should have received a copy of the GNU General Public License along with this program; if not,
14  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
15  */
17 #import "AIDockIconPreviewController.h"
18 #import <Adium/AIIconState.h>
19 #import <Adium/AIObject.h>
20 #import <Adium/AIDockControllerProtocol.h>
21 #import <AIUtilities/AIVerticallyCenteredTextCell.h>
23 @implementation AIDockIconPreviewController
25 - (NSView *) previewView
27         return tableView;
30 - (void) setXtra:(AIXtraInfo *)xtraInfo
32         [images autorelease];
33         [statusNames autorelease];
34         NSDictionary * pack = [[[[AIObject sharedAdiumInstance] dockController] iconPackAtPath:[xtraInfo path]] objectForKey:@"State"];
35         images = [[pack allValues] retain];
36         statusNames = [[pack allKeys] retain];
37         [tableView reloadData];
38         [tableView sizeToFit];
41 - (void) awakeFromNib
42 {       
43         [tableView setHeaderView:nil];
44         [tableView setRowHeight:48.0f];
45         
46         NSTableColumn * column = [[NSTableColumn alloc] initWithIdentifier:@"Dock Icon"];
47         [column setMaxWidth:48.0f];
48         [column setMinWidth:48.0f];
49         [column setDataCell:[[[NSImageCell alloc]init]autorelease]];
50         [tableView addTableColumn:column];
51         [column release];
52         
53         column = [[NSTableColumn alloc] initWithIdentifier:@"Status"];
54         [column setDataCell:[[[AIVerticallyCenteredTextCell alloc] init] autorelease]];
55         [tableView addTableColumn:column];
56         [column release];
59 - (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(int)rowIndex
61         return NO;
64 - (int)numberOfRowsInTableView:(NSTableView *)aTableView
66         return [statusNames count];
69 - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
71         if([[aTableColumn identifier] isEqualToString:@"Dock Icon"])
72                 return [[images objectAtIndex:rowIndex] image];
73         else
74                 return [statusNames objectAtIndex:rowIndex];
77 @end