Rename the 'Last used' save position to 'Automatic'

It's not always the last used position
This commit is contained in:
Damiano Galassi committed 2026-09-25 07:50:06 +02:00
1 parent 40107a9db1
commit 59f085a7e4
4 files changed
+7 -11

No files matched your search

+2 -2
View File
@@ -66,7 +66,7 @@ class GeneralPrefsViewController: NSViewController {
let location = Prefs.saveAsLocation
if location == .custom && Prefs.saveAsCustomLocation == nil {
saveLocationPopUp.selectItem(withTag: SaveAsLocation.lastUsed.rawValue)
saveLocationPopUp.selectItem(withTag: SaveAsLocation.automatic.rawValue)
} else {
saveLocationPopUp.selectItem(withTag: location.rawValue)
}
@@ -77,7 +77,7 @@ class GeneralPrefsViewController: NSViewController {
Prefs.saveAsCustomLocation = url
Prefs.saveAsLocation = .custom
} else {
Prefs.saveAsLocation = SaveAsLocation(rawValue: sender.tag) ?? .lastUsed
Prefs.saveAsLocation = SaveAsLocation(rawValue: sender.tag) ?? .automatic
}
}
+2 -6
View File
@@ -90,13 +90,9 @@ struct StoredCodable<T: Codable> : Registable {
}
}
/// The folder the Save As… panel opens at.
enum SaveAsLocation: Int {
/// The last folder used, the standard AppKit behaviour.
case lastUsed = 0
/// The folder holding the file the tracks were imported from.
case automatic = 0
case sameAsFile = 1
/// A folder picked by the user.
case custom = 2
}
@@ -192,7 +188,7 @@ enum Prefs {
@Stored(key: "SBLogFormat", defaultValue: 0)
static var logFormat: Int // 0 = Time Only, 1 = Date and Time
@StoredEnum(key: "SBSaveAsLocationMode", defaultValue: .lastUsed)
@StoredEnum(key: "SBSaveAsLocationMode", defaultValue: .automatic)
static var saveAsLocation: SaveAsLocation
/// The folder used when saveAsLocation is set to custom.
+1 -1
View File
@@ -59,7 +59,7 @@ final class SaveOptions: NSViewController {
/// at the last folder used.
private func preferredDirectory(for doc: Document) -> URL? {
switch Prefs.saveAsLocation {
case .lastUsed:
case .automatic:
return nil
case .sameAsFile:
return doc.fileURL?.deletingLastPathComponent() ?? doc.mp4.firstSourceDirectoryURL()