Constructor

AdwAlertDialognew

since: 1.5

Declaration [src]

AdwDialog*
adw_alert_dialog_new (
  const char* heading,
  const char* body
)

Description [src]

Creates a new AdwAlertDialog.

heading and body can be set to NULL. This can be useful if they need to be formatted or use markup. In that case, set them to NULL and call adw_alert_dialog_format_body() or similar methods afterwards:

AdwDialog *dialog;

dialog = adw_alert_dialog_new (_("Replace File?"), NULL);
adw_alert_dialog_format_body (ADW_ALERT_DIALOG (dialog),
                              _("A file named ā€œ%sā€ already exists.  Do you want to replace it?"),
                              filename);

Available since: 1.5

Parameters

heading

Type: const char*

The heading.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
body

Type: const char*

The body text.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: AdwDialog

The newly created AdwAlertDialog

The data is owned by the called function.