SimpleList and CellRenderer tweaking


I have a problem with a Gtk2::SimpleList and some CellRenderer tweaking.
I want to make the font of the first three columns bold, if the fifth 
column of my list is true.

This is the corresponding code snippet:

    my $slist = Gtk2::SimpleList->new (
            "Nr"       => "int",
            "Artist"   => "text",
            "Album"    => "text",
            "Title"    => "text",
            "ids"      => "text",
            "playing"  => "bool",


    my $bold_cr = Gtk2::CellRendererText->new;
    $bold_cr->set ( weight => 700 );

    $slist->get_column($_)->add_attribute($bold_cr, weight_set => 5)
            for (0..3);

But I get only an assertion warning for the ->add_attribute(...) line:

  Gtk-CRITICAL **: file gtktreeviewcolumn.c: line 1359
    (gtk_tree_view_column_add_attribute): assertion `info != NULL'

I hope someone can delight me what I'm doing wrong here ;)



sub i($){print$_[0]}*j=*ENV;sub w($){sleep$_[0]}sub _($){i"$p:$c> ",w+01
,$_=$_[0],tr;i-za-h,;a-hi-z ;,i$_,w+01,i"\n"}$|=1;$f='HO';($c=$j{PWD})=~
"-zn,*",_"#,epg,lw,gwc,mfmkcbm,cvsvwev,uiqt,kwvbmvb?",i"$p:$c> ";w+1<<07

Attachment: pgp6vtlqXL8Zk.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]