Skip to content

Commit

Permalink
chore: update open button text for macOS 13+
Browse files Browse the repository at this point in the history
  • Loading branch information
quoid committed Mar 5, 2023
1 parent f2673f2 commit 22a4abf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions xcode/Mac-App/Base.lproj/View.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</textFieldCell>
</textField>
<stackView distribution="fill" orientation="horizontal" alignment="centerY" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pKD-4w-JK7">
<rect key="frame" x="144" y="24" width="192" height="16"/>
<rect key="frame" x="144" y="24" width="193" height="16"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Pik-Ho-vD1">
<rect key="frame" x="-2" y="2" width="78" height="12"/>
Expand All @@ -107,7 +107,7 @@
</textFieldCell>
</textField>
<button horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WiE-Qy-xne">
<rect key="frame" x="129" y="-7" width="69" height="27"/>
<rect key="frame" x="129" y="-7" width="70" height="27"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="57" id="KfI-LD-AaS"/>
</constraints>
Expand Down Expand Up @@ -204,6 +204,7 @@
<outlet property="appName" destination="gGD-M9-Dwj" id="WOi-mP-IbI"/>
<outlet property="enabledIcon" destination="i4K-xO-vlx" id="M8i-Qj-l6w"/>
<outlet property="enabledText" destination="v0r-qO-55O" id="wNQ-gC-2zf"/>
<outlet property="openButton" destination="vjm-rq-99e" id="Mc0-Do-3jr"/>
<outlet property="saveLocation" destination="6k5-Oz-mOV" id="pgz-od-dyH"/>
</connections>
</viewController>
Expand Down
7 changes: 5 additions & 2 deletions xcode/Mac-App/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ class ViewController: NSViewController {
@IBOutlet var saveLocation: NSTextField!
@IBOutlet weak var enabledText: NSTextField!
@IBOutlet weak var enabledIcon: NSView!

@IBOutlet weak var openButton: NSButton!

let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "??"
let buildNumber = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "??"
let extensionID = extensionIdentifier
Expand All @@ -22,10 +23,12 @@ class ViewController: NSViewController {
name: NSApplication.didBecomeActiveNotification,
object: nil
)
// set the save location url display
let url = getSaveLocationURL()
self.saveLocation.stringValue = url.absoluteString
self.saveLocation.toolTip = url.absoluteString
if #available(macOS 13, *) {
self.openButton.title = "Open Safari Settings"
}
}

@objc func setExtensionState() {
Expand Down

0 comments on commit 22a4abf

Please sign in to comment.