diff options
author | Francois Pons <fpons@mandriva.com> | 2000-05-10 09:32:40 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-05-10 09:32:40 +0000 |
commit | c527ad307cb3ec2a2387c95a75426b8264e8fb8b (patch) | |
tree | b9a48c3e53b2a28e8515fee5e1252e34b40d4bd1 /perl-install/install_steps_gtk.pm | |
parent | 4a00b194113f7b319aec83d633a0c56dac11c83a (diff) | |
download | drakx-backup-do-not-use-c527ad307cb3ec2a2387c95a75426b8264e8fb8b.tar drakx-backup-do-not-use-c527ad307cb3ec2a2387c95a75426b8264e8fb8b.tar.gz drakx-backup-do-not-use-c527ad307cb3ec2a2387c95a75426b8264e8fb8b.tar.bz2 drakx-backup-do-not-use-c527ad307cb3ec2a2387c95a75426b8264e8fb8b.tar.xz drakx-backup-do-not-use-c527ad307cb3ec2a2387c95a75426b8264e8fb8b.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r-- | perl-install/install_steps_gtk.pm | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 4af5df6da..715b96f27 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -270,8 +270,8 @@ sub doPartitionDisksLnx4winSize { my $w = my_gtk->new(''); - my $root_adj = create_adjustment($max_root_size >> 11, 1, $$root_size >> 11); - my $swap_adj = create_adjustment($max_swap_size >> 11, 1, $$swap_size >> 11); + my $root_adj = create_adjustment($max_root_size >> 11, 250, $$root_size >> 11); + my $swap_adj = create_adjustment($max_swap_size >> 11, 32, $$swap_size >> 11); my $root_spin = new Gtk::SpinButton($root_adj, 0, 0); my $swap_spin = new Gtk::SpinButton($swap_adj, 0, 0); @@ -453,7 +453,7 @@ sub choosePackagesTree { }; my $update_size = sub { - my $size = pkgs::selectedSize(); + my $size = pkgs::selectedSize($packages); $w_size->set(_("Total size: %d / %d MB", pkgs::correctSize($size / sqr(1024)), install_any::getAvailableSpace($o) / sqr(1024))); @@ -476,8 +476,19 @@ sub choosePackagesTree { return $o->ask_warn('', _("You can't unselect this package. It must be upgraded")); } } + pkgs::togglePackageSelection($packages, $p, my $l = {}); if (my @l = grep { $l->{$_} } keys %$l) { + #- check for size before trying to select. + my $size = pkgs::selectedSize($packages); + foreach (@l) { + my $p = $packages->[0]{$_}; + pkgs::packageFlagSelected($p) or $size += pkgs::packageSize($p); + } + if (pkgs::correctSize($size / sqr(1024)) > install_any::getAvailableSpace($o) / sqr(1024)) { + return $o->ask_warn('', _("You can't select this package as there is not enough space left to install it")); + } + @l > 1 && !$auto_deps and $o->ask_okcancel('', [ _("The following packages are going to be installed/removed"), join(", ", sort @l) ], 1) || return; pkgs::togglePackageSelection($packages, $p); foreach (@l) { |