First commit of collapsable groups. A lot more needs to still be done.

This commit is contained in:
Mitchell Livingston
2008-02-06 23:45:44 +00:00
parent e372450e98
commit a0061f43fb
12 changed files with 2901 additions and 2971 deletions

View File

@@ -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];