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.

Let Return cancel Select All when nothing is recommended

Țugui Dragoșec6251195dab
diff --git a/Peel/Views/SelectMenu.swift b/Peel/Views/SelectMenu.swift
index e4b78ec2..70adff41 100644
--- a/Peel/Views/SelectMenu.swift
+++ b/Peel/Views/SelectMenu.swift
@@ -82,7 +82,12 @@ struct SelectMenu: View {
.keyboardShortcut(.defaultAction)
}
Button("Select All") { selection.select(list.selectingAll(in: selection.selectedURLs)) }
- Button("Cancel", role: .cancel) {}
+ if list.recommended.isEmpty {
+ Button("Cancel", role: .cancel) {}
+ .keyboardShortcut(.defaultAction)
+ } else {
+ Button("Cancel", role: .cancel) {}
+ }
} message: {
if list.recommended.isEmpty {
Text("This selects ^[\(notRecommended ?? 0) item](inflect: true) Peel doesn’t recommend removing. Check each one before you move it.")
diff --git a/SAFETY.md b/SAFETY.md
index 94b296e5..32818dd0 100644
--- a/SAFETY.md
+++ b/SAFETY.md
@@ -457,9 +457,9 @@ named for a background job whose program is still there, such as the settings a
job, is that job's and is never listed, and so is a folder named like a gone app while an installed app's name holds
that name as whole words, as Epic Games Launcher holds Epic: it may be that app's.
-On every list, Select All selects every row you can select, what Peel holds back included, and asks first,
-counting what Peel doesn't recommend; Return answers Select Recommended. Each held back row still shows its reason
-beside it.
+On every list, Select All selects every row you can select, what Peel holds back included, and asks first, counting what
+Peel doesn't recommend; Return answers Select Recommended, or Cancel when nothing is recommended. Each held back row
+still shows its reason beside it.
In Duplicates, one copy of every group always stays, and a file that changed since the scan is refused. When a scan you
started ends, Duplicates selects every copy but the first of each group, the one it suggests keeping: check which copy