diff options
author | Damiano Galassi <[email protected]> | 2016-07-21 10:44:27 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2016-07-21 10:44:27 +0200 |
commit | db9ae28991fe8b10ee624ded5a94509cf9fa7174 (patch) | |
tree | e8ab33f7c2c8d466f5de3899f94cb8523de7a271 /macosx | |
parent | 39d03522f7ea220bb277ce5842a98e6d49be7d11 (diff) |
MacGui: disable the 'forced' checkbox for subtitles track if forced is not supported.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/English.lproj/Subtitles.xib | 35 | ||||
-rw-r--r-- | macosx/HBSubtitlesTrack.h | 1 | ||||
-rw-r--r-- | macosx/HBSubtitlesTrack.m | 5 |
3 files changed, 11 insertions, 30 deletions
diff --git a/macosx/English.lproj/Subtitles.xib b/macosx/English.lproj/Subtitles.xib index dc4a11150..971b12558 100644 --- a/macosx/English.lproj/Subtitles.xib +++ b/macosx/English.lproj/Subtitles.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="9059" systemVersion="15B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11173.2" systemVersion="16A238m" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> <dependencies> <deployment identifier="macosx"/> - <development version="6300" identifier="xcode"/> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9059"/> + <development version="7000" identifier="xcode"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11173.2"/> </dependencies> <objects> <customObject id="-2" userLabel="File's Owner" customClass="HBSubtitlesController"> @@ -20,7 +20,6 @@ <popUpButton verticalHuggingPriority="750" id="2Tb-KC-Ugi"> <rect key="frame" x="17" y="291" width="88" height="22"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <popUpButtonCell key="cell" type="push" title="Track" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" pullsDown="YES" id="8ZD-D6-TLA"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -57,7 +56,6 @@ <button verticalHuggingPriority="750" id="QsM-28-Pya"> <rect key="frame" x="110" y="288" width="140" height="28"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <buttonCell key="cell" type="push" title="Configure Defaults…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="oxg-bs-1si"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -74,7 +72,6 @@ <button verticalHuggingPriority="750" id="Vxx-gk-9kY"> <rect key="frame" x="248" y="288" width="116" height="28"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <buttonCell key="cell" type="push" title="Reload Defaults" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="jG8-uo-1tv"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -98,7 +95,6 @@ <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="25" rowSizeStyle="automatic" headerView="IiW-3a-Drv" viewBased="YES" id="0yM-wE-D2x"> <rect key="frame" x="0.0" y="0.0" width="884" height="246"/> <autoresizingMask key="autoresizingMask"/> - <animations/> <size key="intercellSpacing" width="3" height="2"/> <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/> @@ -127,7 +123,6 @@ <popUpButton verticalHuggingPriority="750" id="Tf3-cP-TGw"> <rect key="frame" x="0.0" y="1" width="322" height="22"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <animations/> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="JWk-Ab-hdY"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -145,7 +140,6 @@ </connections> </popUpButton> </subviews> - <animations/> </tableCellView> </prototypeCellViews> </tableColumn> @@ -167,18 +161,16 @@ <button id="HC5-ql-Vcr"> <rect key="frame" x="26" y="3" width="23" height="20"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="SPR-9q-XBK"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <font key="font" metaFont="smallSystem"/> </buttonCell> <connections> <binding destination="zKg-by-KFV" name="value" keyPath="objectValue.forcedOnly" id="iFe-SC-lu3"/> - <binding destination="zKg-by-KFV" name="enabled" keyPath="objectValue.isEnabled" id="wpB-JZ-Upd"/> + <binding destination="zKg-by-KFV" name="enabled" keyPath="objectValue.isForcedSupported" id="7Gt-UF-Lwy"/> </connections> </button> </subviews> - <animations/> </tableCellView> </prototypeCellViews> </tableColumn> @@ -200,7 +192,6 @@ <button id="zpm-9Z-Hsq"> <rect key="frame" x="20" y="3" width="23" height="20"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="s2E-1o-mGs"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <font key="font" metaFont="smallSystem"/> @@ -215,7 +206,6 @@ </connections> </button> </subviews> - <animations/> </tableCellView> </prototypeCellViews> </tableColumn> @@ -237,7 +227,6 @@ <button id="mdO-Qu-3Pb"> <rect key="frame" x="14" y="4" width="22" height="18"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="kwl-qH-Dgo"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <font key="font" metaFont="smallSystem"/> @@ -248,7 +237,6 @@ </connections> </button> </subviews> - <animations/> </tableCellView> </prototypeCellViews> </tableColumn> @@ -276,7 +264,6 @@ <popUpButton verticalHuggingPriority="750" id="Inz-O5-B8g"> <rect key="frame" x="0.0" y="0.0" width="173" height="22"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <animations/> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="zIn-sc-xak"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -299,7 +286,6 @@ </connections> </popUpButton> </subviews> - <animations/> </tableCellView> </prototypeCellViews> </tableColumn> @@ -323,7 +309,6 @@ <popUpButton verticalHuggingPriority="750" id="QV0-kE-4yR"> <rect key="frame" x="0.0" y="0.0" width="113" height="22"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <animations/> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="jFr-2c-3Vv"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -342,7 +327,6 @@ </connections> </popUpButton> </subviews> - <animations/> </tableCellView> </prototypeCellViews> </tableColumn> @@ -366,7 +350,6 @@ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="aJi-zQ-0cg"> <rect key="frame" x="0.0" y="-3" width="64" height="14"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingTail" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" alignment="center" title="0" id="hhH-c3-gD0"> <numberFormatter key="formatter" formatterBehavior="default10_4" numberStyle="decimal" minimumIntegerDigits="1" maximumIntegerDigits="2000000000" maximumFractionDigits="3" id="Jui-oB-oVO"/> <font key="font" metaFont="smallSystem"/> @@ -383,7 +366,6 @@ </connections> </textField> </subviews> - <animations/> <connections> <outlet property="textField" destination="aJi-zQ-0cg" id="WSP-oS-jCs"/> </connections> @@ -402,27 +384,20 @@ </connections> </tableView> </subviews> - <animations/> - <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> </clipView> - <animations/> <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="toe-s0-pVk"> <rect key="frame" x="-100" y="-100" width="685" height="15"/> <autoresizingMask key="autoresizingMask"/> - <animations/> </scroller> <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="GfM-TU-Tmr"> <autoresizingMask key="autoresizingMask"/> - <animations/> </scroller> <tableHeaderView key="headerView" id="IiW-3a-Drv"> <rect key="frame" x="0.0" y="0.0" width="884" height="17"/> <autoresizingMask key="autoresizingMask"/> - <animations/> </tableHeaderView> </scrollView> </subviews> - <animations/> <point key="canvasLocation" x="521" y="-253"/> </customView> <arrayController objectClassName="HBSubtitlesTrack" id="ssY-jQ-Nev"> diff --git a/macosx/HBSubtitlesTrack.h b/macosx/HBSubtitlesTrack.h index d093a801b..d1eb1277e 100644 --- a/macosx/HBSubtitlesTrack.h +++ b/macosx/HBSubtitlesTrack.h @@ -71,6 +71,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly) BOOL isSrt; @property (nonatomic, readonly) BOOL isEnabled; +@property (nonatomic, readonly) BOOL isForcedSupported; @property (nonatomic, readonly) BOOL canPassthru; @end diff --git a/macosx/HBSubtitlesTrack.m b/macosx/HBSubtitlesTrack.m index cc5543643..c9dac3bdc 100644 --- a/macosx/HBSubtitlesTrack.m +++ b/macosx/HBSubtitlesTrack.m @@ -261,6 +261,11 @@ NSString *keySubTrackSrtFileURL = @"keySubTrackSrtFileURL"; return self.sourceTrackIdx != 0; } +- (BOOL)isForcedSupported +{ + return hb_subtitle_can_force(self.type) && self.isEnabled; +} + - (BOOL)canPassthru { return (BOOL)hb_subtitle_can_pass(self.type, self.container) && self.isEnabled; |