It derives from <GObject>.
Collects the arguments that are needed to present a message to the user.
The message is shown with the alert-dialog:choose function.
If you don’t need to wait for a button to be clicked, you can use
alert-dialog:show.
Labels for buttons to show in the alert.
The labels should be translated and may contain a _ character to
indicate the mnemonic character.
If this property is not set, then a ’Close’ button is automatically created.
Its value is a vector, each a string (or, to set it, a list), or
#f.
Set it with (set! (alert-dialog:buttons self) value).
Determines what happens when the Escape key is pressed while the alert is shown.
If this property holds the index of a button in alert-dialog:buttons, then pressing Escape is
treated as if that button was pressed. If it is -1 or not a valid index
for the buttons array, then an error is returned.
If buttons is NULL, then the automatically created ’Close’
button is treated as both cancel and default button, so 0 is returned.
Its value is a 32-bit integer.
Set it with (set! (alert-dialog:cancel-button self) value).
Determines what happens when the Return key is pressed while the alert is shown.
If this property holds the index of a button in alert-dialog:buttons, then pressing Return is
treated as if that button was pressed. If it is -1 or not a valid index
for the buttons array, then nothing happens.
If buttons is NULL, then the automatically created ’Close’
button is treated as both cancel and default button, so 0 is returned.
Its value is a 32-bit integer.
Set it with (set! (alert-dialog:default-button self) value).
The detail text for the alert.
Its value is a string, or #f.
Set it with (set! (alert-dialog:detail self) value).
The message for the alert.
Its value is a string, or #f.
Set it with (set! (alert-dialog:message self) value).
Whether the alert is modal.
Its value is a boolean.
Set it with (set! (alert-dialog:modal self) value).
Shows the alert to the user.
It is ok to pass NULL for the callback if the alert does not have
more than one button. A simpler API for this case is
alert-dialog:show.
Passed: a <GtkAlertDialog>.
an alert dialog
Passed, or left out: a <GtkWindow>, or #f.
the parent window
Passed, or left out: a <GCancellable>, or
#f.
a cancellable to cancel the operation
Passed, or left out: a procedure, or #f.
a callback to call when the operation is complete
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes the alert-dialog:choose call.
Passed: a <GtkAlertDialog>.
an alert dialog
Passed: a <GAsyncResult>.
the result
Returned: a 32-bit integer.
the index of the button that was clicked, or -1 if the dialog was
cancelled and alert-dialog:cancel-button is not set
Returns the button labels for the alert.
Passed: a <GtkAlertDialog>.
an alert dialog
Returned: a vector, each a string, or #f.
the button labels
Returns the index of the cancel button.
Passed: a <GtkAlertDialog>.
an alert dialog
Returned: a 32-bit integer.
the index of the cancel button, or -1
Returns the index of the default button.
Passed: a <GtkAlertDialog>.
an alert dialog
Returned: a 32-bit integer.
the index of the default button, or -1
Returns the detail text that will be shown in the alert.
Passed: a <GtkAlertDialog>.
an alert dialog
Returned: a string.
the detail text
Returns the message that will be shown in the alert.
Passed: a <GtkAlertDialog>.
an alert dialog
Returned: a string.
the message
Returns whether the alert blocks interaction with the parent window while it is presented.
Passed: a <GtkAlertDialog>.
an alert dialog
Returned: a boolean.
true if the alert is modal
Sets the button labels for the alert.
Passed: a <GtkAlertDialog>.
an alert dialog
Passed: a list or vector, each a string.
the new button labels
Sets the index of the cancel button.
See alert-dialog:cancel-button for details of how this
value is used.
Passed: a <GtkAlertDialog>.
an alert dialog
Passed: a 32-bit integer.
the new cancel button
Sets the index of the default button.
See alert-dialog:default-button for details of how this
value is used.
Passed: a <GtkAlertDialog>.
an alert dialog
Passed: a 32-bit integer.
the new default button
Sets the detail text that will be shown in the alert.
Passed: a <GtkAlertDialog>.
an alert dialog
Passed: a string.
the new detail text
Sets the message that will be shown in the alert.
Passed: a <GtkAlertDialog>.
an alert dialog
Passed: a string.
the new message
Sets whether the alert blocks interaction with the parent window while it is presented.
Passed: a <GtkAlertDialog>.
an alert dialog
Passed: a boolean.
the new value
Shows the alert to the user.
This function is a simpler version of alert-dialog:choose intended for dialogs with a single button.
If you want to cancel the dialog or if the alert has more than one
button, you should use that function instead and provide it with a
<GCancellable> and callback respectively.
Passed: a <GtkAlertDialog>.
an alert dialog
Passed, or left out: a <GtkWindow>, or #f.
the parent window