Fix metadata table view highlight.
This commit is contained in:
1 parent
6f0d2ccf72
commit
19cb919f75
2 files changed
+17
-18
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13E19" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="14A299l" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment defaultVersion="1060" identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
|
||||
@@ -61,8 +61,8 @@
|
||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" white="0.33333299" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</tableHeaderCell>
|
||||
<textFieldCell key="dataCell" controlSize="small" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="27">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<textFieldCell key="dataCell" controlSize="small" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="right" title="Text Cell" id="27">
|
||||
<font key="font" metaFont="smallSystemBold"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<allowedInputSourceLocales>
|
||||
@@ -680,8 +680,8 @@ Gw
|
||||
</window>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="NSAddTemplate" width="8" height="8"/>
|
||||
<image name="NSRemoveTemplate" width="8" height="8"/>
|
||||
<image name="NSAddTemplate" width="11" height="11"/>
|
||||
<image name="NSRemoveTemplate" width="11" height="11"/>
|
||||
<image name="NSSmartBadgeTemplate" width="14" height="14"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -67,12 +67,6 @@ NSString *MetadataPBoardType = @"MetadataPBoardType";
|
||||
[ps setHeadIndent: -10.0];
|
||||
[ps setAlignment:NSRightTextAlignment];
|
||||
|
||||
detailBoldAttr = [[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSFont boldSystemFontOfSize:11.0], NSFontAttributeName,
|
||||
ps, NSParagraphStyleAttributeName,
|
||||
[NSColor grayColor], NSForegroundColorAttributeName,
|
||||
nil] retain];
|
||||
|
||||
[mediaKind selectItemWithTag:metadata.mediaKind];
|
||||
[contentRating selectItemWithTag:metadata.contentRating];
|
||||
[hdVideo selectItemWithTag:metadata.hdVideo];
|
||||
@@ -424,11 +418,6 @@ NSString *MetadataPBoardType = @"MetadataPBoardType";
|
||||
}
|
||||
}
|
||||
|
||||
- (NSAttributedString *) boldString: (NSString *) string
|
||||
{
|
||||
return [[[NSAttributedString alloc] initWithString:string attributes:detailBoldAttr] autorelease];
|
||||
}
|
||||
|
||||
/* TableView delegate methods */
|
||||
|
||||
- (NSInteger) numberOfRowsInTableView: (NSTableView *) t
|
||||
@@ -467,7 +456,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn
|
||||
row:(NSInteger)rowIndex
|
||||
{
|
||||
if ([tableColumn.identifier isEqualToString:@"name"])
|
||||
return [self boldString:[self.tagsArray objectAtIndex:rowIndex]];
|
||||
return [self.tagsArray objectAtIndex:rowIndex];
|
||||
|
||||
if ([tableColumn.identifier isEqualToString:@"value"])
|
||||
return [tags objectForKey:[self.tagsArray objectAtIndex:rowIndex]];
|
||||
@@ -519,6 +508,17 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex
|
||||
{
|
||||
if ([tableColumn.identifier isEqualToString:@"name"]) {
|
||||
if ([[tableView selectedRowIndexes] containsIndex:rowIndex]) {
|
||||
[cell setTextColor:[NSColor whiteColor]];
|
||||
} else {
|
||||
[cell setTextColor:[NSColor grayColor]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)tableViewColumnDidResize: (NSNotification* )notification
|
||||
{
|
||||
[dct removeAllObjects];
|
||||
@@ -801,7 +801,6 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn
|
||||
[_tagsArray release];
|
||||
[tagsMenu release];
|
||||
[tabCol release];
|
||||
[detailBoldAttr release];
|
||||
[ratingCell release];
|
||||
[genreCell release];
|
||||
[dct release];
|
||||
|
||||
Reference in new issue
Block a user