1 #import "SharedFilesViewController.h"
3 @implementation SharedFilesViewController
5 - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex {
7 NSString *columnId = [aTableColumn identifier];
8 SharedFile *i = [m_fileset objectAtIndex:rowIndex];
9 if ( [columnId compare:@"filename"] == NSOrderedSame ) {
11 } else if ( [columnId compare:@"size"] == NSOrderedSame ) {
12 value = [i convertWithPrefix: i.size];
13 } else if ( [columnId compare:@"xfer"] == NSOrderedSame ) {
14 value = [i convertWithPrefix: i.size_xfer];
15 } else if ( [columnId compare:@"xfer_all"] == NSOrderedSame ) {
16 value = [i convertWithPrefix: i.size_xfer_all];
17 } else if ( [columnId compare:@"prio"] == NSOrderedSame ) {
20 value = @"ERROR: bad column id";
25 - (int)numberOfRowsInTableView:(NSTableView *)aTableView {
26 return [m_fileset count];
29 - (void)linkAmuleData:(amuleData *)amuledata {
30 m_amuledata = amuledata;
31 m_fileset = m_amuledata.shared;
32 [amuledata.shared setGuiController:self];
36 [m_table_view reloadData];
39 - (void)awakeFromNib {
40 [m_table_view setDelegate:self];
41 [m_table_view setDataSource:self];