diff --git a/src/desktop/print.rs b/src/desktop/print.rs index 830823942..43b4cf44f 100644 --- a/src/desktop/print.rs +++ b/src/desktop/print.rs @@ -556,14 +556,24 @@ struct PreparePrintOptions { handle_token: HandleToken, /// Whether to make the dialog modal. modal: Option, + /// Label for the accept button. Mnemonic underlines are allowed. + accept_label: Option, } impl PreparePrintOptions { /// Sets whether the dialog should be a modal. + #[must_use] pub fn modal(mut self, modal: impl Into>) -> Self { self.modal = modal.into(); self } + + /// Label for the accept button. Mnemonic underlines are allowed. + #[must_use] + pub fn accept_label<'a>(mut self, accept_label: impl Into>) -> Self { + self.accept_label = accept_label.into().map(ToOwned::to_owned); + self + } } #[derive(SerializeDict, Type, Debug, Default)]