specifying dialog default buttons



Hi,

Right now with the new GtkDialog interface, to specify a default
button, you have to create the button yourself, and then
gtk_dialog_add_response_widget (), then set it to be the default.

Propose to add:
  gtk_dialog_set_default_response (GtkDialog *dialog, gint response_id);

Where the last button to be added with that response ID becomes the 
default button, and closing on delete_event returns that response ID
from gtk_dialog_run(). The default default response is
GTK_RESPONSE_NONE, which is what delete_event returns now from
gtk_dialog_run().

If you have two buttons with the same response ID, and want the first
one added to be the default button, you'll have to manually create the
button and add it, but I assume this will be a rare circumstance.

Havoc






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]