aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-07-01 15:45:50 +0000
committerThierry Vignaud <tv@mandriva.org>2008-07-01 15:45:50 +0000
commiteedf6ccdfc63ae1fecf067ac9af3efc602cd0f2a (patch)
tree3b9f64b65665efa04ab3458ca6a857febe4b1a7b /Rpmdrake
parent32efb7122901cd05f79917a61db5994db8c948b7 (diff)
downloadrpmdrake-eedf6ccdfc63ae1fecf067ac9af3efc602cd0f2a.tar
rpmdrake-eedf6ccdfc63ae1fecf067ac9af3efc602cd0f2a.tar.gz
rpmdrake-eedf6ccdfc63ae1fecf067ac9af3efc602cd0f2a.tar.bz2
rpmdrake-eedf6ccdfc63ae1fecf067ac9af3efc602cd0f2a.tar.xz
rpmdrake-eedf6ccdfc63ae1fecf067ac9af3efc602cd0f2a.zip
(delete_category) simplify code by removing old useless code dating back from 1992
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/gui.pm24
1 files changed, 2 insertions, 22 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index 7dc012fb..e5b944e7 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -421,28 +421,8 @@ sub ask_browse_tree_given_widgets_for_rpmdrake {
$common->{delete_category} = sub {
my ($cat) = @_;
exists $wtree{$cat} or return;
- foreach (keys %ptree) {
- my @to_remove;
- 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, $grp_columns{label});
- $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]};
- }
- }
- }
- @{$ptree{$_}} = difference2($ptree{$_}, \@to_remove);
- }
+ %ptree = ();
+
if (exists $wtree{$cat}) {
my $_iter_str = $w->{tree_model}->get_path_str($wtree{$cat});
$w->{tree_model}->remove($wtree{$cat});