connect to our own "response" signal so our callback is the first one

2006-01-03  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpdialog.c (gimp_dialog_init): connect to our
	own "response" signal so our callback is the first one called.

	(gimp_dialog_response): let the activated widget grab the focus,
	so input fields which update their model and/or constraints on
	focus_out are properly recalculated. Fixes bug #309373.
This commit is contained in:
Michael Natterer
2006-01-03 12:45:45 +00:00
committed by Michael Natterer
parent 481ea25662
commit a3ed509b74
2 changed files with 7 additions and 2 deletions

View File

@ -267,7 +267,12 @@ gimp_dialog_response (GtkDialog *dialog,
if (gtk_dialog_get_response_for_widget (dialog, widget) == response_id)
{
gtk_widget_grab_focus (widget);
if (! GTK_IS_BUTTON (widget) ||
gtk_button_get_focus_on_click (GTK_BUTTON (button)))
{
gtk_widget_grab_focus (widget);
}
break;
}
}