Span the header with the name of the file to multiple column.

This commit is contained in:
Damiano Galassi committed 2013-12-06 16:59:51 +01:00
1 parent ea2afb255f
commit efc43ff313
2 files changed
+60 -9

No files matched your search

+21 -4
View File
@@ -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;
}
+39 -5
View File
@@ -3,12 +3,12 @@
<data>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">13A603</string>
<string key="IBDocument.InterfaceBuilderVersion">4511</string>
<string key="IBDocument.InterfaceBuilderVersion">4514</string>
<string key="IBDocument.AppKitVersion">1265</string>
<string key="IBDocument.HIToolboxVersion">695.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">4511</string>
<string key="NS.object.0">4514</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBCustomCell</string>
@@ -67,7 +67,7 @@
<array class="NSMutableArray" key="NSSubviews">
<object class="NSTableView" id="650446865">
<reference key="NSNextResponder" ref="299978969"/>
<int key="NSvFlags">256</int>
<int key="NSvFlags">4352</int>
<string key="NSFrameSize">{602, 171}</string>
<reference key="NSSuperview" ref="299978969"/>
<reference key="NSWindow"/>
@@ -323,13 +323,13 @@
</object>
</object>
<double key="NSRowHeight">17</double>
<int key="NSTvFlags">-692027392</int>
<int key="NSTvFlags">-557809664</int>
<reference key="NSDelegate"/>
<reference key="NSDataSource"/>
<int key="NSColumnAutoresizingStyle">1</int>
<int key="NSDraggingSourceMaskForLocal">15</int>
<int key="NSDraggingSourceMaskForNonLocal">0</int>
<bool key="NSAllowsTypeSelect">YES</bool>
<bool key="NSAllowsTypeSelect">NO</bool>
<int key="NSTableViewDraggingDestinationStyle">0</int>
<int key="NSTableViewGroupRowStyle">1</int>
</object>
@@ -520,6 +520,7 @@
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMinSize">{550, 238}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<string key="NSFrameAutosaveName">SBFileImportWindow</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
</array>
@@ -869,6 +870,7 @@
<string key="52.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="53.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="7.CustomClassName">SBTableView</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -926,6 +928,38 @@
<string key="minorKey">./Classes/SBFileImport.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">SBTableView</string>
<string key="superclassName">NSTableView</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="copy:">id</string>
<string key="cut:">id</string>
<string key="delete:">id</string>
<string key="paste:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="copy:">
<string key="name">copy:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="cut:">
<string key="name">cut:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="delete:">
<string key="name">delete:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="paste:">
<string key="name">paste:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/SBTableView.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>