From df8be10c7d706d8e6cf28aa9075ef9027a10e25a Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sun, 20 Sep 2026 00:12:36 +0200 Subject: [PATCH] Stop promising to ask for an export folder An empty device destination read "Ask each time" on the settings page, and nothing asks: an export made with the field blank is refused with "no export folder is set". Say what will happen. --- core/dr-types/src/settings.rs | 14 ++++++++++---- ui/dr-ui/ui/settings.slint | 5 ++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/core/dr-types/src/settings.rs b/core/dr-types/src/settings.rs index 0bd42a6..85c9a9c 100644 --- a/core/dr-types/src/settings.rs +++ b/core/dr-types/src/settings.rs @@ -885,9 +885,14 @@ impl ExportSettings { /// /// The library root has to read as a place rather than as a blank field, /// or confirming the picker where it opens looks like it did nothing. + /// + /// An empty device folder used to read "Ask each time", which nothing + /// does: no platform asks, and an export made with the field blank is + /// refused with "no export folder is set". The label now says what will + /// happen rather than what was once meant to. pub fn destination_label(&self) -> &str { match self.target { - ExportTarget::Device if self.destination.trim().is_empty() => "Ask each time", + ExportTarget::Device if self.destination.trim().is_empty() => "Not set", ExportTarget::Device => &self.destination, ExportTarget::Remote if self.remote_destination.trim().is_empty() => "Library root", ExportTarget::Remote => &self.remote_destination, @@ -1621,14 +1626,15 @@ mod tests { } #[test] - fn an_empty_device_destination_still_means_ask() { + fn an_empty_device_destination_is_not_set_and_says_so() { // The asymmetry is deliberate: a filesystem has no folder worth - // assuming, so empty there is a question rather than an answer. + // assuming, so empty there is a gap rather than an answer — and the + // label must not promise a question nobody will be asked. let mut s = Settings::default(); s.export.target = ExportTarget::Device; s.export.destination = String::new(); assert!(!s.export.destination_is_set()); - assert_eq!(s.export.destination_label(), "Ask each time"); + assert_eq!(s.export.destination_label(), "Not set"); } #[test] diff --git a/ui/dr-ui/ui/settings.slint b/ui/dr-ui/ui/settings.slint index b9efb33..56195ee 100644 --- a/ui/dr-ui/ui/settings.slint +++ b/ui/dr-ui/ui/settings.slint @@ -1161,7 +1161,10 @@ export component SettingsPage inherits Rectangle { TextRow { label: "Destination"; - hint: "empty asks each time"; + // What an empty field does, not what it was once + // going to do: nothing asks, and an export with + // no folder is refused and says so in the header. + hint: "a folder on this device; exports are refused until one is set"; text <=> root.destination; field-width: 320px; placeholder: root.destination-hint;