summaryrefslogtreecommitdiffabout
path: root/pumpkin/XFersViewDatasource.m
Side-by-side diff
Diffstat (limited to 'pumpkin/XFersViewDatasource.m') (more/less context) (ignore whitespace changes)
-rw-r--r--pumpkin/XFersViewDatasource.m24
1 files changed, 24 insertions, 0 deletions
diff --git a/pumpkin/XFersViewDatasource.m b/pumpkin/XFersViewDatasource.m
new file mode 100644
index 0000000..1f7c689
--- a/dev/null
+++ b/pumpkin/XFersViewDatasource.m
@@ -0,0 +1,24 @@
+
+#import "XFersViewDatasource.h"
+#import "XFer.h"
+
+@implementation XFersViewDatasource
+
+- (id)initWithXfers:(NSMutableArray*)x {
+ if(!(self = [super init])) return self;
+ xfers = [x retain];
+ return self;
+}
+- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex {
+ return [xfers[rowIndex] cellValueForColumn:aTableColumn.identifier];
+}
+- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView {
+ return xfers.count;
+}
+
+- (void) dealloc {
+ [xfers release];
+ [super dealloc];
+}
+
+@end