diff options
author | Francois Pons <fpons@mandriva.com> | 2000-11-28 10:43:11 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-11-28 10:43:11 +0000 |
commit | 3351ac83fb817b8418c6200b00758f136266073c (patch) | |
tree | 9e513429981ac5b489ab17443f0068b3bcd6051f | |
parent | 72c234234a17b1e10cc4c042ad7609a10ce3817d (diff) | |
download | drakx-3351ac83fb817b8418c6200b00758f136266073c.tar drakx-3351ac83fb817b8418c6200b00758f136266073c.tar.gz drakx-3351ac83fb817b8418c6200b00758f136266073c.tar.bz2 drakx-3351ac83fb817b8418c6200b00758f136266073c.tar.xz drakx-3351ac83fb817b8418c6200b00758f136266073c.zip |
extended chooseSizeToInstall.
-rw-r--r-- | perl-install/install_steps_gtk.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index ee8d7a2c3..5b50b75a8 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -195,17 +195,18 @@ sub selectMouse { #------------------------------------------------------------------------------ sub chooseSizeToInstall { - my ($o, $packages, $min_size, $max_size_, $availableC, $individual) = @_; + my ($o, $packages, $min_size, $def_size, $max_size_, $availableC, $individual) = @_; my $max_size = min($max_size_, $availableC); my $enough = $max_size == $max_size_; my $percentage = int 100 * $max_size / $max_size_; #- don't ask anything if the difference between min and max is too small + log::l("chooseSizeToInstall: min_size=$min_size, def_size=$def_size, max_size=$max_size_, available=$availableC"); return $max_size if $min_size && $max_size / $min_size < 1.05; log::l("choosing size to install between $min_size and $max_size"); my $w = my_gtk->new(''); - my $adj = create_adjustment($percentage, $min_size * 100 / $max_size_, $percentage); + my $adj = create_adjustment(int(100 * $def_size / $max_size_), $min_size * 100 / $max_size_, $percentage); my $spin = gtkset_usize(new Gtk::SpinButton($adj, 0, 0), 20, 0); my $val; |