Un-xibless-ified DeletionOptions
parent
8495402a3b
commit
9de5a48b1f
@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12118"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="DeletionOptions">
|
||||
<connections>
|
||||
<outlet property="directButton" destination="35" id="47"/>
|
||||
<outlet property="hardlinkButton" destination="3" id="46"/>
|
||||
<outlet property="linkButton" destination="3" id="dBw-fr-16j"/>
|
||||
<outlet property="linkTypeRadio" destination="WGF-jA-3aM" id="Wz8-lZ-4Rx"/>
|
||||
<outlet property="messageTextField" destination="43" id="45"/>
|
||||
<outlet property="window" destination="1" id="52"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application"/>
|
||||
<window title="Deletion Options" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="1">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
|
||||
<rect key="contentRect" x="196" y="240" width="449" height="244"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1058"/>
|
||||
<view key="contentView" misplaced="YES" id="2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="449" height="244"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button imageHugsTitle="YES" id="3">
|
||||
<rect key="frame" x="18" y="183" width="413" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="check" title="Link deleted files" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="4">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="updateOptions:" target="-2" id="48"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="NO" id="7">
|
||||
<rect key="frame" x="38" y="149" width="394" height="28"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="After having deleted a duplicate, place a link targeting the reference file to replace the deleted file." id="8">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" id="43">
|
||||
<rect key="frame" x="17" y="207" width="415" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" id="44">
|
||||
<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>
|
||||
<matrix verticalHuggingPriority="750" misplaced="YES" allowsEmptySelection="NO" autosizesCells="NO" id="WGF-jA-3aM">
|
||||
<rect key="frame" x="39" y="121" width="179" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
<size key="cellSize" width="87" height="20"/>
|
||||
<size key="intercellSpacing" width="5" height="0.0"/>
|
||||
<buttonCell key="prototype" type="radio" title="Symlink" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="sre-at-gZp">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
</buttonCell>
|
||||
<cells>
|
||||
<column>
|
||||
<buttonCell type="radio" title="Symlink" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="pSh-MC-gqK">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<connections>
|
||||
<action selector="updateOptions:" target="-2" id="ZXE-vP-DRv"/>
|
||||
</connections>
|
||||
</buttonCell>
|
||||
</column>
|
||||
<column>
|
||||
<buttonCell type="radio" title="Hardlink" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="rd8-wX-h3t">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<connections>
|
||||
<action selector="updateOptions:" target="-2" id="9A2-ae-btZ"/>
|
||||
</connections>
|
||||
</buttonCell>
|
||||
</column>
|
||||
</cells>
|
||||
</matrix>
|
||||
<button misplaced="YES" imageHugsTitle="YES" id="35">
|
||||
<rect key="frame" x="17" y="97" width="413" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="check" title="Directly delete files" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="36">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="updateOptions:" target="-2" id="49"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" misplaced="YES" allowsCharacterPickerTouchBarItem="NO" id="37">
|
||||
<rect key="frame" x="37" y="49" width="394" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="38">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<string key="title">Instead of sending files to trash, delete them directly. This option is usually used as a workaround when the normal deletion method doesn't work.</string>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="750" misplaced="YES" imageHugsTitle="YES" id="39">
|
||||
<rect key="frame" x="330" y="13" width="104" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="push" title="Proceed" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="40">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<string key="keyEquivalent" base64-UTF8="YES">
|
||||
DQ
|
||||
</string>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="proceed:" target="-2" id="51"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" misplaced="YES" imageHugsTitle="YES" id="41">
|
||||
<rect key="frame" x="226" y="13" width="104" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="42">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<string key="keyEquivalent" base64-UTF8="YES">
|
||||
Gw
|
||||
</string>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="cancel:" target="-2" id="50"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</view>
|
||||
<point key="canvasLocation" x="131.5" y="176"/>
|
||||
</window>
|
||||
</objects>
|
||||
</document>
|
@ -1,49 +0,0 @@
|
||||
ownerclass = 'DeletionOptions'
|
||||
ownerimport = 'DeletionOptions.h'
|
||||
|
||||
result = Window(450, 240, "Deletion Options")
|
||||
messageLabel = Label(result, "")
|
||||
linkCheckbox = Checkbox(result, "Link deleted files")
|
||||
linkLabel = Label(result, "After having deleted a duplicate, place a link targeting the "
|
||||
"reference file to replace the deleted file.")
|
||||
linkTypeChoice = RadioButtons(result, ["Symlink", "Hardlink"], columns=2)
|
||||
directCheckbox = Checkbox(result, "Directly delete files")
|
||||
directLabel = Label(result, "Instead of sending files to trash, delete them directly. This option "
|
||||
"is usually used as a workaround when the normal deletion method doesn't work.")
|
||||
proceedButton = Button(result, "Proceed")
|
||||
cancelButton = Button(result, "Cancel")
|
||||
|
||||
owner.linkButton = linkCheckbox
|
||||
owner.linkTypeRadio = linkTypeChoice
|
||||
owner.directButton = directCheckbox
|
||||
owner.messageTextField = messageLabel
|
||||
|
||||
result.canMinimize = False
|
||||
result.canResize = False
|
||||
linkLabel.controlSize = ControlSize.Small
|
||||
directLabel.controlSize = ControlSize.Small
|
||||
linkTypeChoice.controlSize = ControlSize.Small
|
||||
proceedButton.keyEquivalent = '\\r'
|
||||
cancelButton.keyEquivalent = '\\e'
|
||||
linkCheckbox.action = directCheckbox.action = linkTypeChoice.action = Action(owner, 'updateOptions')
|
||||
proceedButton.action = Action(owner, 'proceed')
|
||||
cancelButton.action = Action(owner, 'cancel')
|
||||
|
||||
linkLabel.height *= 2 # 2 lines
|
||||
directLabel.height *= 3 # 3 lines
|
||||
proceedButton.width = 92
|
||||
cancelButton.width = 92
|
||||
|
||||
mainLayout = VLayout([messageLabel, linkCheckbox, linkLabel, linkTypeChoice, directCheckbox,
|
||||
directLabel])
|
||||
mainLayout.packToCorner(Pack.UpperLeft)
|
||||
mainLayout.fill(Pack.Right)
|
||||
buttonLayout = HLayout([cancelButton, proceedButton])
|
||||
buttonLayout.packToCorner(Pack.LowerRight)
|
||||
|
||||
# indent the labels under checkboxes a little bit to the right
|
||||
for indentedView in (linkLabel, directLabel, linkTypeChoice):
|
||||
indentedView.x += 20
|
||||
indentedView.width -= 20
|
||||
# We actually don't want the link choice radio buttons to take all the width, it looks weird.
|
||||
linkTypeChoice.width = 170
|
Loading…
Reference in New Issue