diff options
author | dynaflash <[email protected]> | 2009-05-05 17:28:50 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2009-05-05 17:28:50 +0000 |
commit | 448b84b84a6a845a6096ba7d2028f38e9717f286 (patch) | |
tree | 86b38886a11543e0fd65710379899fb229d2b467 /macosx | |
parent | 5d088d3fbd23bc18024afe964f3894a4c6befa70 (diff) |
MacGui: disable and deselect chapter markers when only one chapter is being encoded, whether it be a single chapter title or user specified chapter.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2386 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.mm | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 1872e5fff..b38ade9a0 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -1932,8 +1932,16 @@ fWorkingCount = 0; [queueFileJob setObject:[NSNumber numberWithInt:[fPresetsOutlineView selectedRow]] forKey:@"PresetIndexNum"]; [queueFileJob setObject:[fDstFormatPopUp titleOfSelectedItem] forKey:@"FileFormat"]; - /* Chapter Markers fCreateChapterMarkers*/ - [queueFileJob setObject:[NSNumber numberWithInt:[fCreateChapterMarkers state]] forKey:@"ChapterMarkers"]; + /* Chapter Markers*/ + /* If we have only one chapter or a title without chapters, set chapter markers to off */ + if ([fSrcChapterStartPopUp indexOfSelectedItem] == [fSrcChapterEndPopUp indexOfSelectedItem]) + { + [queueFileJob setObject:[NSNumber numberWithInt:0] forKey:@"ChapterMarkers"]; + } + else + { + [queueFileJob setObject:[NSNumber numberWithInt:[fCreateChapterMarkers state]] forKey:@"ChapterMarkers"]; + } /* We need to get the list of chapter names to put into an array and store * in our queue, so they can be reapplied in prepareJob when this queue @@ -3901,6 +3909,17 @@ fWorkingCount = 0; duration % 60]]; [self calculateBitrate: sender]; + + if ( [fSrcChapterStartPopUp indexOfSelectedItem] == [fSrcChapterEndPopUp indexOfSelectedItem] ) + { + /* Disable chapter markers for any source with less than two chapters as it makes no sense. */ + [fCreateChapterMarkers setEnabled: NO]; + [fCreateChapterMarkers setState: NSOffState]; + } + else + { + [fCreateChapterMarkers setEnabled: YES]; + } } - (IBAction) formatPopUpChanged: (id) sender @@ -5795,6 +5814,9 @@ return YES; /* Chapter Markers*/ [fCreateChapterMarkers setState:[[chosenPreset objectForKey:@"ChapterMarkers"] intValue]]; + /* check to see if we have only one chapter */ + [self chapterPopUpChanged:nil]; + /* Allow Mpeg4 64 bit formatting +4GB file sizes */ [fDstMp4LargeFileCheck setState:[[chosenPreset objectForKey:@"Mp4LargeFile"] intValue]]; /* Mux mp4 with http optimization */ |