mirror of
https://github.com/transmission/transmission
synced 2024-12-24 16:52:39 +00:00
get rid of an unneeded variable
This commit is contained in:
parent
f7f032142a
commit
4986127ff3
3 changed files with 6 additions and 9 deletions
|
@ -9,7 +9,6 @@
|
|||
NSMutableDictionary * fItem;
|
||||
}
|
||||
|
||||
- (id) initForParentView: (FileOutlineView *) parentView;
|
||||
- (void) setItem: (NSMutableDictionary *) item;
|
||||
|
||||
@end
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
@implementation FilePriorityCell
|
||||
|
||||
- (id) initForParentView: (FileOutlineView *) parentView
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
|
@ -17,9 +17,6 @@
|
|||
[self setLabel: @"" forSegment: i];
|
||||
[self setWidth: 6.0 forSegment: i];
|
||||
}
|
||||
|
||||
#warning better way?
|
||||
fParentView = parentView;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -48,7 +45,7 @@
|
|||
actualPriority = PRIORITY_NORMAL;
|
||||
|
||||
[torrent setFilePriority: actualPriority forIndexes: indexes];
|
||||
[fParentView reloadData];
|
||||
[(FileOutlineView *)[self controlView] reloadData];
|
||||
}
|
||||
|
||||
- (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) controlView
|
||||
|
@ -63,8 +60,9 @@
|
|||
normal = [torrent hasFilePriority: PRIORITY_NORMAL forIndexes: indexSet],
|
||||
high = [torrent hasFilePriority: PRIORITY_HIGH forIndexes: indexSet];
|
||||
|
||||
int row = [fParentView hoverRow];
|
||||
if (row != -1 && [fParentView itemAtRow: row] == fItem)
|
||||
FileOutlineView * view = (FileOutlineView *)[self controlView];
|
||||
int row = [view hoverRow];
|
||||
if (row != -1 && [view itemAtRow: row] == fItem)
|
||||
{
|
||||
[super setSelected: low forSegment: 0];
|
||||
[super setSelected: normal forSegment: 1];
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
[fFileOutline setDoubleAction: @selector(revealFile:)];
|
||||
|
||||
//set file outline
|
||||
FilePriorityCell * priorityCell = [[[FilePriorityCell alloc] initForParentView: fFileOutline] autorelease];
|
||||
FilePriorityCell * priorityCell = [[[FilePriorityCell alloc] init] autorelease];
|
||||
[[fFileOutline tableColumnWithIdentifier: @"Priority"] setDataCell: priorityCell];
|
||||
|
||||
//set blank inspector
|
||||
|
|
Loading…
Reference in a new issue