Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Pref Window opening and view/remove button #253

Merged
merged 12 commits into from
Jul 4, 2024
4 changes: 2 additions & 2 deletions HeliPort/Appearance/Preferences/PrefsSavedNetworksView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class PrefsSavedNetworksView: NSView {
return label
}()

private let modifyItemSegment: NSSegmentedControl = {
private lazy var modifyItemSegment: NSSegmentedControl = {
var removeImage: NSImage
var viewImage: NSImage
if #available(OSX 11.0, *) {
Expand All @@ -91,7 +91,7 @@ class PrefsSavedNetworksView: NSView {
}
let button = NSSegmentedControl(images: [removeImage, viewImage],
trackingMode: .momentary,
target: NSSegmentedControl.self,
target: self,
Zyvoxi marked this conversation as resolved.
Show resolved Hide resolved
action: #selector(modifyItemClicked(_:)))
button.setEnabled(false, forSegment: .remove)
button.setEnabled(false, forSegment: .view)
Expand Down
7 changes: 3 additions & 4 deletions HeliPort/Appearance/StatusMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

// - MARK: Properties

private let heliPortUpdater = SUUpdater()

Check warning on line 24 in HeliPort/Appearance/StatusMenu.swift

View workflow job for this annotation

GitHub Actions / CI

'SUUpdater' is deprecated: Deprecated in Sparkle 2. Use SPUStandardUpdaterController instead, or SPUUpdater if you need more control.

private let networkListUpdatePeriod: Double = 5
private let statusUpdatePeriod: Double = 2
Expand All @@ -31,7 +31,7 @@
private var statusUpdateTimer: Timer?

// One instance at a time
private var preferenceWindow: PrefsWindow?
private lazy var preferenceWindow = PrefsWindow()

private var status: itl_80211_state = ITL80211_S_INIT {
didSet {
Expand Down Expand Up @@ -444,9 +444,8 @@
let alert = Alert(text: .notImplemented)
alert.show()
case .openNetworkPrefs:
preferenceWindow?.close()
preferenceWindow = PrefsWindow()
preferenceWindow?.show()
preferenceWindow.close()
preferenceWindow.show()
case .checkUpdates:
heliPortUpdater.checkForUpdates(self)
case .launchLogin:
Expand Down
Loading