diff options
author | Thierry Vignaud <tv@mandriva.org> | 2006-11-27 18:30:38 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2006-11-27 18:30:38 +0000 |
commit | 87bf3c13646386ed10f756006b345bd22ae22019 (patch) | |
tree | bee6472dac3675e90deba27f8a7d02dc5f2da38b | |
parent | e671ebc69f87fb53dcf50f8f8f0ac5d5d5744567 (diff) | |
download | rpmdrake-87bf3c13646386ed10f756006b345bd22ae22019.tar rpmdrake-87bf3c13646386ed10f756006b345bd22ae22019.tar.gz rpmdrake-87bf3c13646386ed10f756006b345bd22ae22019.tar.bz2 rpmdrake-87bf3c13646386ed10f756006b345bd22ae22019.tar.xz rpmdrake-87bf3c13646386ed10f756006b345bd22ae22019.zip |
set the initial selection for updates (#25271)
-rwxr-xr-x | rpmdrake | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -762,7 +762,7 @@ sub format_pkg_info { sub run_treeview_dialog { my ($callback_action) = @_; my ($urpm, $pkgs, $descriptions); - my (%filter_methods, $force_displaying_group); + my (%filter_methods, $force_displaying_group, @initial_selection, $initial_selection_done); my $switch_pkg_list_mode = sub { my ($mode) = @_; return if !$mode; @@ -789,6 +789,11 @@ sub run_treeview_dialog { #security => sub { $pkgs = }, #normal => sub { $pkgs = } ); + if (!$initial_selection_done) { + $filter_methods{all}->(); + @initial_selection = grep { $pkgs->{$_}{selected} } keys %$pkgs; + $initial_selection_done = 1; + } foreach my $importance (qw(bugfix security normal)) { $filter_methods{$importance} = sub { $pkgs = $h->{updates}; @@ -1119,7 +1124,7 @@ or you already installed all of them.")); rebuild_tree => sub {}, }; - if (my @initial_selection = grep { $pkgs->{$_}{selected} } keys %$pkgs) { + if (@initial_selection) { $options->{initial_selection} = \@initial_selection; $pkgs->{$_}{selected} = 0 foreach @initial_selection; } |