diff --git a/ChangeLog b/ChangeLog index cdb2410aa1..12e27bcec3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-09-14 Michael Natterer + + * libgimpwidgets/gimpquerybox.c: set the "activates-default" + property on the entries in all query boxes so hitting "return" + confirms them. Addresses bug #148026. + 2004-09-14 Michael Natterer * app/widgets/gimpbufferview.c: simplified the code which deals diff --git a/libgimpwidgets/gimpquerybox.c b/libgimpwidgets/gimpquerybox.c index 3c4b30ac88..64f39e0774 100644 --- a/libgimpwidgets/gimpquerybox.c +++ b/libgimpwidgets/gimpquerybox.c @@ -246,9 +246,9 @@ gimp_query_string_box (const gchar *title, return NULL; entry = gtk_entry_new (); + gtk_entry_set_text (GTK_ENTRY (entry), initial ? initial : ""); + gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE); gtk_box_pack_start (GTK_BOX (query_box->vbox), entry, FALSE, FALSE, 0); - if (initial) - gtk_entry_set_text (GTK_ENTRY (entry), initial); gtk_widget_grab_focus (entry); gtk_widget_show (entry); @@ -308,6 +308,7 @@ gimp_query_int_box (const gchar *title, spinbutton = gimp_spin_button_new (&adjustment, initial, lower, upper, 1, 10, 0, 1, 0); + gtk_entry_set_activates_default (GTK_ENTRY (spinbutton), TRUE); gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, FALSE, FALSE, 0); gtk_widget_grab_focus (spinbutton); gtk_widget_show (spinbutton); @@ -370,6 +371,7 @@ gimp_query_double_box (const gchar *title, spinbutton = gimp_spin_button_new (&adjustment, initial, lower, upper, 1, 10, 0, 1, digits); + gtk_entry_set_activates_default (GTK_ENTRY (spinbutton), TRUE); gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, FALSE, FALSE, 0); gtk_widget_grab_focus (spinbutton); gtk_widget_show (spinbutton); @@ -426,6 +428,7 @@ gimp_query_size_box (const gchar *title, { QueryBox *query_box; GtkWidget *sizeentry; + GtkWidget *spinbutton; query_box = create_query_box (title, parent, help_func, help_id, G_CALLBACK (size_query_box_response), @@ -449,6 +452,9 @@ gimp_query_size_box (const gchar *title, lower, upper); gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 0, initial); + spinbutton = gimp_size_entry_get_help_widget (GIMP_SIZE_ENTRY (sizeentry), 0); + gtk_entry_set_activates_default (GTK_ENTRY (spinbutton), TRUE); + gtk_box_pack_start (GTK_BOX (query_box->vbox), sizeentry, FALSE, FALSE, 0); gimp_size_entry_grab_focus (GIMP_SIZE_ENTRY (sizeentry)); gtk_widget_show (sizeentry);