R7.6: Windows and Linux print (#3)

Windows prints through the system dialog at the document's paper;
Linux through the desktop portal, the dialog's choices laid out by Ely.
Round 3 findings fixed without a further review, as the rules say.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-16 16:59:46 -04:00
1 parent de4a38e814
commit 13546ea899
26 files changed
+2544 -114

No files matched your search

+5 -3
View File
@@ -64,7 +64,9 @@ fn a_failed_print_says_printing_failed() {
.expect("the window");
let gone = dir.path().join("gone.pdf");
update(&mut cx, &book, |_, cx| ely_office::print_later(gone, cx));
cx.run_until_parked();
let (toasts, prefix) = cx.update(|app| (root.read(app).toasts(app), ely_office::text(app, "office.print.failed", &[("error", "")])));
assert!(toasts.iter().any(|(text, severity)| *severity == Some(Severity::Danger) && text.starts_with(prefix.as_ref())), "{toasts:?}");
// The file is read on its own thread.
settle(&cx, |app| {
let prefix = ely_office::text(app, "office.print.failed", &[("error", "")]);
root.read(app).toasts(app).iter().any(|(text, severity)| *severity == Some(Severity::Danger) && text.starts_with(prefix.as_ref()))
});
}