/* Update lang popups */
/* START Legacy */
+ /*
hb_audio_t * audio;
[fAudLang1PopUp removeAllItems];
[fAudLang2PopUp removeAllItems];
}
[fAudLang1PopUp selectItemAtIndex: 1];
[fAudLang2PopUp selectItemAtIndex: 0];
+ */
/* END Legacy */
/* START pri */
- /*
- hb_audio_t * audio;
+ hb_audio_t * audio;
+
// PRI CHANGES 02/12/06
NSString * audiotmppri;
NSString * audiosearchpri=[[NSUserDefaults standardUserDefaults] stringForKey:@"DefaultLanguage"];
{
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)
+ if (audiosearchpri!= NULL)
{
- indxpri=i+1;
+ 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 selectItemAtIndex: indxpri];
// End of pri changes 02/12/06
[fAudLang2PopUp selectItemAtIndex: 0];
- */
+
/* END pri */
}
forKey:@"CheckForUpdates"];
appDefaults = [NSDictionary dictionaryWithObject:@"English"
forKey:@"DefaultLanguage"];
-appDefaults = [NSDictionary dictionaryWithObject:@"NO"
+ appDefaults = [NSDictionary dictionaryWithObject:@"NO"
forKey:@"DefaultMpegName"];
appDefaults = [NSDictionary dictionaryWithObject:@"NO"
forKey:@"DefaultCrf"];
[fdefaultlanguage addItemWithObjectValue: @"Yoruba"];
[fdefaultlanguage addItemWithObjectValue: @"Zhuang"];
[fdefaultlanguage addItemWithObjectValue: @"Zulu"];
+ [fdefaultlanguage setStringValue:@"English"];
+
+ /* If a Default Language is selected then write it otherwise let English as default */
- //[fdefaultlanguage setStringValue:[defaults stringForKey:@"DefaultLanguage"]];
- [fdefaultlanguage selectItemWithObjectValue:[defaults stringForKey:@"DefaultLanguage"]];
+ if ([defaults stringForKey:@"DefaultLanguage"]!=NULL)
+ {
+ [fdefaultlanguage setStringValue:[defaults stringForKey:@"DefaultLanguage"]];
+ }
+ [fdefaultlanguage selectItemWithObjectValue:[defaults stringForKey:@"DefaultLanguage"]];