get rid of an unneeded variable

This commit is contained in:
Mitchell Livingston 2007-06-24 15:02:29 +00:00
parent f7f032142a
commit 4986127ff3
3 changed files with 6 additions and 9 deletions

View File

@ -9,7 +9,6 @@
NSMutableDictionary * fItem; NSMutableDictionary * fItem;
} }
- (id) initForParentView: (FileOutlineView *) parentView;
- (void) setItem: (NSMutableDictionary *) item; - (void) setItem: (NSMutableDictionary *) item;
@end @end

View File

@ -3,7 +3,7 @@
@implementation FilePriorityCell @implementation FilePriorityCell
- (id) initForParentView: (FileOutlineView *) parentView - (id) init
{ {
if ((self = [super init])) if ((self = [super init]))
{ {
@ -17,9 +17,6 @@
[self setLabel: @"" forSegment: i]; [self setLabel: @"" forSegment: i];
[self setWidth: 6.0 forSegment: i]; [self setWidth: 6.0 forSegment: i];
} }
#warning better way?
fParentView = parentView;
} }
return self; return self;
} }
@ -48,7 +45,7 @@
actualPriority = PRIORITY_NORMAL; actualPriority = PRIORITY_NORMAL;
[torrent setFilePriority: actualPriority forIndexes: indexes]; [torrent setFilePriority: actualPriority forIndexes: indexes];
[fParentView reloadData]; [(FileOutlineView *)[self controlView] reloadData];
} }
- (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) controlView - (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) controlView
@ -63,8 +60,9 @@
normal = [torrent hasFilePriority: PRIORITY_NORMAL forIndexes: indexSet], normal = [torrent hasFilePriority: PRIORITY_NORMAL forIndexes: indexSet],
high = [torrent hasFilePriority: PRIORITY_HIGH forIndexes: indexSet]; high = [torrent hasFilePriority: PRIORITY_HIGH forIndexes: indexSet];
int row = [fParentView hoverRow]; FileOutlineView * view = (FileOutlineView *)[self controlView];
if (row != -1 && [fParentView itemAtRow: row] == fItem) int row = [view hoverRow];
if (row != -1 && [view itemAtRow: row] == fItem)
{ {
[super setSelected: low forSegment: 0]; [super setSelected: low forSegment: 0];
[super setSelected: normal forSegment: 1]; [super setSelected: normal forSegment: 1];

View File

@ -108,7 +108,7 @@
[fFileOutline setDoubleAction: @selector(revealFile:)]; [fFileOutline setDoubleAction: @selector(revealFile:)];
//set file outline //set file outline
FilePriorityCell * priorityCell = [[[FilePriorityCell alloc] initForParentView: fFileOutline] autorelease]; FilePriorityCell * priorityCell = [[[FilePriorityCell alloc] init] autorelease];
[[fFileOutline tableColumnWithIdentifier: @"Priority"] setDataCell: priorityCell]; [[fFileOutline tableColumnWithIdentifier: @"Priority"] setDataCell: priorityCell];
//set blank inspector //set blank inspector