diff options
-rw-r--r-- | Rpmdrake/gui.pm | 4 | ||||
-rwxr-xr-x | rpmdrake | 1 |
2 files changed, 3 insertions, 2 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) @@ -168,7 +168,6 @@ sub run_treeview_dialog { $options = { build_tree => sub { build_tree($tree, $tree_model, \%elems, $options, $force_rebuild, $compssUsers, @_) }, - grep_unselected => sub { grep { exists $pkgs->{$_} && !$pkgs->{$_}{selected} } @_ }, partialsel_unsel => sub { my ($unsel, $sel) = @_; @$sel = grep { exists $pkgs->{$_} } @$sel; |