--- tree_mark_cell-0.02-orig.pl 2005-02-18 00:59:48.000000000 -0500 +++ tree_mark_cell-0.02.pl 2005-02-18 01:17:40.000000000 -0500 @@ -135,6 +135,9 @@ my $model = $tree_view->get_model; my $iter = $model->get_iter ($path); + my @indices = $path->get_indices(); + return 0 if @indices == 1; # do nothing because we're the parent row? + # Change the background of all cells in the clicked row my $color = undef; @@ -187,6 +190,8 @@ sub test_color { my ($model, $path, $iter, $user_data) = @_; + my @indices = $path->get_indices(); + return 0 if @indices == 1; # keep walking the tree my $i = $user_data->{column}->{column_number}; my $color = $model->get($iter, $i*2+1); if ($color) { # Atleast one of the cells is colored. Stop walking the tree. @@ -199,6 +204,8 @@ sub set_color { my ($model, $path, $iter, $user_data) = @_; + my @indices = $path->get_indices(); + return FALSE if @indices == 1; # skip parent nodes my $i = $user_data->{column}->{column_number}; $model->set($iter, $i*2+1, $user_data->{color}); add_or_remove_from_cache($user_data->{color}, $model, $path, $i); @@ -218,6 +225,9 @@ toggle_mark_entire_row($path); return 0; } + + my @indices = $path->get_indices(); + return 0 if @indices == 1; # don't green the parent row my $iter = $model->get_iter ($path);