diff options
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r-- | perl-install/ugtk2.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 2384ab19a..3d3027064 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -1173,11 +1173,23 @@ sub ask_browse_tree_info_given_widgets { foreach my $node (@{$ptree{$_}}) { my $category; my $parent = $node; + my @parents; while ($parent = $w->{tree_model}->iter_parent($parent)) { #- LEAKS my $parent_name = $w->{tree_model}->get($parent, 0); $category = $category ? "$parent_name|$category" : $parent_name; + $_->[1] = "$parent_name|$_->[1]" foreach @parents; + push @parents, [ $parent, $category ]; + } + if ($category =~ /^\Q$cat/) { + push @to_remove, $node; + foreach (@parents) { + next if $_->[1] eq $cat || !exists $wtree{$_->[1]}; + delete $wtree{$_->[1]}; + delete $node_state{$w->{tree_model}->get_path_str($_->[0])}; + delete $state_stats{$w->{tree_model}->get_path_str($_->[0])}; + $_->[0]->free; + } } - $cat eq $category and push @to_remove, $node; } foreach (@to_remove) { delete $node_state{$w->{tree_model}->get_path_str($_)}; |