aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-23 06:05:40 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-23 06:05:40 +0000
commit39bd2dbbda2d830673f527b6f32e93ce5e3331a1 (patch)
tree788d017c8311aa2db1b5b5241e3462da950e608e
parent2acc954ebc7cebfc8c1c20c169a5811d47b780a1 (diff)
downloadrpmdrake-39bd2dbbda2d830673f527b6f32e93ce5e3331a1.tar
rpmdrake-39bd2dbbda2d830673f527b6f32e93ce5e3331a1.tar.gz
rpmdrake-39bd2dbbda2d830673f527b6f32e93ce5e3331a1.tar.bz2
rpmdrake-39bd2dbbda2d830673f527b6f32e93ce5e3331a1.tar.xz
rpmdrake-39bd2dbbda2d830673f527b6f32e93ce5e3331a1.zip
(refresh_packages_list, run_treeview_dialog) use toggle() to handle
deps when toggling
-rwxr-xr-xMandrivaUpdate12
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 $>;