X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=macosx%2FHBPreferencesController.m;h=15653fe57c8dd39f1d4643693c6b05d81d5840a1;hb=4b72a63eb61a01275493c4bfb51ba02152d1c5e1;hp=7f947e12bbe54fe274efa9f16f4b9babafb4659b;hpb=64a48a58d954017539afc5e4f1d5c6201873149e;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m index 7f947e12..15653fe5 100644 --- a/macosx/HBPreferencesController.m +++ b/macosx/HBPreferencesController.m @@ -45,9 +45,9 @@ @"YES", @"CheckForUpdates", @"Open Source", @"LaunchSourceBehavior", @"English", @"DefaultLanguage", - @"NO", @"DefaultMpegName", - @"YES", @"DefaultCrf", - @"NO", @"UseDvdNav", + @"YES", @"UseCoreAudio", + @"YES", @"DefaultMpegName", + @"YES", @"UseDvdNav", @"", @"DefAdvancedx264Flags", @"YES", @"DefaultPresetsDrawerShow", desktopDirectory, @"LastDestinationDirectory", @@ -55,11 +55,15 @@ @"NO", @"DefaultAutoNaming", @"NO", @"DisableDvdAutoDetect", @"Alert Window", @"AlertWhenDone", + @"YES", @"AlertWhenDoneSound", @"1", @"LoggingLevel", @"NO", @"EncodeLogLocation", + @"10", @"MinTitleScanSeconds", @"10", @"PreviewsNumber", @"", @"Drawer Size", - @"0.25", @"x264CqSliderFractional", + @"0.25", @"x264CqSliderFractional", + @"YES", @"AlertBuiltInPresetUpdate", + @"MetaX", @"SendCompletedEncodeToApp", nil]]; } @@ -142,10 +146,54 @@ - (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar { - return [NSArray arrayWithObjects: TOOLBAR_GENERAL, TOOLBAR_PICTURE, + return [NSArray arrayWithObjects: TOOLBAR_GENERAL, /*TOOLBAR_PICTURE, */ TOOLBAR_AUDIO, TOOLBAR_ADVANCED, nil]; } +/* Manage the send encode to xxx.app windows and field */ +/*Opens the app browse window*/ +- (IBAction) browseSendToApp: (id) sender +{ + NSOpenPanel * panel; + + panel = [NSOpenPanel openPanel]; + [panel setAllowsMultipleSelection: NO]; + [panel setCanChooseFiles: YES]; + [panel setCanChooseDirectories: NO ]; + NSString * sendToAppDirectory; + if ([[NSUserDefaults standardUserDefaults] stringForKey:@"LastSendToAppDirectory"]) + { + sendToAppDirectory = [[NSUserDefaults standardUserDefaults] stringForKey:@"LastSendToAppDirectory"]; + } + else + { + sendToAppDirectory = @"/Applications"; + } + [panel beginSheetForDirectory: sendToAppDirectory file: nil types: nil + modalForWindow: [self window] modalDelegate: self + didEndSelector: @selector( browseSendToAppDone:returnCode:contextInfo: ) + contextInfo: sender]; +} + +- (void) browseSendToAppDone: (NSOpenPanel *) sheet + returnCode: (int) returnCode contextInfo: (void *) contextInfo +{ + if( returnCode == NSOKButton ) + { + NSString *sendToAppPath = [[sheet filenames] objectAtIndex: 0]; + NSString *sendToAppDirectory = [sendToAppPath stringByDeletingLastPathComponent]; + [[NSUserDefaults standardUserDefaults] setObject:sendToAppDirectory forKey:@"LastSendToAppDirectory"]; + [sheet orderOut: self]; + NSString *sendToAppName; + sendToAppName = [[sendToAppPath lastPathComponent] stringByDeletingPathExtension]; + /* we set the name of the app to send to in the display field */ + [fSendEncodeToAppField setStringValue:sendToAppName]; + [[NSUserDefaults standardUserDefaults] setObject:[fSendEncodeToAppField stringValue] forKey:@"SendCompletedEncodeToApp"]; + + } +} + + @end @implementation HBPreferencesController (Private)