[evolution] Bug #239817 - New criterion should grab focus in a filter editor
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #239817 - New criterion should grab focus in a filter editor
- Date: Mon, 29 Nov 2010 16:34:08 +0000 (UTC)
commit d628156ce79f654344592ddcd3359ac986b347f2
Author: Milan Crha <mcrha redhat com>
Date: Mon Nov 29 17:33:01 2010 +0100
Bug #239817 - New criterion should grab focus in a filter editor
filter/e-filter-rule.c | 6 ++++--
mail/em-filter-rule.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c
index 9d6fb27..c2c70c4 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 3a83aaf..71919a2 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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]