From d628156ce79f654344592ddcd3359ac986b347f2 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 29 Nov 2010 17:33:01 +0100 Subject: Bug #239817 - New criterion should grab focus in a filter editor --- mail/em-filter-rule.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mail') diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c index 3a83aafc01..71919a2e11 100644 --- a/mail/em-filter-rule.c +++ b/mail/em-filter-rule.c @@ -466,12 +466,14 @@ do_grab_focus_cb (GtkWidget *widget, gpointer data) { gboolean *done = (gboolean *) data; - if (*done) + if (*done || !widget) return; - if (widget && gtk_widget_get_can_focus (widget)) { + if (gtk_widget_get_can_focus (widget) || GTK_IS_COMBO_BOX (widget)) { *done = TRUE; gtk_widget_grab_focus (widget); + } else if (GTK_IS_CONTAINER (widget)) { + gtk_container_foreach (GTK_CONTAINER (widget), do_grab_focus_cb, done); } } -- cgit