### Method

# Gio Notification add_button_with_target

since: 2.40

#### Declaration [src]

    void
    g_notification_add_button_with_target (
      GNotification* notification,
      const gchar* label,
      const gchar* action,
      const gchar* target_format,
      ...
    )

#### Description [src]

Adds a button to `notification` that activates `action` when clicked. `action` must be an application-wide action (it must start with “app.”).

If `target_format` is given, it is used to collect remaining positional parameters into a `GVariant` instance, similar to g_variant_new(). `action` will be activated with that `GVariant` as its parameter.

Available since: 2.40

This method is not directly available to language bindings.

The implementation of this method is provided by `g_notification_add_button_with_target_value()` in language bindings.

#### Parameters

`label`

  Type: `const gchar*`

  Label of the button.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`action`

  Type: `const gchar*`

  An action name.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`target_format`

  Type: `const gchar*`

  A `GVariant` format string, or `NULL`.

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

`...`

  Type: ``

  Positional parameters, as determined by `target_format`.