diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-03-20 13:00:47 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-03-20 13:00:47 +0000 |
commit | 06405b49e1161fc45a8a8547a083909d74eb53d8 (patch) | |
tree | 3c8815b1e183c3655248e2d0435a53d84b0a8525 /Rpmdrake | |
parent | 3577d8ff7d5b23cff0dd7d9fc385dafd65a6d51c (diff) | |
download | rpmdrake-06405b49e1161fc45a8a8547a083909d74eb53d8.tar rpmdrake-06405b49e1161fc45a8a8547a083909d74eb53d8.tar.gz rpmdrake-06405b49e1161fc45a8a8547a083909d74eb53d8.tar.bz2 rpmdrake-06405b49e1161fc45a8a8547a083909d74eb53d8.tar.xz rpmdrake-06405b49e1161fc45a8a8547a083909d74eb53d8.zip |
(build_tree) fix sorting in "by_source" view by reusing _build_tree()
Diffstat (limited to 'Rpmdrake')
-rw-r--r-- | Rpmdrake/gui.pm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index 7bafd9e3..bc893740 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -867,12 +867,9 @@ or you already installed all of them.")); add_node($_->[0], N("All")) foreach $sortmethods{flat}->(@elems); $tree->expand_row($tree_model->get_path($tree_model->get_iter_first), 0); } elsif ($::mode->[0] eq 'by_source') { - my @list = $sortmethods{by_medium}->(map { + _build_tree($elems, $sortmethods{by_medium}->(map { my $m = pkg2medium($pkgs->{$_->[0]}{pkg}, $urpm); [ $_->[0], $m->{name}, $m->{priority} ]; - } @elems); - add_parent($_) foreach uniq(map { $_->[1] } @list); - add_node($_->[0], $_->[1]) foreach @list; - } elsif ($mode eq 'by_presence') { + } @elems)); add_node( $_->[0], $pkgs->{$_->[0]}{pkg}->flag_installed && !$pkgs->{$_->[0]}{pkg}->flag_skip ? N("Upgradable") : N("Addable") |