Span the header with the name of the file to multiple column.
This commit is contained in:
1 parent
ea2afb255f
commit
efc43ff313
2 files changed
+60
-9
No files matched your search
+21
-4
@@ -95,13 +95,30 @@
|
||||
|
||||
- (BOOL)tableView:(NSTableView *)tableView isGroupRow:(NSInteger)row
|
||||
{
|
||||
id object = [_tracks objectAtIndex:row];
|
||||
if ([object isKindOfClass:[MP42Track class]])
|
||||
if ([[_tracks objectAtIndex:row] isKindOfClass:[MP42Track class]])
|
||||
return NO;
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)tableView:(NSTableView *)tableView shouldSelectRow:(NSInteger)row
|
||||
{
|
||||
if ([[_tracks objectAtIndex:row] isKindOfClass:[MP42Track class]])
|
||||
return YES;
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(NSTableView *)tableView
|
||||
spanForTableColumn:(NSTableColumn *)tableColumn
|
||||
row:(NSInteger)row
|
||||
{
|
||||
if ([[_tracks objectAtIndex:row] isKindOfClass:[MP42Track class]])
|
||||
return 1;
|
||||
|
||||
return 4;
|
||||
}
|
||||
|
||||
- (NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex
|
||||
{
|
||||
NSCell *cell = nil;
|
||||
@@ -237,9 +254,9 @@
|
||||
|
||||
if ([tableColumn.identifier isEqualToString:@"trackAction"])
|
||||
return [_actionArray objectAtIndex:rowIndex];
|
||||
}
|
||||
else if ([tableColumn.identifier isEqualToString:@"trackName"])
|
||||
} else if ([tableColumn.identifier isEqualToString:@"trackId"]) {
|
||||
return object;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user