mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
First commit of collapsable groups. A lot more needs to still be done.
This commit is contained in:
@@ -161,10 +161,7 @@ GroupsWindowController * fGroupsWindowInstance = nil;
|
||||
- (NSImage *) imageForIndex: (int) index isSmall: (BOOL) small
|
||||
{
|
||||
int orderIndex = [self orderValueForIndex: index];
|
||||
if (orderIndex == -1)
|
||||
return nil;
|
||||
|
||||
return [self imageForGroup: [fGroups objectAtIndex: orderIndex] isSmall: small];
|
||||
return orderIndex != -1 ? [self imageForGroup: [fGroups objectAtIndex: orderIndex] isSmall: small] : nil;
|
||||
}
|
||||
|
||||
- (NSInteger) numberOfRowsInTableView: (NSTableView *) tableview
|
||||
@@ -262,14 +259,13 @@ GroupsWindowController * fGroupsWindowInstance = nil;
|
||||
|
||||
if ([selectedGroups count] > 0)
|
||||
{
|
||||
NSMutableIndexSet * indexSet = [NSMutableIndexSet indexSet];
|
||||
NSEnumerator * enumerator = [selectedGroups objectEnumerator];
|
||||
NSMutableIndexSet * indexSet = [[NSMutableIndexSet alloc] init];
|
||||
NSDictionary * dict;
|
||||
while ((dict = [enumerator nextObject]))
|
||||
[indexSet addIndex: [fGroups indexOfObject: dict]];
|
||||
|
||||
[fTableView selectRowIndexes: indexSet byExtendingSelection: NO];
|
||||
[indexSet release];
|
||||
}
|
||||
|
||||
[fTableView reloadData];
|
||||
|
||||
Reference in New Issue
Block a user