Struct pinentry::ConfirmationDialog [−][src]
pub struct ConfirmationDialog<'a> { /* fields omitted */ }
Expand description
A dialog for requesting a confirmation from the user.
Implementations
Creates a new ConfirmationDialog using the binary named pinentry
.
Returns None
if pinentry
cannot be found in PATH
.
Creates a new ConfirmationDialog using the given path to, or name of, a pinentry
binary.
Returns None
if:
- A path was provided that does not exist.
- A binary name was provided that cannot be found in
PATH
. - The binary is found but is not executable.
Sets the window title.
When using this feature you should take care that the window is still identifiable as the pinentry.
Sets the text for the button signalling confirmation (the “OK” button).
You should use an underscore in the text only if you know that a modern version of pinentry is used. Modern versions underline the next character after the underscore and use the first such underlined character as a keyboard accelerator. Use a double underscore to escape an underscore.
Sets the text for the button signaling cancellation or disagreement (the “Cancel” button).
You should use an underscore in the text only if you know that a modern version of pinentry is used. Modern versions underline the next character after the underscore and use the first such underlined character as a keyboard accelerator. Use a double underscore to escape an underscore.
Enables the third non-affirmative response button (the “Not OK” button).
This can be used in case three buttons are required (to distinguish between cancellation and disagreement).
You should use an underscore in the text only if you know that a modern version of pinentry is used. Modern versions underline the next character after the underscore and use the first such underlined character as a keyboard accelerator. Use a double underscore to escape an underscore.
Sets the timeout (in seconds) before returning an error.
Asks for confirmation.
Returns:
Ok(true)
if the “OK” button is selected.Ok(false)
if:- the “Cancel” button is selected and the “Not OK” button is disabled.
- the “Not OK” button is enabled and selected.
Err(Error::Cancelled)
if the “Cancel” button is selected and the “Not OK” button is enabled.