diff options
author | handbrake <[email protected]> | 2007-01-02 08:05:32 +0000 |
---|---|---|
committer | handbrake <[email protected]> | 2007-01-02 08:05:32 +0000 |
commit | 1d2377d6fc81fed2615a69304898c7686a060cf6 (patch) | |
tree | bd8e4aaec00cf8673c53910f7bbe2ef2535ced10 /macosx | |
parent | 5da92fb69fadc0459269c0b6d16dbcf64d7bf0d3 (diff) |
Pri: Add preference for the default audio stream
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@81 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.mm | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 351677154..e182acdff 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -785,6 +785,11 @@ static int FormatSettings[3][4] = /* Update lang popups */ hb_audio_t * audio; + // PRI CHANGES 02/12/06 + NSString * audiotmppri; + NSString * audiosearchpri=[[NSUserDefaults standardUserDefaults] stringForKey:@"DefaultLanguage"]; + int indxpri=0; + // End of pri changes 02/12/06 [fAudLang1PopUp removeAllItems]; [fAudLang2PopUp removeAllItems]; [fAudLang1PopUp addItemWithTitle: _( @"None" )]; @@ -792,6 +797,14 @@ static int FormatSettings[3][4] = for( int i = 0; i < hb_list_count( title->list_audio ); i++ ) { audio = (hb_audio_t *) hb_list_item( title->list_audio, i ); + // PRI CHANGES 02/12/06 + audiotmppri=(NSString *) [NSString stringWithCString: audio->lang]; + // Try to find the desired default language + if ([audiotmppri hasPrefix:audiosearchpri] && indxpri==0) + { + indxpri=i+1; + } + // End of pri changes 02/12/06 [[fAudLang1PopUp menu] addItemWithTitle: [NSString stringWithCString: audio->lang] @@ -800,7 +813,10 @@ static int FormatSettings[3][4] = [NSString stringWithCString: audio->lang] action: NULL keyEquivalent: @""]; } - [fAudLang1PopUp selectItemAtIndex: 1]; + // PRI CHANGES 02/12/06 + if (indxpri==0) { indxpri=1; } + [fAudLang1PopUp selectItemAtIndex: indxpri]; + // End of pri changes 02/12/06 [fAudLang2PopUp selectItemAtIndex: 0]; } |