]> Pileus Git - ~andy/gtk/commitdiff
Fix an infinite loop in gtk_dialog_map()
authorMatthias Clasen <mclasen@redhat.com>
Mon, 8 Mar 2010 15:36:11 +0000 (10:36 -0500)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Sun, 4 Apr 2010 00:59:05 +0000 (20:59 -0400)
The new focus handling with links in labels tripped up the code
that tries to avoid focussing labels. Bug 612066

gtk/gtkdialog.c

index 04f2539ca6860247524daca96f455671949d7b1a..d6b7bcd68252881409836a987c151b0855cd2772 100644 (file)
@@ -414,12 +414,11 @@ gtk_dialog_map (GtkWidget *widget)
          if (first_focus == NULL)
            first_focus = window->focus_widget;
          else if (first_focus == window->focus_widget)
-           break;
-
+            break;
          if (!GTK_IS_LABEL (window->focus_widget))
            break;
-         else
-           gtk_label_select_region (GTK_LABEL (window->focus_widget), 0, 0);
+          if (!gtk_label_get_current_uri (GTK_LABEL (window->focus_widget)))
+            gtk_label_select_region (GTK_LABEL (window->focus_widget), 0, 0);
        }
       while (TRUE);