GimpUi.Dialog.prototype.add_button

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

This function is essentially the same as gtk_dialog_add_button() except it ensures there is only one help button and automatically sets the RESPONSE_OK widget as the default response.

button_text

text of button, or stock ID.

response_id

response ID for the button.

Returns

the button widget that was added.