diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/English.lproj/AudioDefaults.xib | 31 | ||||
-rw-r--r-- | macosx/English.lproj/SubtitlesDefaults.xib | 63 | ||||
-rw-r--r-- | macosx/HBAudio.m | 1 | ||||
-rw-r--r-- | macosx/HBAudioController.m | 5 | ||||
-rw-r--r-- | macosx/HBAudioDefaultsController.m | 15 | ||||
-rw-r--r-- | macosx/HBAudioTrackPreset.m | 8 | ||||
-rw-r--r-- | macosx/HBSubtitles.m | 10 | ||||
-rw-r--r-- | macosx/HBSubtitlesController.m | 5 | ||||
-rw-r--r-- | macosx/HBSubtitlesDefaultsController.m | 15 |
9 files changed, 101 insertions, 52 deletions
diff --git a/macosx/English.lproj/AudioDefaults.xib b/macosx/English.lproj/AudioDefaults.xib index 0a736de80..ef48ea516 100644 --- a/macosx/English.lproj/AudioDefaults.xib +++ b/macosx/English.lproj/AudioDefaults.xib @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9059" systemVersion="15C27e" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> <dependencies> <deployment identifier="macosx"/> <development version="6300" identifier="xcode"/> @@ -156,10 +156,10 @@ </connections> </button> <button verticalHuggingPriority="750" id="sC2-52-liU"> - <rect key="frame" x="744" y="14" width="54" height="28"/> + <rect key="frame" x="718" y="14" width="80" height="28"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/> <animations/> - <buttonCell key="cell" type="push" title="Done" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="kDe-1L-VkD"> + <buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="kDe-1L-VkD"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> <string key="keyEquivalent" base64-UTF8="YES"> @@ -167,7 +167,7 @@ DQ </string> </buttonCell> <connections> - <action selector="done:" target="-2" id="Rdg-PN-7l6"/> + <action selector="ok:" target="-2" id="pNO-TU-osz"/> <outlet property="nextKeyView" destination="oiD-QI-wly" id="1gO-sY-HNE"/> </connections> </button> @@ -488,7 +488,6 @@ DQ <menu key="menu" id="xhO-vr-WJF"/> </popUpButtonCell> <connections> - <binding destination="5No-Mm-bpD" name="content" keyPath="objectValue.sampleRates" id="adb-9q-L5r"/> <binding destination="5No-Mm-bpD" name="enabled" keyPath="objectValue.mixdownEnabled" id="E9O-S2-Uq8"/> <binding destination="5No-Mm-bpD" name="selectedValue" keyPath="objectValue.sampleRate" previousBinding="adb-9q-L5r" id="DxT-bF-prJ"> <dictionary key="options"> @@ -496,6 +495,7 @@ DQ <string key="NSValueTransformerName">HBSampleRateTransformer</string> </dictionary> </binding> + <binding destination="5No-Mm-bpD" name="content" keyPath="objectValue.sampleRates" id="adb-9q-L5r"/> </connections> </popUpButton> </subviews> @@ -530,13 +530,13 @@ DQ <menu key="menu" id="pWk-70-S7v"/> </popUpButtonCell> <connections> - <binding destination="Bxd-gI-dFS" name="content" keyPath="objectValue.bitRates" id="aT6-o7-lFG"/> - <binding destination="Bxd-gI-dFS" name="enabled" keyPath="objectValue.bitrateEnabled" id="paa-Sa-JU9"/> <binding destination="Bxd-gI-dFS" name="selectedValue" keyPath="objectValue.bitRate" previousBinding="aT6-o7-lFG" id="CSr-pu-s9O"> <dictionary key="options"> <string key="NSValueTransformerName">HBIntegerTransformer</string> </dictionary> </binding> + <binding destination="Bxd-gI-dFS" name="content" keyPath="objectValue.bitRates" id="aT6-o7-lFG"/> + <binding destination="Bxd-gI-dFS" name="enabled" keyPath="objectValue.bitrateEnabled" id="paa-Sa-JU9"/> </connections> </popUpButton> </subviews> @@ -677,13 +677,28 @@ DQ <binding destination="-2" name="value" keyPath="self.settings.secondaryEncoderMode" id="Umc-CV-pJy"/> </connections> </button> + <button verticalHuggingPriority="750" id="kJY-av-BYf"> + <rect key="frame" x="640" y="14" width="80" height="28"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> + <animations/> + <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Jn4-1L-J1g"> + <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> + <font key="font" metaFont="smallSystem"/> + <string key="keyEquivalent" base64-UTF8="YES"> +Gw +</string> + </buttonCell> + <connections> + <action selector="cancel:" target="-2" id="Vkr-zh-YAJ"/> + </connections> + </button> </subviews> <animations/> </view> <connections> <outlet property="initialFirstResponder" destination="oiD-QI-wly" id="Vxi-xi-P0d"/> </connections> - <point key="canvasLocation" x="-205.5" y="81"/> + <point key="canvasLocation" x="187.5" y="96"/> </window> <arrayController objectClassName="HBLang" id="ZBe-aP-wvq" userLabel="Languages Table Controller" customClass="HBLanguageArrayController"> <declaredKeys> diff --git a/macosx/English.lproj/SubtitlesDefaults.xib b/macosx/English.lproj/SubtitlesDefaults.xib index 8a7799330..b814e094b 100644 --- a/macosx/English.lproj/SubtitlesDefaults.xib +++ b/macosx/English.lproj/SubtitlesDefaults.xib @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="8164.2" systemVersion="15A225f" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9059" systemVersion="15C27e" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> <dependencies> <deployment identifier="macosx"/> <development version="6300" identifier="xcode"/> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="8164.2"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9059"/> </dependencies> <objects> <customObject id="-2" userLabel="File's Owner" customClass="HBSubtitlesDefaultsController"> @@ -18,16 +18,16 @@ <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="kwM-lz-5lG"> <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/> <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> - <rect key="contentRect" x="283" y="305" width="427" height="409"/> + <rect key="contentRect" x="283" y="305" width="427" height="421"/> <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1418"/> <value key="minSize" type="size" width="427" height="304"/> <value key="maxSize" type="size" width="427" height="1000"/> <view key="contentView" id="ZP2-Cp-K5w"> - <rect key="frame" x="0.0" y="0.0" width="427" height="409"/> + <rect key="frame" x="0.0" y="0.0" width="427" height="421"/> <autoresizingMask key="autoresizingMask"/> <subviews> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="fPg-3n-1TN"> - <rect key="frame" x="-2" y="373" width="157" height="14"/> + <rect key="frame" x="-2" y="385" width="157" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <animations/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Track Selection Behavior:" id="GbM-vm-RC2"> @@ -37,7 +37,7 @@ </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="Jsz-Er-bsF"> - <rect key="frame" x="-2" y="349" width="157" height="14"/> + <rect key="frame" x="-2" y="361" width="157" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <animations/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Languages:" id="mAT-Jp-SG1"> @@ -47,7 +47,7 @@ </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="Hqz-Lw-gAu"> - <rect key="frame" x="-2" y="171" width="157" height="14"/> + <rect key="frame" x="-2" y="183" width="157" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <animations/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Options:" id="NJl-q3-zXL"> @@ -57,7 +57,7 @@ </textFieldCell> </textField> <popUpButton verticalHuggingPriority="750" id="oiD-QI-wly"> - <rect key="frame" x="158" y="368" width="252" height="22"/> + <rect key="frame" x="158" y="380" width="252" height="22"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <animations/> <popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="mvw-Hg-JFM" id="21e-KY-8TR"> @@ -77,7 +77,7 @@ </connections> </popUpButton> <button toolTip="Closed captions are text subtitles that can be added to any container as a soft subtitle track (not burned)." id="uF5-6E-EIe"> - <rect key="frame" x="158" y="168" width="251" height="18"/> + <rect key="frame" x="158" y="180" width="251" height="18"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <animations/> <buttonCell key="cell" type="check" title="Add Closed Captions when available" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="66v-2g-DHn"> @@ -89,7 +89,7 @@ </connections> </button> <button toolTip="This search pass finds short sequences of foreign audio and provides subtitles for them." id="OOC-GZ-OFA"> - <rect key="frame" x="158" y="150" width="251" height="18"/> + <rect key="frame" x="158" y="162" width="251" height="18"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <animations/> <buttonCell key="cell" type="check" title="Add "Foreign Audio Search"" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="vNY-OC-hTJ"> @@ -101,7 +101,7 @@ </connections> </button> <scrollView autohidesScrollers="YES" horizontalLineScroll="16" horizontalPageScroll="10" verticalLineScroll="16" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="aTC-39-h6S"> - <rect key="frame" x="161" y="228" width="246" height="135"/> + <rect key="frame" x="161" y="240" width="246" height="135"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <clipView key="contentView" id="TdE-Sh-NcS"> <rect key="frame" x="1" y="1" width="244" height="133"/> @@ -158,18 +158,18 @@ <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> </clipView> <animations/> - <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="bXf-U5-ogz"> + <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="bXf-U5-ogz"> <rect key="frame" x="1" y="118" width="244" height="16"/> <autoresizingMask key="autoresizingMask"/> <animations/> </scroller> - <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="BWM-rq-VTg"> + <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="BWM-rq-VTg"> <autoresizingMask key="autoresizingMask"/> <animations/> </scroller> </scrollView> <button verticalHuggingPriority="750" id="QAt-5X-NBT"> - <rect key="frame" x="161" y="198" width="71" height="23"/> + <rect key="frame" x="161" y="210" width="71" height="23"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <animations/> <buttonCell key="cell" type="smallSquare" title="Show All" bezelStyle="smallSquare" imagePosition="overlaps" alignment="center" controlSize="small" borderStyle="border" inset="3" id="PiQ-bA-7P1"> @@ -182,7 +182,7 @@ </connections> </button> <popUpButton verticalHuggingPriority="750" id="Lsa-kB-2BP"> - <rect key="frame" x="158" y="117" width="252" height="22"/> + <rect key="frame" x="158" y="129" width="252" height="22"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <string key="toolTip">Set the behavior of subtitle "Burn-in" @@ -207,7 +207,7 @@ Only one subtitle track can be burned. Since conflics can occur, the first chose </connections> </popUpButton> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="qAf-lQ-GN4"> - <rect key="frame" x="-2" y="122" width="157" height="14"/> + <rect key="frame" x="-2" y="134" width="157" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <animations/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Burn-In Behavior:" id="640-NB-Uby"> @@ -217,7 +217,7 @@ Only one subtitle track can be burned. Since conflics can occur, the first chose </textFieldCell> </textField> <button id="ceZ-On-t5S"> - <rect key="frame" x="158" y="97" width="96" height="18"/> + <rect key="frame" x="158" y="109" width="96" height="18"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <string key="toolTip">Burn the first selected DVD subtitle track. All other DVD subtitle tracks will be discarded. Use this option if your player software or device does not support DVD Subtitles. @@ -232,7 +232,7 @@ Only one subtitle track can be burned. Since conflics can occur, the first chose </connections> </button> <button id="Px8-G6-NVX"> - <rect key="frame" x="158" y="79" width="110" height="18"/> + <rect key="frame" x="158" y="91" width="110" height="18"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <string key="toolTip">Burn the first selected Blu-ray subtitle track. All other Blu-ray subtitle tracks will be discarded. Use this option if your player software or device does not support Blu-ray Subtitles. @@ -247,7 +247,7 @@ Only one subtitle track can be burned. Since conflics can occur, the first chose </connections> </button> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="MlS-tB-pEv"> - <rect key="frame" x="159" y="46" width="250" height="28"/> + <rect key="frame" x="159" y="58" width="250" height="28"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <animations/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Only one of the above subtitle burn options will be applied, starting with the top." id="N4s-K9-RwM"> @@ -256,11 +256,11 @@ Only one subtitle track can be burned. Since conflics can occur, the first chose <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> - <button verticalHuggingPriority="750" id="sC2-52-liU"> - <rect key="frame" x="363" y="14" width="54" height="28"/> + <button verticalHuggingPriority="750" id="QdJ-64-GgC"> + <rect key="frame" x="332" y="14" width="80" height="28"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/> <animations/> - <buttonCell key="cell" type="push" title="Done" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="kDe-1L-VkD"> + <buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="iLI-Nb-D7t"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> <string key="keyEquivalent" base64-UTF8="YES"> @@ -268,13 +268,28 @@ DQ </string> </buttonCell> <connections> - <action selector="done:" target="-2" id="Rdg-PN-7l6"/> + <action selector="ok:" target="-2" id="MND-2r-dHh"/> + </connections> + </button> + <button verticalHuggingPriority="750" id="AAX-DK-L3G"> + <rect key="frame" x="254" y="14" width="80" height="28"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> + <animations/> + <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ego-rt-a64"> + <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> + <font key="font" metaFont="smallSystem"/> + <string key="keyEquivalent" base64-UTF8="YES"> +Gw +</string> + </buttonCell> + <connections> + <action selector="cancel:" target="-2" id="Ysh-pi-YX2"/> </connections> </button> </subviews> <animations/> </view> - <point key="canvasLocation" x="302.5" y="103.5"/> + <point key="canvasLocation" x="499.5" y="160.5"/> </window> <arrayController objectClassName="HBLang" id="ZBe-aP-wvq" userLabel="Table Controller" customClass="HBLanguageArrayController"> <declaredKeys> diff --git a/macosx/HBAudio.m b/macosx/HBAudio.m index f1b6ce854..8f8872777 100644 --- a/macosx/HBAudio.m +++ b/macosx/HBAudio.m @@ -355,6 +355,7 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; [[self.undo prepareWithInvocationTarget:self] setDefaults:_defaults]; } _defaults = defaults; + _defaults.undo = self.undo; } - (void)mixdownChanged diff --git a/macosx/HBAudioController.m b/macosx/HBAudioController.m index 5baf50a06..f3d49767d 100644 --- a/macosx/HBAudioController.m +++ b/macosx/HBAudioController.m @@ -57,11 +57,8 @@ { HBAudioDefaults *defaults = (HBAudioDefaults *)CFBridgingRelease(contextInfo); - // If things changed, do this ugly - // operation to group the changes for the undo manager. - if (returnCode) + if (returnCode == NSModalResponseOK) { - defaults.undo = self.audio.defaults.undo; self.audio.defaults = defaults; } self.defaultsController = nil; diff --git a/macosx/HBAudioDefaultsController.m b/macosx/HBAudioDefaultsController.m index cc90879de..7f8db2009 100644 --- a/macosx/HBAudioDefaultsController.m +++ b/macosx/HBAudioDefaultsController.m @@ -83,14 +83,17 @@ static void *HBAudioDefaultsContext = &HBAudioDefaultsContext; } } -- (IBAction)done:(id)sender +- (IBAction)ok:(id)sender { + self.settings.trackSelectionLanguages = [self.languagesList.selectedLanguages mutableCopy]; [self.window orderOut:nil]; - if (self.window.undoManager.canUndo) - { - self.settings.trackSelectionLanguages = [self.languagesList.selectedLanguages mutableCopy]; - } - [NSApp endSheet:self.window returnCode:self.window.undoManager.canUndo]; + [NSApp endSheet:self.window returnCode:NSModalResponseOK]; +} + +- (IBAction)cancel:(id)sender +{ + [self.window orderOut:nil]; + [NSApp endSheet:self.window returnCode:NSModalResponseCancel]; } - (void)dealloc diff --git a/macosx/HBAudioTrackPreset.m b/macosx/HBAudioTrackPreset.m index 1cd900969..5ce04258f 100644 --- a/macosx/HBAudioTrackPreset.m +++ b/macosx/HBAudioTrackPreset.m @@ -302,6 +302,14 @@ static void *HBAudioEncoderContex = &HBAudioEncoderContex; { retval = [NSSet setWithObjects:@"encoder", nil]; } + else if ([key isEqualToString:@"mixdowns"]) + { + retval = [NSSet setWithObjects:@"encoder", nil]; + } + else if ([key isEqualToString:@"bitRates"]) + { + retval = [NSSet setWithObjects:@"encoder", @"mixdown", @"sampleRate", nil]; + } return retval; } diff --git a/macosx/HBSubtitles.m b/macosx/HBSubtitles.m index a61002dcc..1c9b401ff 100644 --- a/macosx/HBSubtitles.m +++ b/macosx/HBSubtitles.m @@ -240,6 +240,16 @@ extern NSString *keySubTrackSrtFileURL; self.defaults.undo = undo; } +- (void)setDefaults:(HBSubtitlesDefaults *)defaults +{ + if (defaults != _defaults) + { + [[self.undo prepareWithInvocationTarget:self] setDefaults:_defaults]; + } + _defaults = defaults; + _defaults.undo = self.undo; +} + /** * Convenience method to add a track to subtitlesArray. * diff --git a/macosx/HBSubtitlesController.m b/macosx/HBSubtitlesController.m index 99c0ac998..3cd47e215 100644 --- a/macosx/HBSubtitlesController.m +++ b/macosx/HBSubtitlesController.m @@ -73,11 +73,8 @@ { HBSubtitlesDefaults *defaults = (HBSubtitlesDefaults *)CFBridgingRelease(contextInfo); - // If things changed, do this ugly - // operation to group the changes for the undo manager. - if (returnCode) + if (returnCode == NSModalResponseOK) { - defaults.undo = self.subtitles.defaults.undo; self.subtitles.defaults = defaults; } self.defaultsController = nil; diff --git a/macosx/HBSubtitlesDefaultsController.m b/macosx/HBSubtitlesDefaultsController.m index a78a14b48..a4e71bbff 100644 --- a/macosx/HBSubtitlesDefaultsController.m +++ b/macosx/HBSubtitlesDefaultsController.m @@ -64,14 +64,17 @@ static void *HBSubtitlesDefaultsContext = &HBSubtitlesDefaultsContext; self.tableController.showSelectedOnly = !self.tableController.showSelectedOnly; } -- (IBAction)done:(id)sender +- (IBAction)ok:(id)sender { + self.settings.trackSelectionLanguages = [self.languagesList.selectedLanguages mutableCopy]; [self.window orderOut:nil]; - if (self.window.undoManager.canUndo) - { - self.settings.trackSelectionLanguages = [self.languagesList.selectedLanguages mutableCopy]; - } - [NSApp endSheet:self.window returnCode:self.window.undoManager.canUndo]; + [NSApp endSheet:self.window returnCode:NSModalResponseOK]; +} + +- (IBAction)cancel:(id)sender +{ + [self.window orderOut:nil]; + [NSApp endSheet:self.window returnCode:NSModalResponseCancel]; } - (void)dealloc |