From a7cd9932b76455d44d75287720cc478671ace4a1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 20 Jan 2005 19:52:15 +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 | 3 +++ ChangeLog.pre-2-10 | 3 +++ ChangeLog.pre-2-8 | 3 +++ gtk/gtkdialog.c | 6 ++++++ 4 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 08d8dbb4f4..a961696c50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +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. + * gtk/gtkmodules.c (load_module): Don't reverse the order of modules when putting them in gtk_modules. (#162676, Dennis Cranston, patch by Remus Draica) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 08d8dbb4f4..a961696c50 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +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. + * gtk/gtkmodules.c (load_module): Don't reverse the order of modules when putting them in gtk_modules. (#162676, Dennis Cranston, patch by Remus Draica) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 08d8dbb4f4..a961696c50 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +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. + * gtk/gtkmodules.c (load_module): Don't reverse the order of modules when putting them in gtk_modules. (#162676, Dennis Cranston, patch by Remus Draica) 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));