After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 603302 - Incorrectly warn about links on text with color and underline
Incorrectly warn about links on text with color and underline
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkLabel
2.18.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-11-29 15:10 UTC by Luca Bruno
Modified: 2009-11-29 22:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Luca Bruno 2009-11-29 15:10:34 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 :).