diff options
-rwxr-xr-x | MandrivaUpdate | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/MandrivaUpdate b/MandrivaUpdate index 2657cb73..7fa94e9f 100755 --- a/MandrivaUpdate +++ b/MandrivaUpdate @@ -59,7 +59,16 @@ sub refresh_packages_list { # select packages to update: my @requested = sort @filtered_pkgs; + # don't select kernel*-latest by default and the kernels they require: + if (!$initialized) { + $pkgs->{$_}{selected} = 0 foreach @requested; + toggle($list, grep { !$pkgs->{$_}{pkg}->flag_skip } @requested); + $initialized = 1; + } + + my $i; @{$list->{data}} = map { + $data{$_} = $i++; [ $pkgs->{$_}{selected}, join("\n", "<b>$_</b>", translate(rpm_summary($pkgs->{$_}{pkg}->summary))) ]; } grep { $pkgs->{$_}{pkg} } @requested; gtktext_insert($info, @@ -187,8 +196,7 @@ sub run_treeview_dialog { my ($cell, $text_path) = @_; my ($val, $name) = @{$list->{data}[$text_path]}; $name = get_name($name); - $pkgs->{$name}{selected} = to_bool($val); - $pkgs->{$name}{pkg}->set_flag_required($val); + toggle($list, $name); }); $action_button->set_sensitive(0) if $>; |