Skip to content

Commit

Permalink
Hiding export import buttons until they're ready for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Hanson committed Dec 28, 2020
1 parent 3dba4e7 commit 90d6858
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Rectangle/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -3118,7 +3118,7 @@
<constraints>
<constraint firstAttribute="height" constant="14" id="oIj-Km-Jec"/>
</constraints>
<buttonCell key="cell" type="check" title="Allow any keyboard shortcut" bezelStyle="regularSquare" imagePosition="left" inset="2" id="n4U-FC-L9s">
<buttonCell key="cell" type="check" title="Remove keyboard shortcut restrictions" bezelStyle="regularSquare" imagePosition="left" inset="2" id="n4U-FC-L9s">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
Expand All @@ -3145,7 +3145,7 @@
<constraint firstAttribute="height" constant="20" id="bBf-fp-7rI"/>
</constraints>
</box>
<stackView distribution="equalSpacing" orientation="horizontal" alignment="top" spacing="0.0" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" verticalCompressionResistancePriority="1000" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OhI-U9-bZb">
<stackView distribution="equalSpacing" orientation="horizontal" alignment="top" spacing="0.0" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" verticalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="OhI-U9-bZb">
<rect key="frame" x="0.0" y="0.0" width="450" height="21"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="An0-XX-dT6">
Expand Down Expand Up @@ -3254,6 +3254,7 @@
<outlet property="allowAnyShortcutCheckbox" destination="UY7-Nt-G3K" id="0dH-iu-gSs"/>
<outlet property="checkForUpdatesAutomaticallyCheckbox" destination="HcU-0y-wJU" id="ueY-S8-Ec0"/>
<outlet property="checkForUpdatesButton" destination="bn6-rz-AHw" id="9jf-az-Lvw"/>
<outlet property="exportImportStackView" destination="TgL-lF-gWJ" id="euQ-P3-nzA"/>
<outlet property="gapLabel" destination="jd8-SJ-lza" id="pqG-fr-nwW"/>
<outlet property="gapSlider" destination="O9H-ZD-bqL" id="H7T-4Y-g8e"/>
<outlet property="hideMenuBarIconCheckbox" destination="wBT-R4-q9s" id="bkO-zn-yAZ"/>
Expand Down
1 change: 1 addition & 0 deletions Rectangle/Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Defaults {
static let footprintBorderWidth = FloatDefault(key: "footprintBorderWidth", defaultValue: 2)
static let footprintFade = OptionalBoolDefault(key: "footprintFade")
static let SUEnableAutomaticChecks = BoolDefault(key: "SUEnableAutomaticChecks")
static let showExportImport = BoolDefault(key: "showExportImport")

static var array: [Default] = [
launchOnLogin,
Expand Down
3 changes: 3 additions & 0 deletions Rectangle/PrefsWindow/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class SettingsViewController: NSViewController {
@IBOutlet weak var unsnapRestoreButton: NSButton!
@IBOutlet weak var gapSlider: NSSlider!
@IBOutlet weak var gapLabel: NSTextField!
@IBOutlet weak var exportImportStackView: NSStackView!

@IBAction func toggleLaunchOnLogin(_ sender: NSButton) {
let newSetting: Bool = sender.state == .on
Expand Down Expand Up @@ -131,6 +132,8 @@ class SettingsViewController: NSViewController {
versionLabel.stringValue = "v" + appVersionString + " (" + buildString + ")"

checkForUpdatesButton.title = NSLocalizedString("HIK-3r-i7E.title", tableName: "Main", value: "Check for Updates…", comment: "")

exportImportStackView.isHidden = !Defaults.showExportImport.enabled

Notification.Name.configImported.onPost(using: {_ in
self.initializeToggles()
Expand Down

0 comments on commit 90d6858

Please sign in to comment.