From 357c4aa3bfd7bfb295fe5fca3149e85238d4855d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 20 Jan 2005 19:53:58 +0000 Subject: [PATCH] Don't loop forever here, even if the only focusable widgets are labels. 2005-01-20 Matthias Clasen * gtk/gtkdialog.c (gtk_dialog_map): Don't loop forever here, even if the only focusable widgets are labels. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkdialog.c | 6 ++++++ 4 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index abf62c77e6..1eba5e4c77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-20 Matthias Clasen + + * gtk/gtkdialog.c (gtk_dialog_map): Don't loop forever + here, even if the only focusable widgets are labels. + 2005-01-20 Matthias Clasen Support tinting in GtkCellRendererPixbuf (#162903, Jorn Baayen): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index abf62c77e6..1eba5e4c77 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-01-20 Matthias Clasen + + * gtk/gtkdialog.c (gtk_dialog_map): Don't loop forever + here, even if the only focusable widgets are labels. + 2005-01-20 Matthias Clasen Support tinting in GtkCellRendererPixbuf (#162903, Jorn Baayen): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index abf62c77e6..1eba5e4c77 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2005-01-20 Matthias Clasen + + * gtk/gtkdialog.c (gtk_dialog_map): Don't loop forever + here, even if the only focusable widgets are labels. + 2005-01-20 Matthias Clasen Support tinting in GtkCellRendererPixbuf (#162903, Jorn Baayen): diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index e0effeea83..77191f4293 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -345,10 +345,16 @@ gtk_dialog_map (GtkWidget *widget) if (!window->focus_widget) { GList *children, *tmp_list; + GtkWidget *first_focus = NULL; do { g_signal_emit_by_name (window, "move_focus", GTK_DIR_TAB_FORWARD); + + if (first_focus == NULL) + first_focus = window->focus_widget; + else if (first_focus == window->focus_widget) + break; } while (GTK_IS_LABEL (window->focus_widget));