Gtk.InfoBar.prototype.add_button

function add_button(button_text:String, response_id:Number):Gtk.Widget {
    // Gjs wrapper for gtk_info_bar_add_button()
}

Adds a button with the given text (or a stock button, if button_text is a stock ID) and sets things up so that clicking the button will emit the "response" signal with the given response_id. The button is appended to the end of the info bars's action area. The button widget is returned, but usually you don't need it.

Since 2.18

button_text

text of button, or stock ID

response_id

response ID for the button

Returns

the Gtk.Button widget that was added