Gtk.Activatable.prototype.do_set_related_action

function do_set_related_action(action:Gtk.Action):void {
    // Gjs wrapper for gtk_activatable_do_set_related_action()
}

This is a utility function for Gtk.Activatable implementors.

When implementing Gtk.Activatable you must call this when handling changes of the Gtk.related-action, and you must also use this to break references in GObject.Object->dispose().

This function adds a reference to the currently set related action for you, it also makes sure the Gtk.Activatable->update() method is called when the related Gtk.Action properties change and registers to the action's proxy list.

<note><para>Be careful to call this before setting the local copy of the Gtk.Action property, since this function uses Gtk.get_related_action to retrieve the previous action</para></note>

Since 2.16

action

the Gtk.Action to set