Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Bring Peel forward from the panel's Settings and About

Țugui Dragoșa4af6cb44d42
diff --git a/Peel/Views/MenuBarPanel.swift b/Peel/Views/MenuBarPanel.swift
index 30e76bc8..78bb8a92 100644
--- a/Peel/Views/MenuBarPanel.swift
+++ b/Peel/Views/MenuBarPanel.swift
@@ -5,6 +5,7 @@ import SwiftUI
/// any app updates waiting, and what each tool found the last time it looked.
struct MenuBarPanel: View {
@Environment(\.openWindow) private var openWindow
+ @Environment(\.openSettings) private var openSettings
@Environment(AppLibrary.self) private var library
@Environment(LifetimeStats.self) private var stats
@Environment(PeelUpdater.self) private var updater
@@ -83,8 +84,14 @@ struct MenuBarPanel: View {
.accessibilityLabel(Text(verbatim: "Peel"))
Spacer()
Menu {
- SettingsLink { Text("Settings…") }
- Button("About Peel") { openWindow(id: AboutView.windowID) }
+ Button("Settings…") {
+ openSettings()
+ NSApp.activate()
+ }
+ Button("About Peel") {
+ openWindow(id: AboutView.windowID)
+ NSApp.activate()
+ }
Button("Check for Updates…", action: updater.checkForUpdates)
.disabled(!updater.canCheckForUpdates)
Divider()