* no getter/setter code is needed in this file (unless more complicated
* preference settings are added that cannot be handled with Cocoa bindings).
*/
* no getter/setter code is needed in this file (unless more complicated
* preference settings are added that cannot be handled with Cocoa bindings).
*/
+ (void)registerUserDefaults
{
NSString *desktopDirectory = [@"~/Desktop" stringByExpandingTildeInPath];
+ (void)registerUserDefaults
{
NSString *desktopDirectory = [@"~/Desktop" stringByExpandingTildeInPath];
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:
@"YES", @"CheckForUpdates",
@"English", @"DefaultLanguage",
@"NO", @"DefaultMpegName",
@"YES", @"DefaultCrf",
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:
@"YES", @"CheckForUpdates",
@"English", @"DefaultLanguage",
@"NO", @"DefaultMpegName",
@"YES", @"DefaultCrf",
@"", @"DefAdvancedx264Flags",
@"YES", @"DefaultPresetsDrawerShow",
desktopDirectory, @"LastDestinationDirectory",
desktopDirectory, @"LastSourceDirectory",
@"NO", @"DefaultAutoNaming",
@"", @"DefAdvancedx264Flags",
@"YES", @"DefaultPresetsDrawerShow",
desktopDirectory, @"LastDestinationDirectory",
desktopDirectory, @"LastSourceDirectory",
@"NO", @"DefaultAutoNaming",
- @"NO", @"DefaultChapterMarkers",
- @"YES", @"ShowVerboseOutput",
- @"NO", @"AllowLargeFiles",
- @"NO", @"DisableDvdAutoDetect",
- @"Alert Window", @"AlertWhenDone",
+ @"NO", @"DisableDvdAutoDetect",
+ @"Alert Window", @"AlertWhenDone",
+ @"4:10:15:9:10:35:9", @"DecombCustomString",
[toolbar setDelegate: self];
[toolbar setAllowsUserCustomization: NO];
[toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
[toolbar setSizeMode: NSToolbarSizeModeRegular];
[[self window] setToolbar: toolbar];
[toolbar setDelegate: self];
[toolbar setAllowsUserCustomization: NO];
[toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
[toolbar setSizeMode: NSToolbarSizeModeRegular];
[[self window] setToolbar: toolbar];
if ([ident isEqualToString: TOOLBAR_GENERAL])
{
[item setLabel: NSLocalizedString(@"General", "General")];
if ([ident isEqualToString: TOOLBAR_GENERAL])
{
[item setLabel: NSLocalizedString(@"General", "General")];
else if ([ident isEqualToString: TOOLBAR_ADVANCED])
{
[item setLabel: NSLocalizedString(@"Advanced", "Advanced")];
else if ([ident isEqualToString: TOOLBAR_ADVANCED])
{
[item setLabel: NSLocalizedString(@"Advanced", "Advanced")];
-/**
- * Closes the window and stops modal state. Any changes made in field editor
- * are saved by [NSWindow endEditingFor:] before closing the window.
- */
-- (IBAction)close:(id)sender
-{
- //[self makeFirstResponder: nil];
-}
-
[window setTitle: [sender label]];
else
{
NSToolbar * toolbar = [window toolbar];
NSString * itemIdentifier = [toolbar selectedItemIdentifier];
[window setTitle: [sender label]];
else
{
NSToolbar * toolbar = [window toolbar];
NSString * itemIdentifier = [toolbar selectedItemIdentifier];
- NSEnumerator * enumerator = [[toolbar items] objectEnumerator];
- NSToolbarItem * item;
- while ((item = [enumerator nextObject]))
- if ([[item itemIdentifier] isEqualToString: itemIdentifier])
+ for( NSToolbarItem * item in [toolbar items] )
+ if( [[item itemIdentifier] isEqualToString: itemIdentifier] )