diff options
author | dynaflash <[email protected]> | 2009-12-23 00:13:03 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2009-12-23 00:13:03 +0000 |
commit | bda833a94656cb2c9340a6b489d25ef462a450e2 (patch) | |
tree | 9441c1e315b14ae13184aeb933d8140f75a18b4e /macosx/HBQueueController.mm | |
parent | 93416da6f241eba72979685ab98f89e33ae6f2e0 (diff) |
MacGui: Interface changes to allow pts or frame based point to point encoding on top of our existing chapters based encoding. ... Based upon jstebbins most excellent work.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3042 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBQueueController.mm')
-rw-r--r-- | macosx/HBQueueController.mm | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm index 580c9e623..512dff479 100644 --- a/macosx/HBQueueController.mm +++ b/macosx/HBQueueController.mm @@ -922,11 +922,7 @@ return ![(HBQueueOutlineView*)outlineView isDragging]; if ([[tableColumn identifier] isEqualToString:@"desc"]) { - /* This should have caused the description we wanted to show*/ - //return [item objectForKey:@"SourceName"]; - /* code to build the description as per old queue */ - //return [self formatEncodeItemDescription:item]; /* Below should be put into a separate method but I am way too f'ing lazy right now */ NSMutableAttributedString * finalString = [[[NSMutableAttributedString alloc] initWithString: @""] autorelease]; @@ -963,9 +959,24 @@ return ![(HBQueueOutlineView*)outlineView isDragging]; NSString * titleString = [NSString stringWithFormat:@"Title %d", [[item objectForKey:@"TitleNumber"] intValue]]; - NSString * chapterString = ([[item objectForKey:@"ChapterStart"] intValue] == [[item objectForKey:@"ChapterEnd"] intValue]) ? - [NSString stringWithFormat:@"Chapter %d", [[item objectForKey:@"ChapterStart"] intValue]] : - [NSString stringWithFormat:@"Chapters %d through %d", [[item objectForKey:@"ChapterStart"] intValue], [[item objectForKey:@"ChapterEnd"] intValue]]; + NSString * startStopString = @""; + if ([[item objectForKey:@"fEncodeStartStop"] intValue] == 0) + { + /* Start Stop is chapters */ + startStopString = ([[item objectForKey:@"ChapterStart"] intValue] == [[item objectForKey:@"ChapterEnd"] intValue]) ? + [NSString stringWithFormat:@"Chapter %d", [[item objectForKey:@"ChapterStart"] intValue]] : + [NSString stringWithFormat:@"Chapters %d through %d", [[item objectForKey:@"ChapterStart"] intValue], [[item objectForKey:@"ChapterEnd"] intValue]]; + } + else if ([[item objectForKey:@"fEncodeStartStop"] intValue] == 1) + { + /* Start Stop is seconds */ + startStopString = [NSString stringWithFormat:@"Seconds %d through %d", [[item objectForKey:@"StartSeconds"] intValue], [[item objectForKey:@"StartSeconds"] intValue] + [[item objectForKey:@"StopSeconds"] intValue]]; + } + else if ([[item objectForKey:@"fEncodeStartStop"] intValue] == 2) + { + /* Start Stop is Frames */ + startStopString = [NSString stringWithFormat:@"Frames %d through %d", [[item objectForKey:@"StartFrame"] intValue], [[item objectForKey:@"StartFrame"] intValue] + [[item objectForKey:@"StopFrame"] intValue]]; + } NSString * passesString = @""; /* check to see if our first subtitle track is Foreign Language Search, in which case there is an in depth scan */ @@ -994,7 +1005,7 @@ return ![(HBQueueOutlineView*)outlineView isDragging]; /* lets add the output file name to the title string here */ NSString * outputFilenameString = [[item objectForKey:@"DestinationPath"] lastPathComponent]; - summaryInfo = [NSString stringWithFormat: @" (%@, %@, %@) -> %@", titleString, chapterString, passesString, outputFilenameString]; + summaryInfo = [NSString stringWithFormat: @" (%@, %@, %@) -> %@", titleString, startStopString, passesString, outputFilenameString]; [finalString appendString:[NSString stringWithFormat:@"%@\n", summaryInfo] withAttributes:detailAttr]; |