diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-07-05 15:35:17 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-07-05 15:35:17 +0000 |
commit | c03b88dad7a4a486fce6f6ebdfaf1c0c79a9e732 (patch) | |
tree | 81b12d4d6429c70b0933e49c6b2e79f52d309927 /Rpmdrake/gui.pm | |
parent | d3b70bccf3df57eb7185e30de0cdbac8f5eeaec5 (diff) | |
download | rpmdrake-c03b88dad7a4a486fce6f6ebdfaf1c0c79a9e732.tar rpmdrake-c03b88dad7a4a486fce6f6ebdfaf1c0c79a9e732.tar.gz rpmdrake-c03b88dad7a4a486fce6f6ebdfaf1c0c79a9e732.tar.bz2 rpmdrake-c03b88dad7a4a486fce6f6ebdfaf1c0c79a9e732.tar.xz rpmdrake-c03b88dad7a4a486fce6f6ebdfaf1c0c79a9e732.zip |
(grep_unselected) make a function out of it
Diffstat (limited to 'Rpmdrake/gui.pm')
-rw-r--r-- | Rpmdrake/gui.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index 7892195f..e8b4143f 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -195,6 +195,8 @@ sub set_leaf_state { set_node_state($_, $state, $model) foreach @{$ptree{$leaf}}; } +sub grep_unselected { grep { exists $pkgs->{$_} && !$pkgs->{$_}{selected} } @_ } + sub add_parent { my ($root, $state) = @_; $root or return undef; @@ -330,7 +332,7 @@ sub ask_browse_tree_given_widgets_for_rpmdrake { my ($_val) = @_; my @l = $children->() or return; - my @unsel = $common->{grep_unselected}(@l); + my @unsel = grep_unselected(@l); my @p = @unsel ? #- not all is selected, select all if no option to potentially override (exists $common->{partialsel_unsel} && $common->{partialsel_unsel}->(\@unsel, \@l) ? difference2(\@l, \@unsel) : @unsel) |