diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-12-19 01:45:46 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-12-19 01:45:46 +0000 |
commit | ef3ce36c2a0e4f385c65ca6223ba4c5c4e86e122 (patch) | |
tree | a2c4f3f4d6f5bd558c64aa4fcf768fecf755b939 /perl-install/install_steps_gtk.pm | |
parent | ffbb1c226e9a3a8932646947a2e191089a195fc0 (diff) | |
download | drakx-ef3ce36c2a0e4f385c65ca6223ba4c5c4e86e122.tar drakx-ef3ce36c2a0e4f385c65ca6223ba4c5c4e86e122.tar.gz drakx-ef3ce36c2a0e4f385c65ca6223ba4c5c4e86e122.tar.bz2 drakx-ef3ce36c2a0e4f385c65ca6223ba4c5c4e86e122.tar.xz drakx-ef3ce36c2a0e4f385c65ca6223ba4c5c4e86e122.zip |
no_comment
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r-- | perl-install/install_steps_gtk.pm | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index f6032533d..f48221efa 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -13,7 +13,7 @@ use common qw(:common :file :functional :system); use partition_table qw(:types); use my_gtk qw(:helpers :wrappers); use Gtk; -use Gtk::XmHTML; +#use Gtk::XmHTML; use devices; use fsedit; use modules; @@ -300,12 +300,13 @@ When sure, press Ok."))) { #------------------------------------------------------------------------------ sub choosePackages { my ($o, $packages, $compss, $compssUsers, $compssUsersSorted, $first_time) = @_; + my $size = install_any::getAvailableSpace($o) * 0.7; if ($::beginner) { require pkgs; - pkgs::setSelectedFromCompssList_($o->{compssListLevels}, $o->{packages}, install_any::getAvailableSpace($o) * 0.7, $o->{installClass}, $o->{isUpgrade}); + pkgs::setSelectedFromCompssList($o->{compssListLevels}, $o->{packages}, 1, $size, $o->{installClass}, $o->{isUpgrade}); } else { - pkgs::setSelectedFromCompssList($o->{compssListLevels}, $o->{packages}, 90, $o->{installClass}) unless $::expert || $o->{isUpgrade}; + pkgs::setSelectedFromCompssList($o->{compssListLevels}, $o->{packages}, $::expert ? 95 : 80, $size, $o->{installClass}) unless $::expert || $o->{isUpgrade}; install_steps_interactive::choosePackages(@_); chooseSizeToInstall(@_); choosePackagesTree(@_) if $::expert; @@ -316,7 +317,7 @@ sub chooseSizeToInstall { my $availableSpace = int(install_any::getAvailableSpace($o) / sqr(1024)); my $current = pkgs::correctSize((sum map { $_->{size} } grep { $_->{selected} } values %$packages) / sqr(1024)); my $w = my_gtk->new(''); - my $adj = create_adjustment($current * 1.2, $current, $availableSpace); + my $adj = create_adjustment($current * 1.3, $current, $availableSpace); my $spin = gtkset_usize(new Gtk::SpinButton($adj, 0, 0), 100, 0); gtkadd($w->{window}, @@ -335,9 +336,9 @@ sub chooseSizeToInstall { $w->main or return; ($o->{packages_}{ind}, $o->{packages_}{select_level}) = - pkgs::setSelectedFromCompssList_($o->{compssListLevels}, $o->{packages}, - pkgs::invCorrectSize($spin->get_value_as_int) * sqr(1024), - $o->{installClass}, $o->{isUpgrade}); + pkgs::setSelectedFromCompssList($o->{compssListLevels}, $o->{packages}, 0, + pkgs::invCorrectSize($spin->get_value_as_int) * sqr(1024), + $o->{installClass}, $o->{isUpgrade}); } sub choosePackagesTree { my ($o, $packages, $compss) = @_; @@ -556,7 +557,7 @@ sub installPackages { $nb = $_[0]; $total_size = $_[1]; $current_total_size = 0; $start_time = time(); - $msg->set(_("%d packages", $nb) . _(", %U MB", $total_size / 1024 / 1024)); + $msg->set(_("%d packages", $nb) . _(", %U MB", pkgs::correctSize($total_size / sqr(1024)))); $w->flush; } elsif ($m =~ /^Starting installing package/) { $progress->update(0); @@ -673,7 +674,7 @@ sub create_help_window { #- my @pixmap = Gtk::Gdk::Pixmap->create_from_xpm_d($w->{window}->window, undef, @l); #- gtkadd($b, new Gtk::Pixmap(@pixmap)); - Gtk::XmHTML->init; +# Gtk::XmHTML->init; gtkadd($w->{window}, gtkpack_(new Gtk::HBox(0,-2), #- 0, $b, |