diff options
author | dynaflash <[email protected]> | 2009-06-16 15:08:05 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2009-06-16 15:08:05 +0000 |
commit | 7f832ec5dc3593626b479085272aa0a42a4e7a8d (patch) | |
tree | 6cb1a5b7144adb61d093c03908a4b174486bcbe7 /macosx/HBQueueController.mm | |
parent | 56bd00ab2fbfb9336d4c38ec8678e373e5a8efeb (diff) |
MacGui: Queue - Only display audio tracks with a valid track selected (removes the useless "None" tracks in the display).
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2540 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBQueueController.mm')
-rw-r--r-- | macosx/HBQueueController.mm | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm index a3e61ce29..58726de88 100644 --- a/macosx/HBQueueController.mm +++ b/macosx/HBQueueController.mm @@ -898,10 +898,10 @@ return ![(HBQueueOutlineView*)outlineView isDragging]; /* Third Line (Format Summary) */ NSString * audioCodecSummary = @""; /* Lets also get our audio track detail since we are going through the logic for use later */ - NSString * audioDetail1 = @"None"; - NSString * audioDetail2 = @"None"; - NSString * audioDetail3 = @"None"; - NSString * audioDetail4 = @"None"; + NSString * audioDetail1 = @""; + NSString * audioDetail2 = @""; + NSString * audioDetail3 = @""; + NSString * audioDetail4 = @""; if ([[item objectForKey:@"Audio1Track"] intValue] > 0) { audioCodecSummary = [NSString stringWithFormat:@"%@", [item objectForKey:@"Audio1Encoder"]]; @@ -1189,22 +1189,33 @@ return ![(HBQueueOutlineView*)outlineView isDragging]; /* Seventh Line Audio Details*/ - [finalString appendString: @"Audio Track 1: " withAttributes:detailBoldAttr]; - [finalString appendString: audioDetail1 withAttributes:detailAttr]; - [finalString appendString:@"\n" withAttributes:detailAttr]; - - [finalString appendString: @"Audio Track 2: " withAttributes:detailBoldAttr]; - [finalString appendString: audioDetail2 withAttributes:detailAttr]; - [finalString appendString:@"\n" withAttributes:detailAttr]; + if ([audioDetail1 length] != 0) + { + [finalString appendString: @"Audio Track 1: " withAttributes:detailBoldAttr]; + [finalString appendString: audioDetail1 withAttributes:detailAttr]; + [finalString appendString:@"\n" withAttributes:detailAttr]; + } - [finalString appendString: @"Audio Track 3: " withAttributes:detailBoldAttr]; - [finalString appendString: audioDetail3 withAttributes:detailAttr]; - [finalString appendString:@"\n" withAttributes:detailAttr]; + if ([audioDetail2 length] != 0) + { + [finalString appendString: @"Audio Track 2: " withAttributes:detailBoldAttr]; + [finalString appendString: audioDetail2 withAttributes:detailAttr]; + [finalString appendString:@"\n" withAttributes:detailAttr]; + } - [finalString appendString: @"Audio Track 4: " withAttributes:detailBoldAttr]; - [finalString appendString: audioDetail4 withAttributes:detailAttr]; - [finalString appendString:@"\n" withAttributes:detailAttr]; + if ([audioDetail3 length] != 0) + { + [finalString appendString: @"Audio Track 3: " withAttributes:detailBoldAttr]; + [finalString appendString: audioDetail3 withAttributes:detailAttr]; + [finalString appendString:@"\n" withAttributes:detailAttr]; + } + if ([audioDetail4 length] != 0) + { + [finalString appendString: @"Audio Track 4: " withAttributes:detailBoldAttr]; + [finalString appendString: audioDetail4 withAttributes:detailAttr]; + [finalString appendString:@"\n" withAttributes:detailAttr]; + } /* Eighth Line Subtitle Details */ int i = 0; |