MacGui: removed a couple of unused preferences keys (CheckForUpdates, DisableDvdAutoDetect, DefAdvancedx264Flags) and the empty TOOLBAR_PICTURE tab. Added a new checkbox to hide the Advanced tab.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6353 b64f7644-9d1e-0410-96f1-a4d463321fa5
This commit is contained in:
ritsuka 2014-08-24 05:59:00 +00:00
parent 3857ffc03e
commit 29a2700784
3 changed files with 77 additions and 103 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13F14" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="14A329r" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies> <dependencies>
<deployment version="1060" identifier="macosx"/> <deployment version="1060" defaultVersion="1060" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
</dependencies> </dependencies>
<objects> <objects>
@ -11,7 +11,6 @@
<outlet property="fAdvancedView" destination="236" id="246"/> <outlet property="fAdvancedView" destination="236" id="246"/>
<outlet property="fAudioView" destination="235" id="247"/> <outlet property="fAudioView" destination="235" id="247"/>
<outlet property="fGeneralView" destination="233" id="245"/> <outlet property="fGeneralView" destination="233" id="245"/>
<outlet property="fPictureView" destination="234" id="248"/>
<outlet property="fSendEncodeToAppField" destination="448" id="456"/> <outlet property="fSendEncodeToAppField" destination="448" id="456"/>
<outlet property="formatTokenField" destination="6aa-GX-TuM" id="DyQ-f3-zBJ"/> <outlet property="formatTokenField" destination="6aa-GX-TuM" id="DyQ-f3-zBJ"/>
<outlet property="window" destination="5" id="187"/> <outlet property="window" destination="5" id="187"/>
@ -320,21 +319,6 @@
</textField> </textField>
</subviews> </subviews>
</customView> </customView>
<customView id="234" userLabel="Picture">
<rect key="frame" x="0.0" y="0.0" width="496" height="82"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField verticalHuggingPriority="750" id="326">
<rect key="frame" x="34" y="42" width="432" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Nothing here right now, but I am sure we will think of something" id="327">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
</customView>
<customView id="235" userLabel="Audio"> <customView id="235" userLabel="Audio">
<rect key="frame" x="0.0" y="0.0" width="500" height="88"/> <rect key="frame" x="0.0" y="0.0" width="500" height="88"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
@ -386,11 +370,11 @@
</subviews> </subviews>
</customView> </customView>
<customView id="236" userLabel="Advanced"> <customView id="236" userLabel="Advanced">
<rect key="frame" x="0.0" y="0.0" width="500" height="242"/> <rect key="frame" x="0.0" y="0.0" width="500" height="266"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<textField verticalHuggingPriority="750" id="444"> <textField verticalHuggingPriority="750" id="444">
<rect key="frame" x="18" y="20" width="117" height="14"/> <rect key="frame" x="18" y="44" width="117" height="14"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Presets:" id="445"> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Presets:" id="445">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@ -399,7 +383,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<popUpButton verticalHuggingPriority="750" id="363"> <popUpButton verticalHuggingPriority="750" id="363">
<rect key="frame" x="295" y="49" width="66" height="22"/> <rect key="frame" x="295" y="73" width="66" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="1" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="369" id="364"> <popUpButtonCell key="cell" type="push" title="1" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="369" id="364">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@ -417,7 +401,7 @@
</connections> </connections>
</popUpButton> </popUpButton>
<popUpButton verticalHuggingPriority="750" id="387"> <popUpButton verticalHuggingPriority="750" id="387">
<rect key="frame" x="300" y="201" width="76" height="22"/> <rect key="frame" x="300" y="225" width="76" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="0.25" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="391" id="388"> <popUpButtonCell key="cell" type="push" title="0.25" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="391" id="388">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@ -440,7 +424,7 @@
</connections> </connections>
</popUpButton> </popUpButton>
<popUpButton verticalHuggingPriority="750" id="352"> <popUpButton verticalHuggingPriority="750" id="352">
<rect key="frame" x="300" y="139" width="73" height="22"/> <rect key="frame" x="300" y="163" width="73" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="353"> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="353">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@ -482,7 +466,7 @@
</connections> </connections>
</popUpButton> </popUpButton>
<button id="401"> <button id="401">
<rect key="frame" x="138" y="18" width="339" height="18"/> <rect key="frame" x="138" y="42" width="339" height="18"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<buttonCell key="cell" type="check" title="Alert when updating built-in presets" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="402"> <buttonCell key="cell" type="check" title="Alert when updating built-in presets" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="402">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@ -493,7 +477,7 @@
</connections> </connections>
</button> </button>
<button id="398"> <button id="398">
<rect key="frame" x="138" y="107" width="339" height="18"/> <rect key="frame" x="138" y="131" width="339" height="18"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<buttonCell key="cell" type="check" title="Use libdvdnav (instead of libdvdread)" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="399"> <buttonCell key="cell" type="check" title="Use libdvdnav (instead of libdvdread)" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="399">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@ -504,7 +488,7 @@
</connections> </connections>
</button> </button>
<button id="347"> <button id="347">
<rect key="frame" x="138" y="73" width="340" height="18"/> <rect key="frame" x="138" y="97" width="340" height="18"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<buttonCell key="cell" type="check" title="Put individual encode logs in same location as movie" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="348"> <buttonCell key="cell" type="check" title="Put individual encode logs in same location as movie" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="348">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@ -515,7 +499,7 @@
</connections> </connections>
</button> </button>
<textField verticalHuggingPriority="750" id="442"> <textField verticalHuggingPriority="750" id="442">
<rect key="frame" x="18" y="109" width="117" height="14"/> <rect key="frame" x="18" y="133" width="117" height="14"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="DVD-Video:" id="443"> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="DVD-Video:" id="443">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@ -524,7 +508,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField verticalHuggingPriority="750" id="350"> <textField verticalHuggingPriority="750" id="350">
<rect key="frame" x="17" y="75" width="118" height="14"/> <rect key="frame" x="17" y="99" width="118" height="14"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Log:" id="351"> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Log:" id="351">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@ -533,7 +517,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField verticalHuggingPriority="750" id="371"> <textField verticalHuggingPriority="750" id="371">
<rect key="frame" x="112" y="54" width="180" height="14"/> <rect key="frame" x="112" y="78" width="180" height="14"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Activity Log Verbosity Level:" id="372"> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Activity Log Verbosity Level:" id="372">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@ -542,7 +526,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField verticalHuggingPriority="750" id="359"> <textField verticalHuggingPriority="750" id="359">
<rect key="frame" x="18" y="144" width="279" height="14"/> <rect key="frame" x="18" y="168" width="279" height="14"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Number of picture previews to scan:" id="360"> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Number of picture previews to scan:" id="360">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@ -551,7 +535,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField verticalHuggingPriority="750" id="463"> <textField verticalHuggingPriority="750" id="463">
<rect key="frame" x="18" y="174" width="279" height="14"/> <rect key="frame" x="18" y="198" width="279" height="14"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Minimum length of title to scan:" id="464"> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Minimum length of title to scan:" id="464">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@ -560,7 +544,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField verticalHuggingPriority="750" id="UXr-op-aKN"> <textField verticalHuggingPriority="750" id="UXr-op-aKN">
<rect key="frame" x="356" y="173" width="121" height="14"/> <rect key="frame" x="356" y="197" width="121" height="14"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="seconds" id="klQ-DW-Kc6"> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="seconds" id="klQ-DW-Kc6">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@ -569,7 +553,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField verticalHuggingPriority="750" id="395"> <textField verticalHuggingPriority="750" id="395">
<rect key="frame" x="18" y="206" width="279" height="14"/> <rect key="frame" x="18" y="230" width="279" height="14"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="x264 Constant Quality fractional granularity:" id="396"> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="x264 Constant Quality fractional granularity:" id="396">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@ -578,7 +562,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField verticalHuggingPriority="750" id="480"> <textField verticalHuggingPriority="750" id="480">
<rect key="frame" x="303" y="171" width="48" height="19"/> <rect key="frame" x="303" y="195" width="48" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="481"> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="481">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@ -589,6 +573,17 @@
<binding destination="61" name="value" keyPath="values.MinTitleScanSeconds" id="483"/> <binding destination="61" name="value" keyPath="values.MinTitleScanSeconds" id="483"/>
</connections> </connections>
</textField> </textField>
<button appearanceType="aqua" id="ybi-46-yhY">
<rect key="frame" x="137" y="17" width="223" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Show Advanced Encoder Options Tab" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="Du1-9x-nHn">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
<connections>
<binding destination="61" name="value" keyPath="values.HBShowAdvancedTab" id="PgA-TV-kBr"/>
</connections>
</button>
</subviews> </subviews>
</customView> </customView>
<customObject id="410" userLabel="Updater" customClass="SUUpdater"/> <customObject id="410" userLabel="Updater" customClass="SUUpdater"/>

View File

@ -6,15 +6,7 @@
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
@interface HBPreferencesController : NSWindowController <NSToolbarDelegate> @interface HBPreferencesController : NSWindowController <NSToolbarDelegate>
{
IBOutlet NSView * fGeneralView, * fPictureView, * fAudioView, * fAdvancedView;
IBOutlet NSTextField * fSendEncodeToAppField;
}
+ (void)registerUserDefaults; + (void)registerUserDefaults;
- (id)init;
/* Manage the send encode to xxx.app windows and field */
- (IBAction) browseSendToApp: (id) sender;
- (void) browseSendToAppDone: (NSOpenPanel *) sheet
returnCode: (int) returnCode contextInfo: (void *) contextInfo;
@end @end

View File

@ -7,7 +7,6 @@
#import "HBLanguagesSelection.h" #import "HBLanguagesSelection.h"
#define TOOLBAR_GENERAL @"TOOLBAR_GENERAL" #define TOOLBAR_GENERAL @"TOOLBAR_GENERAL"
#define TOOLBAR_PICTURE @"TOOLBAR_PICTURE"
#define TOOLBAR_AUDIO @"TOOLBAR_AUDIO" #define TOOLBAR_AUDIO @"TOOLBAR_AUDIO"
#define TOOLBAR_ADVANCED @"TOOLBAR_ADVANCED" #define TOOLBAR_ADVANCED @"TOOLBAR_ADVANCED"
@ -23,6 +22,13 @@
*/ */
@interface HBPreferencesController () <NSTokenFieldDelegate> @interface HBPreferencesController () <NSTokenFieldDelegate>
{
IBOutlet NSView * fGeneralView, * fAudioView, * fAdvancedView;
IBOutlet NSTextField * fSendEncodeToAppField;
}
/* Manage the send encode to xxx.app windows and field */
- (IBAction) browseSendToApp: (id) sender;
- (void) setPrefView: (id) sender; - (void) setPrefView: (id) sender;
- (NSToolbarItem *)toolbarItemWithIdentifier: (NSString *)identifier - (NSToolbarItem *)toolbarItemWithIdentifier: (NSString *)identifier
@ -31,10 +37,10 @@
@property (assign) IBOutlet NSTokenField *formatTokenField; @property (assign) IBOutlet NSTokenField *formatTokenField;
@property (assign) IBOutlet NSTokenField *builtInTokenField; @property (assign) IBOutlet NSTokenField *builtInTokenField;
@property (readonly, nonatomic) NSArray *buildInFormatTokens; @property (nonatomic, readonly) NSArray *buildInFormatTokens;
@property (retain, nonatomic) NSArray *matches; @property (nonatomic, retain) NSArray *matches;
@property (retain, nonatomic) HBLanguagesSelection *languages; @property (nonatomic, retain) HBLanguagesSelection *languages;
@end @end
@ -50,32 +56,28 @@
{ {
NSString *desktopDirectory = [@"~/Desktop" stringByExpandingTildeInPath]; NSString *desktopDirectory = [@"~/Desktop" stringByExpandingTildeInPath];
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: [[NSUserDefaults standardUserDefaults] registerDefaults:@{
@"YES", @"CheckForUpdates", @"LaunchSourceBehavior": @"Open Source",
@"Open Source", @"LaunchSourceBehavior", @"DefaultLanguage": @"English",
@"English", @"DefaultLanguage", @"DefaultMpegExtension": @"Auto",
@"Auto", @"DefaultMpegExtension", @"UseDvdNav": @"YES",
@"YES", @"UseDvdNav", @"DefaultPresetsDrawerShow": @YES,
@"", @"DefAdvancedx264Flags", @"LastDestinationDirectory": desktopDirectory,
@"YES", @"DefaultPresetsDrawerShow", @"LastSourceDirectory": desktopDirectory,
desktopDirectory, @"LastDestinationDirectory", @"DefaultAutoNaming": @NO,
desktopDirectory, @"LastSourceDirectory", @"AlertWhenDone": @"Alert Window",
@"NO", @"DefaultAutoNaming", @"AlertWhenDoneSound": @"YES",
@"NO", @"DisableDvdAutoDetect", @"LoggingLevel": @"1",
@"Alert Window", @"AlertWhenDone", @"EncodeLogLocation": @"NO",
@"YES", @"AlertWhenDoneSound", @"MinTitleScanSeconds": @"10",
@"1", @"LoggingLevel", @"PreviewsNumber": @"10",
@"NO", @"EncodeLogLocation", @"Drawer Size": @"",
@"10", @"MinTitleScanSeconds", @"x264CqSliderFractional": @"0.25",
@"10", @"PreviewsNumber", @"AlertBuiltInPresetUpdate": @"YES",
@"", @"Drawer Size", @"SendCompletedEncodeToApp": @"MetaX",
@"0.25", @"x264CqSliderFractional", @"HBShowAdvancedTab": @NO,
@"YES", @"AlertBuiltInPresetUpdate", @"HBAutoNamingFormat": @[@"{Source}", @" ", @"{Title}"]
@"MetaX", @"SendCompletedEncodeToApp", }];
@"NO", @"ShowAdvancedOptsForAutoPassthru",
@[@"{Source}", @" ", @"{Title}"], @"HBAutoNamingFormat",
nil]];
} }
/** /**
@ -138,12 +140,6 @@
label:NSLocalizedString(@"General", @"Preferences General Toolbar Item") label:NSLocalizedString(@"General", @"Preferences General Toolbar Item")
image:[NSImage imageNamed:@"settings"]]; image:[NSImage imageNamed:@"settings"]];
} }
else if ( [ident isEqualToString:TOOLBAR_PICTURE] )
{
return [self toolbarItemWithIdentifier:ident
label:NSLocalizedString(@"Picture", @"Preferences Picture Toolbar Item")
image:[NSImage imageNamed:@"picturesettings"]];
}
else if ( [ident isEqualToString:TOOLBAR_AUDIO] ) else if ( [ident isEqualToString:TOOLBAR_AUDIO] )
{ {
return [self toolbarItemWithIdentifier:ident return [self toolbarItemWithIdentifier:ident
@ -172,8 +168,7 @@
- (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar - (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar
{ {
return [NSArray arrayWithObjects: TOOLBAR_GENERAL, /*TOOLBAR_PICTURE, */ return @[TOOLBAR_GENERAL, TOOLBAR_AUDIO, TOOLBAR_ADVANCED];
TOOLBAR_AUDIO, TOOLBAR_ADVANCED, nil];
} }
/* Manage the send encode to xxx.app windows and field */ /* Manage the send encode to xxx.app windows and field */
@ -196,26 +191,20 @@
sendToAppDirectory = @"/Applications"; sendToAppDirectory = @"/Applications";
} }
[panel setDirectoryURL:[NSURL fileURLWithPath:sendToAppDirectory]]; [panel setDirectoryURL:[NSURL fileURLWithPath:sendToAppDirectory]];
[panel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) {
[self browseSendToAppDone:panel returnCode:(int)result contextInfo:sender];
}];
}
- (void) browseSendToAppDone: (NSOpenPanel *) sheet [panel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) {
returnCode: (int) returnCode contextInfo: (void *) contextInfo if (result == NSOKButton)
{
if( returnCode == NSOKButton )
{ {
NSURL *sendToAppURL = [[sheet URLs] objectAtIndex: 0]; NSURL *sendToAppURL = [panel URL];
NSURL *sendToAppDirectory = [sendToAppURL URLByDeletingLastPathComponent]; NSURL *sendToAppDirectory = [sendToAppURL URLByDeletingLastPathComponent];
[[NSUserDefaults standardUserDefaults] setObject:[sendToAppDirectory path] forKey:@"LastSendToAppDirectory"]; [[NSUserDefaults standardUserDefaults] setObject:[sendToAppDirectory path] forKey:@"LastSendToAppDirectory"];
[sheet orderOut: self];
NSString *sendToAppName; NSString *sendToAppName = [[sendToAppURL lastPathComponent] stringByDeletingPathExtension];
sendToAppName = [[sendToAppURL lastPathComponent] stringByDeletingPathExtension];
/* we set the name of the app to send to in the display field */ /* we set the name of the app to send to in the display field */
[fSendEncodeToAppField setStringValue:sendToAppName]; [fSendEncodeToAppField setStringValue:sendToAppName];
[[NSUserDefaults standardUserDefaults] setObject:[fSendEncodeToAppField stringValue] forKey:@"SendCompletedEncodeToApp"]; [[NSUserDefaults standardUserDefaults] setObject:[fSendEncodeToAppField stringValue] forKey:@"SendCompletedEncodeToApp"];
} }
}];
} }
#pragma mark - Format Token Field Delegate #pragma mark - Format Token Field Delegate
@ -289,9 +278,7 @@
if( sender ) if( sender )
{ {
NSString * identifier = [sender itemIdentifier]; NSString * identifier = [sender itemIdentifier];
if( [identifier isEqualToString: TOOLBAR_PICTURE] ) if( [identifier isEqualToString: TOOLBAR_AUDIO] )
view = fPictureView;
else if( [identifier isEqualToString: TOOLBAR_AUDIO] )
view = fAudioView; view = fAudioView;
else if( [identifier isEqualToString: TOOLBAR_ADVANCED] ) else if( [identifier isEqualToString: TOOLBAR_ADVANCED] )
view = fAdvancedView; view = fAdvancedView;