Gtktree bug?



Hi all,

I have a small program, which not only hangs, but it even freezes my X!

If you want to try it, start it and then select 'two' in the tree ('one'
is selected initially).

Your X will freeze. If you kill the program from console, your X will
back.

But what is the problem with this so little script?

Please do help if you can, I would really appreciate it.

Here comes the code:

------------->
#!/usr/bin/perl

use strict;
use warnings;
use diagnostics;

use Gtk;

init Gtk;

my $gtktree = new Gtk::CTree(1,0);
$gtktree->set_selection_mode('browse');
$gtktree->insert_node( undef, undef, [ "one" ], 5, undef, undef, undef, undef, 0, 0 );
$gtktree->insert_node( undef, undef, [ "two" ], 5, undef, undef, undef, undef, 0, 0 );
$gtktree->signal_connect("tree_select_row","on_tree_select_row");
$gtktree->show;

my $w = new Gtk::Window;
$w->add($gtktree);
$w->show;

main Gtk;

sub on_tree_select_row {
        print "on_tree_select_row\n";
        my ($widget, $node) = @_;

        $gtktree->set_sensitive(0);
        $gtktree->set_sensitive(1);
        print "RETURN\n";
}
__END__
<---------------------

Thanks,
-- 
Balazs Pozsar.




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