diff options
-rw-r--r-- | macosx/English.lproj/MainWindow.xib | 73 | ||||
-rw-r--r-- | macosx/HBController.m | 57 | ||||
-rw-r--r-- | macosx/HBFocusRingView.h | 14 | ||||
-rw-r--r-- | macosx/HBFocusRingView.m | 32 | ||||
-rw-r--r-- | macosx/HBTabView.h | 14 | ||||
-rw-r--r-- | macosx/HBTabView.m | 27 | ||||
-rw-r--r-- | macosx/HandBrake.xcodeproj/project.pbxproj | 12 |
7 files changed, 143 insertions, 86 deletions
diff --git a/macosx/English.lproj/MainWindow.xib b/macosx/English.lproj/MainWindow.xib index 556e9a32e..666a160f0 100644 --- a/macosx/English.lproj/MainWindow.xib +++ b/macosx/English.lproj/MainWindow.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="9060" systemVersion="15C48a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> <dependencies> <deployment identifier="macosx"/> <development version="7000" identifier="xcode"/> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9060"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9531"/> </dependencies> <objects> <customObject id="-2" userLabel="File's Owner" customClass="HBController"> @@ -36,19 +36,18 @@ <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> <customObject id="-3" userLabel="Application" customClass="NSObject"/> <window title="HandBrake" allowsToolTipsWhenApplicationIsInactive="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="HBMainWindow" animationBehavior="default" id="21" userLabel="MainWindow"> - <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" unifiedTitleAndToolbar="YES"/> + <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" unifiedTitleAndToolbar="YES"/> <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> <rect key="contentRect" x="41" y="572" width="920" height="568"/> <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1178"/> <value key="minSize" type="size" width="920" height="568"/> - <view key="contentView" id="2"> + <view key="contentView" id="2" customClass="HBFocusRingView"> <rect key="frame" x="0.0" y="0.0" width="920" height="568"/> <autoresizingMask key="autoresizingMask"/> <subviews> <textField verticalHuggingPriority="750" id="1123"> <rect key="frame" x="18" y="2" width="711" height="28"/> <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" id="4846"> <font key="font" metaFont="smallSystem"/> <string key="title">DO NOT TRANSLATE THIS NIB FILE, @@ -60,61 +59,55 @@ <progressIndicator wantsLayer="YES" verticalHuggingPriority="750" maxValue="1" bezeled="NO" style="bar" id="1373"> <rect key="frame" x="18" y="-26" width="884" height="20"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <animations/> </progressIndicator> - <tabView controlSize="small" initialItem="1477" id="1474"> + <tabView controlSize="small" initialItem="1477" id="1474" customClass="HBTabView"> <rect key="frame" x="13" y="27" width="894" height="357"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <animations/> <tabViewItems> <tabViewItem label="Video" identifier="1" id="1477"> <view key="view" id="1478"> <rect key="frame" x="10" y="25" width="874" height="319"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <animations/> </view> </tabViewItem> - <tabViewItem label="Picture" identifier="" id="eij-Sn-QmJ" userLabel="PictureTab"> + <tabViewItem label="Picture" identifier="2" id="eij-Sn-QmJ" userLabel="PictureTab"> <view key="view" id="nvx-9b-6fF"> <rect key="frame" x="10" y="25" width="874" height="319"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <animations/> </view> </tabViewItem> - <tabViewItem label="Audio" identifier="2" id="1475"> + <tabViewItem label="Audio" identifier="3" id="1475"> <view key="view" id="1476"> <rect key="frame" x="10" y="25" width="874" height="319"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <animations/> </view> </tabViewItem> - <tabViewItem label="Subtitles" identifier="3" id="5194"> + <tabViewItem label="Subtitles" identifier="4" id="5194"> <view key="view" id="5195"> <rect key="frame" x="10" y="25" width="874" height="319"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <animations/> </view> </tabViewItem> - <tabViewItem label="Advanced" identifier="5" id="2015"> - <view key="view" id="2016"> + <tabViewItem label="Chapters" identifier="5" id="1989"> + <view key="view" id="1990"> <rect key="frame" x="10" y="25" width="874" height="319"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <animations/> </view> </tabViewItem> - <tabViewItem label="Chapters" identifier="4" id="1989"> - <view key="view" id="1990"> + <tabViewItem label="Advanced" identifier="6" id="2015"> + <view key="view" id="2016"> <rect key="frame" x="10" y="25" width="874" height="319"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <animations/> </view> </tabViewItem> </tabViewItems> + <connections> + <outlet property="dropDelegate" destination="-2" id="PXr-K3-L2R"/> + </connections> </tabView> <textField verticalHuggingPriority="750" id="1538"> <rect key="frame" x="20" y="540" width="54" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="Source:" id="4905"> <font key="font" metaFont="smallSystemBold"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -124,7 +117,6 @@ <textField verticalHuggingPriority="750" id="1540"> <rect key="frame" x="17" y="511" width="35" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Title:" id="4907"> <font key="font" metaFont="smallSystem"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -137,7 +129,6 @@ <popUpButton verticalHuggingPriority="750" id="5513"> <rect key="frame" x="503" y="506" width="84" height="22"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" id="5514"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -157,7 +148,6 @@ <textField verticalHuggingPriority="750" id="5180"> <rect key="frame" x="401" y="511" width="46" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Angle:" id="5185"> <font key="font" metaFont="smallSystem"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -175,7 +165,6 @@ <textField verticalHuggingPriority="750" id="1552"> <rect key="frame" x="5" y="454" width="47" height="17"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="File:" id="4913"> <font key="font" metaFont="smallSystem"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -188,7 +177,6 @@ <textField verticalHuggingPriority="750" id="1553"> <rect key="frame" x="780" y="511" width="65" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Duration:" id="4914"> <font key="font" metaFont="smallSystem"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -205,7 +193,6 @@ <textField verticalHuggingPriority="750" id="1554"> <rect key="frame" x="842" y="511" width="60" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" selectable="YES" sendsActionOnEndEditing="YES" alignment="right" title="00:00:00" id="4915"> <font key="font" metaFont="smallSystem"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -224,7 +211,6 @@ <textField verticalHuggingPriority="750" id="1555"> <rect key="frame" x="20" y="486" width="70" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="Destination" id="4916"> <font key="font" metaFont="smallSystemBold"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -234,7 +220,6 @@ <popUpButton toolTip="Format to mux encoded tracks to." verticalHuggingPriority="750" id="1557"> <rect key="frame" x="76" y="398" width="177" height="22"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="1559" id="4918"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -262,7 +247,6 @@ <button toolTip="Select the destination for your encode." verticalHuggingPriority="750" id="1562"> <rect key="frame" x="815" y="450" width="90" height="28"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <buttonCell key="cell" type="push" title="Browse…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="4920"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -280,7 +264,6 @@ <box verticalHuggingPriority="750" title="Box" boxType="separator" titlePosition="noTitle" id="1623"> <rect key="frame" x="98" y="490" width="802" height="5"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <animations/> <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/> <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> <font key="titleFont" metaFont="system"/> @@ -288,7 +271,6 @@ <textField verticalHuggingPriority="750" id="1539"> <rect key="frame" x="70" y="540" width="310" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMinY="YES" heightSizable="YES"/> - <animations/> <textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingMiddle" selectable="YES" sendsActionOnEndEditing="YES" alignment="left" id="4906"> <font key="font" metaFont="smallSystem"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -298,7 +280,6 @@ <textField toolTip="Destination directory and filename for your encode." verticalHuggingPriority="750" id="1561"> <rect key="frame" x="56" y="455" width="756" height="19"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" continuous="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="4919"> <font key="font" metaFont="smallSystem"/> <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/> @@ -322,7 +303,6 @@ <textField hidden="YES" toolTip="Set the first second to encode." verticalHuggingPriority="750" id="5491"> <rect key="frame" x="592" y="492" width="54" height="19"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="right" drawsBackground="YES" id="5492"> <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" minimumIntegerDigits="0" maximumIntegerDigits="42" id="Fdv-uE-tUA"> <real key="minimum" value="0.0"/> @@ -348,7 +328,6 @@ <textField hidden="YES" toolTip="Set the first frame to encode." verticalHuggingPriority="750" id="5521"> <rect key="frame" x="649" y="492" width="54" height="19"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="right" drawsBackground="YES" id="5522"> <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" minimumIntegerDigits="0" maximumIntegerDigits="42" id="Wpt-92-R1O"> <real key="minimum" value="0.0"/> @@ -374,7 +353,6 @@ <textField hidden="YES" toolTip="Set the last second to encode." verticalHuggingPriority="750" id="5493"> <rect key="frame" x="707" y="492" width="54" height="19"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="5494"> <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" minimumIntegerDigits="0" maximumIntegerDigits="42" id="tD5-HN-B7h"> <real key="minimum" value="0.0"/> @@ -400,7 +378,6 @@ <textField hidden="YES" toolTip="Set the last frame to encode." verticalHuggingPriority="750" id="5523"> <rect key="frame" x="769" y="492" width="54" height="19"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="5524"> <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" minimumIntegerDigits="0" maximumIntegerDigits="42" id="WrK-kN-ZN0"> <real key="minimum" value="0.0"/> @@ -426,7 +403,6 @@ <textField verticalHuggingPriority="750" id="1627"> <rect key="frame" x="20" y="430" width="97" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="Output Settings:" id="4923"> <font key="font" metaFont="smallSystemBold"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -436,7 +412,6 @@ <box verticalHuggingPriority="750" title="Box" boxType="separator" titlePosition="noTitle" id="1628"> <rect key="frame" x="292" y="434" width="608" height="5"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <animations/> <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/> <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> <font key="titleFont" metaFont="system"/> @@ -444,7 +419,6 @@ <textField verticalHuggingPriority="750" id="1882"> <rect key="frame" x="121" y="430" width="165" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" sendsActionOnEndEditing="YES" id="4924"> <font key="font" metaFont="smallSystemBold"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -457,7 +431,6 @@ <textField verticalHuggingPriority="750" id="2006"> <rect key="frame" x="685" y="15" width="218" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" id="4925"> <font key="font" metaFont="smallSystem"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -467,7 +440,6 @@ <textField verticalHuggingPriority="750" id="1556"> <rect key="frame" x="21" y="403" width="53" height="14"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Format:" id="4917"> <font key="font" metaFont="smallSystem"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -480,7 +452,6 @@ <box verticalHuggingPriority="750" title="Box" boxType="separator" titlePosition="noTitle" id="3205"> <rect key="frame" x="391" y="543" width="509" height="5"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/> <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> <font key="titleFont" metaFont="system"/> @@ -488,13 +459,11 @@ <progressIndicator hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" maxValue="1" bezeled="NO" controlSize="small" style="bar" id="3203"> <rect key="frame" x="391" y="542" width="510" height="12"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> </progressIndicator> <button id="4579"> <rect key="frame" x="269" y="401" width="102" height="18"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <string key="toolTip">Optimize the layout of the MP4 file for progressive download. This allows a player to initiate playback before downloading the entire file.</string> - <animations/> <buttonCell key="cell" type="check" title="Web optimized" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="4927"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <font key="font" metaFont="smallSystem"/> @@ -511,7 +480,6 @@ <button toolTip="This option adds an atom to the MP4 file which allows older iPods (5th Generation classic style) to play the file." id="4967"> <rect key="frame" x="388" y="401" width="126" height="18"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <buttonCell key="cell" type="check" title="iPod 5G support" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="4968"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <font key="font" metaFont="smallSystem"/> @@ -528,7 +496,6 @@ <textField verticalHuggingPriority="750" id="5505"> <rect key="frame" x="648" y="510" width="56" height="15"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="through" id="5506"> <font key="font" metaFont="smallSystem"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -545,7 +512,6 @@ <popUpButton toolTip="Set the first chapter to encode." verticalHuggingPriority="750" id="1545"> <rect key="frame" x="589" y="506" width="60" height="22"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="1547" id="4910"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -569,7 +535,6 @@ <popUpButton toolTip="Set the last chapter to encode." verticalHuggingPriority="750" id="1548"> <rect key="frame" x="704" y="506" width="60" height="22"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="1550" id="4911"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -593,7 +558,6 @@ <popUpButton toolTip="For multi-angle DVDs and BDs, select the desired angle to encode." verticalHuggingPriority="750" id="5181"> <rect key="frame" x="450" y="506" width="44" height="22"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/> - <animations/> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="5184" id="5182"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -629,7 +593,6 @@ IA <popUpButton toolTip="Set the title to encode. By default the longest title is chosen. This is often the feature title of a DVD or Blu-Ray." verticalHuggingPriority="750" id="1541"> <rect key="frame" x="53" y="506" width="319" height="22"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <animations/> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" id="4908"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -646,7 +609,6 @@ IA </connections> </popUpButton> </subviews> - <animations/> </view> <toolbar key="toolbar" implicitIdentifier="E92CA47A-01F7-432A-A61C-28FE4D58C2CD" explicitIdentifier="HBMainWindowToolbar" displayMode="iconAndLabel" sizeMode="regular" id="7g3-gy-bUl"> <allowedToolbarItems> @@ -710,7 +672,7 @@ IA <connections> <outlet property="delegate" destination="-2" id="M3v-Rc-7Ca"/> </connections> - <point key="canvasLocation" x="879" y="65"/> + <point key="canvasLocation" x="1113" y="13"/> </window> <drawer trailingOffset="15" id="1841" userLabel="PresetsDrawer"> <size key="contentSize" width="240" height="550"/> @@ -729,7 +691,6 @@ IA <button id="DN4-48-aOI"> <rect key="frame" x="28" y="9" width="114" height="18"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <buttonCell key="cell" type="check" title="Scan only title:" bezelStyle="regularSquare" imagePosition="left" inset="2" id="eQA-t2-FcV"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <font key="font" metaFont="system"/> @@ -741,7 +702,6 @@ IA <textField verticalHuggingPriority="750" id="3w9-Iu-3u2"> <rect key="frame" x="148" y="7" width="50" height="22"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <animations/> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" title="0" drawsBackground="YES" id="6E4-AG-PEh"> <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" minimumIntegerDigits="0" maximumIntegerDigits="42" id="V1R-X1-vLz"> <real key="minimum" value="0.0"/> @@ -762,7 +722,6 @@ IA </connections> </textField> </subviews> - <animations/> <point key="canvasLocation" x="458.5" y="-571"/> </customView> </objects> diff --git a/macosx/HBController.m b/macosx/HBController.m index df2b90863..a0a72a941 100644 --- a/macosx/HBController.m +++ b/macosx/HBController.m @@ -5,6 +5,7 @@ It may be used under the terms of the GNU General Public License. */ #import "HBController.h" +#import "HBFocusRingView.h" #import "HBQueueController.h" #import "HBTitleSelectionController.h" @@ -32,7 +33,7 @@ #import "HBJob.h" #import "HBStateFormatter.h" -@interface HBController () <HBPresetsViewControllerDelegate, HBTitleSelectionDelegate, NSDrawerDelegate> +@interface HBController () <HBPresetsViewControllerDelegate, HBTitleSelectionDelegate, NSDrawerDelegate, NSDraggingDestination> { IBOutlet NSTabView *fMainTabView; @@ -246,56 +247,54 @@ #pragma mark - #pragma mark Drag & drop handling -/** This method is used by OSX to know what kind of files can be drag & drop on the NSWindow - * We only want filenames (and so folders too) - */ -- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender +- (nullable NSArray<NSURL *> *)fileURLsFromPasteboard:(NSPasteboard *)pasteboard { - NSPasteboard *pboard = [sender draggingPasteboard]; - - if ([[pboard types] containsObject:NSFilenamesPboardType]) - { - NSArray *paths = [pboard propertyListForType:NSFilenamesPboardType]; - return paths.count == 1 ? NSDragOperationGeneric : NSDragOperationNone; - } + NSDictionary *options = @{NSPasteboardURLReadingFileURLsOnlyKey: @YES}; + return [pasteboard readObjectsForClasses:@[[NSURL class]] options:options]; +} - return NSDragOperationNone; +- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender +{ + NSArray<NSURL *> *fileURLs = [self fileURLsFromPasteboard:[sender draggingPasteboard]]; + [self.window.contentView setShowFocusRing:YES]; + return fileURLs.count ? NSDragOperationGeneric : NSDragOperationNone; } -// This method is doing the job after the drag & drop operation has been validated by [self draggingEntered] and OSX - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender { - NSPasteboard *pboard = [sender draggingPasteboard]; + NSArray<NSURL *> *fileURLs = [self fileURLsFromPasteboard:[sender draggingPasteboard]]; - if ([pboard.types containsObject:NSFilenamesPboardType]) + if (fileURLs.count) { - NSArray *paths = [pboard propertyListForType:NSFilenamesPboardType]; - [self openURL:[NSURL fileURLWithPath:paths.firstObject]]; + [self openURL:fileURLs.firstObject]; } + [self.window.contentView setShowFocusRing:NO]; return YES; } +- (void)draggingExited:(nullable id <NSDraggingInfo>)sender +{ + [self.window.contentView setShowFocusRing:NO]; +} + #pragma mark - KVO - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - if (context == NULL) + if ([keyPath isEqualToString:@"values.HBShowAdvancedTab"]) { - if ([keyPath isEqualToString:@"values.HBShowAdvancedTab"]) + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HBShowAdvancedTab"]) { - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HBShowAdvancedTab"]) - { - if (![[fMainTabView tabViewItems] containsObject:fAdvancedTab]) - { - [fMainTabView insertTabViewItem:fAdvancedTab atIndex:3]; - } - } - else + if (![[fMainTabView tabViewItems] containsObject:fAdvancedTab]) { - [fMainTabView removeTabViewItem:fAdvancedTab]; + [fMainTabView insertTabViewItem:fAdvancedTab atIndex:5]; } } + else + { + [fMainTabView removeTabViewItem:fAdvancedTab]; + } } else { diff --git a/macosx/HBFocusRingView.h b/macosx/HBFocusRingView.h new file mode 100644 index 000000000..04cfec107 --- /dev/null +++ b/macosx/HBFocusRingView.h @@ -0,0 +1,14 @@ +/* HBFocusRingView + + This file is part of the HandBrake source code. + Homepage: <http://handbrake.fr/>. + It may be used under the terms of the GNU General Public License. + */ + +#import <Cocoa/Cocoa.h> + +@interface HBFocusRingView : NSView + +@property (nonatomic, readwrite) BOOL showFocusRing; + +@end diff --git a/macosx/HBFocusRingView.m b/macosx/HBFocusRingView.m new file mode 100644 index 000000000..6ff2412a7 --- /dev/null +++ b/macosx/HBFocusRingView.m @@ -0,0 +1,32 @@ +/* HBFocusRingView + + This file is part of the HandBrake source code. + Homepage: <http://handbrake.fr/>. + It may be used under the terms of the GNU General Public License. + */ + +#import "HBFocusRingView.h" + +@implementation HBFocusRingView + +- (void)drawRect:(NSRect)dirtyRect +{ + [super drawRect:dirtyRect]; + + if (self.showFocusRing) + { + [NSGraphicsContext saveGraphicsState]; + NSRect focusRect = NSInsetRect(self.bounds, 2, 2); + NSSetFocusRingStyle(NSFocusRingOnly); + NSRectFill(focusRect); + [NSGraphicsContext restoreGraphicsState]; + } +} + +- (void)setShowFocusRing:(BOOL)showFocusRing +{ + _showFocusRing = showFocusRing; + [self setNeedsDisplay:YES]; +} + +@end diff --git a/macosx/HBTabView.h b/macosx/HBTabView.h new file mode 100644 index 000000000..8efba02fe --- /dev/null +++ b/macosx/HBTabView.h @@ -0,0 +1,14 @@ +/* HBTabView + + This file is part of the HandBrake source code. + Homepage: <http://handbrake.fr/>. + It may be used under the terms of the GNU General Public License. + */ + +#import <Cocoa/Cocoa.h> + +@interface HBTabView : NSTabView + +@property (nullable, assign) IBOutlet id<NSDraggingDestination> dropDelegate; + +@end diff --git a/macosx/HBTabView.m b/macosx/HBTabView.m new file mode 100644 index 000000000..f0adc6544 --- /dev/null +++ b/macosx/HBTabView.m @@ -0,0 +1,27 @@ +/* HBTabView + + This file is part of the HandBrake source code. + Homepage: <http://handbrake.fr/>. + It may be used under the terms of the GNU General Public License. + */ + +#import "HBTabView.h" + +@implementation HBTabView + +-(NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender +{ + return [self.dropDelegate draggingEntered:sender]; +} + +- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender +{ + return [self.dropDelegate performDragOperation:sender]; +} + +- (void)draggingExited:(nullable id <NSDraggingInfo>)sender +{ + [self.dropDelegate draggingExited:sender]; +} + +@end diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index ec70d4e66..50ef850f3 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -186,6 +186,8 @@ A9CF25F11990D62C0023F727 /* Presets.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9CF25EF1990D62C0023F727 /* Presets.xib */; }; A9CF25F41990D64E0023F727 /* HBPreset.m in Sources */ = {isa = PBXBuildFile; fileRef = A9CF25F31990D64E0023F727 /* HBPreset.m */; }; A9CF25F71990D6820023F727 /* HBPresetsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9CF25F61990D6820023F727 /* HBPresetsViewController.m */; }; + A9D0FA771C1C284D0003F2A9 /* HBFocusRingView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9D0FA761C1C284D0003F2A9 /* HBFocusRingView.m */; }; + A9D0FA7A1C1C36820003F2A9 /* HBTabView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9D0FA791C1C36820003F2A9 /* HBTabView.m */; }; A9D1E41718262364002F6424 /* HBPreviewGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = A9D1E41618262364002F6424 /* HBPreviewGenerator.m */; }; A9D488A51996270300E9B1BA /* HBTreeNode.m in Sources */ = {isa = PBXBuildFile; fileRef = A9D488A41996270300E9B1BA /* HBTreeNode.m */; }; A9DC6C52196F04F6002AE6B4 /* HBSubtitlesController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9DC6C50196F04F6002AE6B4 /* HBSubtitlesController.m */; }; @@ -510,6 +512,10 @@ A9CF25F31990D64E0023F727 /* HBPreset.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBPreset.m; sourceTree = "<group>"; }; A9CF25F51990D6820023F727 /* HBPresetsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBPresetsViewController.h; sourceTree = "<group>"; }; A9CF25F61990D6820023F727 /* HBPresetsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBPresetsViewController.m; sourceTree = "<group>"; }; + A9D0FA751C1C284D0003F2A9 /* HBFocusRingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBFocusRingView.h; sourceTree = "<group>"; }; + A9D0FA761C1C284D0003F2A9 /* HBFocusRingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBFocusRingView.m; sourceTree = "<group>"; }; + A9D0FA781C1C36820003F2A9 /* HBTabView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBTabView.h; sourceTree = "<group>"; }; + A9D0FA791C1C36820003F2A9 /* HBTabView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBTabView.m; sourceTree = "<group>"; }; A9D1E41618262364002F6424 /* HBPreviewGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBPreviewGenerator.m; sourceTree = "<group>"; }; A9D488A31996270300E9B1BA /* HBTreeNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBTreeNode.h; sourceTree = "<group>"; }; A9D488A41996270300E9B1BA /* HBTreeNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBTreeNode.m; sourceTree = "<group>"; }; @@ -1195,6 +1201,10 @@ A9F7102519A475EC00F61301 /* HBDockTile.m */, 273F209914ADBE670021BE6D /* HBImageAndTextCell.h */, 273F209A14ADBE670021BE6D /* HBImageAndTextCell.m */, + A9D0FA751C1C284D0003F2A9 /* HBFocusRingView.h */, + A9D0FA761C1C284D0003F2A9 /* HBFocusRingView.m */, + A9D0FA781C1C36820003F2A9 /* HBTabView.h */, + A9D0FA791C1C36820003F2A9 /* HBTabView.m */, ); name = "UI Views"; sourceTree = "<group>"; @@ -1445,6 +1455,7 @@ A932E273198834130047D13E /* HBAudioDefaults.m in Sources */, A9706CB71AC1437800BAEAA8 /* HBExceptionAlertController.m in Sources */, A92268781A6E555500A8D5C5 /* HBAppDelegate.m in Sources */, + A9D0FA771C1C284D0003F2A9 /* HBFocusRingView.m in Sources */, A91806711A4807B000FC9BED /* HBRange.m in Sources */, A9DEC8771A23C88D00C79B48 /* HBVideo.m in Sources */, A9523937199A6AAE00588AEF /* HBFilters.m in Sources */, @@ -1466,6 +1477,7 @@ A93FD4751A62ABE800A6AC43 /* HBAudio.m in Sources */, A971281F1A2C75180088C076 /* HBTitle.m in Sources */, 273F20B514ADBE670021BE6D /* HBPreferencesController.m in Sources */, + A9D0FA7A1C1C36820003F2A9 /* HBTabView.m in Sources */, A9E66D701A67A2A8007B641D /* HBDistributedArray.m in Sources */, A99422E01B1887B000DDB077 /* NSJSONSerialization+HBAdditions.m in Sources */, A9DC6C52196F04F6002AE6B4 /* HBSubtitlesController.m in Sources */, |