diff options
author | ritsuka <[email protected]> | 2014-08-29 05:55:50 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-08-29 05:55:50 +0000 |
commit | fa2886561fb4423d8b085da7ee9abc376eabf8e2 (patch) | |
tree | 5c2c6b9d8aa78f88cd379eec80a557ccf0a30df8 | |
parent | c3c7ff9c04f071f41fbe5e9cd041fd00d8157bd4 (diff) |
MacGui: use the menu item tag to select the item of the format popup button.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6382 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/Controller.m | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index 8c83e358d..0766d523c 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -2814,11 +2814,11 @@ fWorkingCount = 0; [fSrcChapterStartPopUp selectItemAtIndex: [[queueToApply objectForKey:@"ChapterStart"] intValue] - 1]; [fSrcChapterEndPopUp selectItemAtIndex: [[queueToApply objectForKey:@"ChapterEnd"] intValue] - 1]; - + /* File Format */ - [fDstFormatPopUp selectItemWithTitle:[queueToApply objectForKey:@"FileFormat"]]; + [fDstFormatPopUp selectItemWithTag:queueToApply[@"JobFileFormatMux"]]; [self formatPopUpChanged:nil]; - + /* Chapter Markers*/ fChapterTitlesController.createChapterMarkers = [[queueToApply objectForKey:@"ChapterMarkers"] boolValue]; [fChapterTitlesController addChaptersFromQueue:[queueToApply objectForKey:@"ChapterNames"]]; @@ -4715,14 +4715,13 @@ the user is using "Custom" settings by determining the sender*/ - (void)applyPreset:(HBPreset *)preset { self.selectedPreset = preset; + self.customPreset = NO; if (preset != nil && SuccessfulScan) { hb_job_t * job = fTitle->job; - - // for mapping names via libhb - const char *strValue; NSDictionary *chosenPreset = preset.content; + [fPresetSelectedDisplay setStringValue:[chosenPreset objectForKey:@"PresetName"]]; if ([[chosenPreset objectForKey:@"Default"] intValue] == 1) @@ -4733,13 +4732,13 @@ the user is using "Custom" settings by determining the sender*/ { [fPresetSelectedDisplay setStringValue:[chosenPreset objectForKey:@"PresetName"]]; } - + /* File Format */ /* map legacy container names via libhb */ - strValue = hb_container_sanitize_name([[chosenPreset objectForKey:@"FileFormat"] UTF8String]); - [fDstFormatPopUp selectItemWithTitle:[NSString stringWithFormat:@"%s", strValue]]; + int format = hb_container_get_from_name(hb_container_sanitize_name([chosenPreset[@"FileFormat"] UTF8String])); + [fDstFormatPopUp selectItemWithTag:format]; [self formatPopUpChanged:nil]; - + /* Chapter Markers*/ fChapterTitlesController.createChapterMarkers = [[chosenPreset objectForKey:@"ChapterMarkers"] boolValue]; /* check to see if we have only one chapter */ |