GNOME Bugzilla – Bug 603302
Incorrectly warn about links on text with color and underline
Last modified: 2009-11-29 22:20:46 UTC
Latest GTK emits a «Gtk-WARNING **: Ran out of links» on terminal when handling GtkLabel with an underline and coloured. This behavior was encountered in uzbl and could leave people a bit puzzled. Here it is a minimal test-case: #include <gtk/gtk.h> int main( int argc, char *argv[] ) { GtkWidget *label, *window; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); label = gtk_label_new ("<span foreground=\"red\" underline=\"single\"> This text doesn't contain links</span>"); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_label_set_selectable (GTK_LABEL (label), TRUE); gtk_container_add (GTK_CONTAINER (window), label); gtk_widget_show (label); gtk_widget_show (window); gtk_main (); return 0; } Compiled and executed lead to quoted warning: lucab@thetis:~$ gcc `pkg-config --libs --cflags gtk+-2.0` -Wall links_ranout-gtk.c -o gtk-testcase lucab@thetis:~$ ./gtk-testcase (gtk-testcase:10934): Gtk-WARNING **: Ran out of links ^C I hope to have a bit of free time soon, to prepare a little patch for it (not assured :).