Gio.Notification.set_default_action_and_target

### Method

# Gio Notificationset_default_action_and_target

since: 2.40

#### Declaration [src]

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

#### Description [src]

Sets the default action of `notification` to `action`. This action is activated when the notification is clicked on. It 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.

When no default action is set, the application that the notification was sent on is activated.

Available since: 2.40

This method is not directly available to language bindings.

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

#### Parameters

`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`.