aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-11-30 00:33:01 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:05 +0800
commitcacbb0f94f47060716d409ed4861f609123827a5 (patch)
treea052f15a7d288c2aa5364f6d57b0ddffe337e67d
parent4cc404e6ebb9602d787c32cd176bf51506fc7f9e (diff)
downloadgsoc2013-evolution-cacbb0f94f47060716d409ed4861f609123827a5.tar.gz
gsoc2013-evolution-cacbb0f94f47060716d409ed4861f609123827a5.tar.zst
gsoc2013-evolution-cacbb0f94f47060716d409ed4861f609123827a5.zip
Bug #239817 - New criterion should grab focus in a filter editor
-rw-r--r--filter/e-filter-rule.c6
-rw-r--r--mail/em-filter-rule.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c
index 9d6fb275e8..c2c70c4695 100644
--- a/filter/e-filter-rule.c
+++ b/filter/e-filter-rule.c
@@ -230,12 +230,14 @@ do_grab_focus_cb (GtkWidget *widget,
{
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);
}
}
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);
}
}