Skip to content

Commit

Permalink
Add checkbox in Preferences for the disableTabAutoClose setting
Browse files Browse the repository at this point in the history
  • Loading branch information
sorbits committed Sep 15, 2019
1 parent d2979e2 commit d9ac41d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 18 deletions.
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment version="101200" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand All @@ -15,7 +15,7 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView id="1">
<rect key="frame" x="0.0" y="0.0" width="495" height="395"/>
<rect key="frame" x="0.0" y="0.0" width="495" height="415"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<subviews>
<box verticalHuggingPriority="750" boxType="separator" id="3">
Expand Down Expand Up @@ -77,7 +77,7 @@
</connections>
</textField>
<button id="55">
<rect key="frame" x="203" y="332" width="114" height="18"/>
<rect key="frame" x="203" y="352" width="114" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Folders on top" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="56">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
Expand All @@ -88,7 +88,7 @@
</connections>
</button>
<button id="OLx-G3-8R9">
<rect key="frame" x="203" y="159" width="207" height="18"/>
<rect key="frame" x="203" y="179" width="207" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<string key="toolTip">When opening a file its document tab will normally be shown to the right of the currently selected tab, even when the document being opened is already shown in an existing tab. Disabling this option will not move already open tabs.</string>
<buttonCell key="cell" type="check" title="Re-order when opening a file" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="VF1-sn-R4h">
Expand All @@ -103,6 +103,21 @@
</binding>
</connections>
</button>
<button toolTip="If the tab bar is full then tabs that has not been used for a while will be automatically closed when this option is enabled." id="QJX-kn-IeP">
<rect key="frame" x="203" y="159" width="218" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Automatically close unused tabs" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="DMG-Vp-HnN">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<binding destination="-2" name="value" keyPath="disableTabAutoClose" id="jjR-vT-i0M">
<dictionary key="options">
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
</binding>
</connections>
</button>
<box verticalHuggingPriority="750" boxType="separator" id="61">
<rect key="frame" x="12" y="150" width="456" height="5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
Expand All @@ -117,7 +132,7 @@
</textFieldCell>
</textField>
<button toolTip="With this option disabled, the tab bar above the document will not show when the window only contains a single document." id="69">
<rect key="frame" x="203" y="181" width="186" height="18"/>
<rect key="frame" x="203" y="201" width="186" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Show for single document" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="70">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
Expand All @@ -128,7 +143,7 @@
</connections>
</button>
<popUpButton verticalHuggingPriority="750" id="74">
<rect key="frame" x="203" y="353" width="150" height="26"/>
<rect key="frame" x="203" y="373" width="150" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="Computer" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="77" id="75">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
Expand All @@ -145,7 +160,7 @@
</popUpButtonCell>
</popUpButton>
<textField verticalHuggingPriority="750" id="82">
<rect key="frame" x="60" y="358" width="139" height="17"/>
<rect key="frame" x="60" y="378" width="139" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="File browser location:" id="83">
<font key="font" metaFont="system"/>
Expand All @@ -154,7 +169,7 @@
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" id="84">
<rect key="frame" x="203" y="233" width="150" height="26"/>
<rect key="frame" x="203" y="253" width="150" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="Left side" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="93" id="87">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
Expand Down Expand Up @@ -184,7 +199,7 @@
</connections>
</popUpButton>
<textField verticalHuggingPriority="750" id="85">
<rect key="frame" x="59" y="238" width="140" height="17"/>
<rect key="frame" x="59" y="258" width="140" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Show file browser on:" id="86">
<font key="font" metaFont="system"/>
Expand All @@ -193,7 +208,7 @@
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" id="iDX-XT-3Hz">
<rect key="frame" x="95" y="183" width="104" height="17"/>
<rect key="frame" x="95" y="203" width="104" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Document tabs:" id="fUU-mg-NRT">
<font key="font" metaFont="system"/>
Expand Down Expand Up @@ -235,15 +250,15 @@
</textFieldCell>
</textField>
<box verticalHuggingPriority="750" boxType="separator" id="124">
<rect key="frame" x="12" y="263" width="456" height="5"/>
<rect key="frame" x="12" y="283" width="456" height="5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
</box>
<box verticalHuggingPriority="750" boxType="separator" id="xzR-t3-M8W">
<rect key="frame" x="12" y="203" width="456" height="5"/>
<rect key="frame" x="12" y="223" width="456" height="5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
</box>
<button id="125">
<rect key="frame" x="203" y="212" width="257" height="18"/>
<rect key="frame" x="203" y="232" width="257" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<string key="toolTip">When showing or hiding the file browser, the width of the window will be increased or decreased so that the document’s width remains the same.</string>
<buttonCell key="cell" type="check" title="Adjust window when toggling display" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="126">
Expand All @@ -259,7 +274,7 @@
</connections>
</button>
<button toolTip="When you change to another tab, the file browser will reveal and select the file representing the tab being switched to." id="AHH-NX-VZc">
<rect key="frame" x="203" y="272" width="226" height="18"/>
<rect key="frame" x="203" y="292" width="226" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Keep current document selected" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="BO2-cb-8hv">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
Expand All @@ -270,7 +285,7 @@
</connections>
</button>
<button toolTip="With this enabled, the file browser will allow inline expansion of symbolic links." id="O8U-A0-T0y">
<rect key="frame" x="203" y="312" width="183" height="18"/>
<rect key="frame" x="203" y="332" width="183" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Show links as expandable" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="HjH-aU-cx2">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
Expand All @@ -281,7 +296,7 @@
</connections>
</button>
<button id="wpe-lT-aox">
<rect key="frame" x="203" y="292" width="179" height="18"/>
<rect key="frame" x="203" y="312" width="179" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Open files on single click" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="EzO-Ef-D1M">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
Expand All @@ -292,7 +307,7 @@
</connections>
</button>
</subviews>
<point key="canvasLocation" x="139.5" y="146.5"/>
<point key="canvasLocation" x="139.5" y="156.5"/>
</customView>
<userDefaultsController representsSharedInstance="YES" id="40"/>
</objects>
Expand Down
1 change: 1 addition & 0 deletions Frameworks/Preferences/src/ProjectsPreferences.mm
Expand Up @@ -27,6 +27,7 @@ - (id)init
@"allowExpandingLinks": kUserDefaultsAllowExpandingLinksKey,
@"fileBrowserSingleClickToOpen": kUserDefaultsFileBrowserSingleClickToOpenKey,
@"disableTabReordering": kUserDefaultsDisableTabReorderingKey,
@"disableTabAutoClose": kUserDefaultsDisableTabAutoCloseKey,
};

self.tmProperties = @{
Expand Down

0 comments on commit d9ac41d

Please sign in to comment.