summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-04 14:17:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-04 14:17:15 +0000
commitf7bee8d26d4395332b6fdbf3722ae55c31e0238f (patch)
tree1ce4beb1715ca60f1fa22d45e5cc7b82d4aa3ad0 /perl-install/install_steps_gtk.pm
parenta8d2318343b50494f5d458ef89474ee5287f5302 (diff)
downloaddrakx-backup-do-not-use-f7bee8d26d4395332b6fdbf3722ae55c31e0238f.tar
drakx-backup-do-not-use-f7bee8d26d4395332b6fdbf3722ae55c31e0238f.tar.gz
drakx-backup-do-not-use-f7bee8d26d4395332b6fdbf3722ae55c31e0238f.tar.bz2
drakx-backup-do-not-use-f7bee8d26d4395332b6fdbf3722ae55c31e0238f.tar.xz
drakx-backup-do-not-use-f7bee8d26d4395332b6fdbf3722ae55c31e0238f.zip
no_comment
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r--perl-install/install_steps_gtk.pm57
1 files changed, 21 insertions, 36 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 06cc9809f..8aab6a083 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -259,8 +259,9 @@ sub doPartitionDisks($$) {
_("WARNING!
DrakX now needs to resize your Windows partition. Be careful: this operation is
-dangerous. If you have not already done so, you should first run scandisk (and
-optionally run defrag) on this partition and backup your data.
+dangerous. If you have not already done so, you should first exit the
+installation, run scandisk under Windows (and optionally run defrag), then
+restart the installation. You should also backup your data.
When sure, press Ok."))) {
my $hd = $hds->[0];
my $oldsize = $part->{size};
@@ -299,29 +300,18 @@ When sure, press Ok."))) {
}
#------------------------------------------------------------------------------
-sub choosePackages {
- my ($o, $packages, $compss, $compssUsers, $compssUsersSorted, $first_time) = @_;
-
- if ($::beginner) {
- require pkgs;
- pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, 1, install_any::getAvailableSpace($o) * 0.7, $o->{installClass}, $o->{isUpgrade});
- } else {
- install_steps_interactive::choosePackages(@_);
- chooseSizeToInstall(@_);
- choosePackagesTree(@_) if $::expert;
- }
-}
sub chooseSizeToInstall {
- my ($o, $packages, $compss, $compssUsers, $first_time) = @_;
- my $availableSpace = int(install_any::getAvailableSpace($o) / sqr(1024));
- my $current = pkgs::correctedSelectedSize($packages);
+ my ($o, $packages, $min_size, $max_size) = @_;
+ my ($min, $max) = map { pkgs::correctSize($_ / sqr(1024)) } $min_size, $max_size;
my $w = my_gtk->new('');
- my $adj = create_adjustment($current * 1.3, $current, $availableSpace);
+ my $adj = create_adjustment($max, $min, $max);
my $spin = gtkset_usize(new Gtk::SpinButton($adj, 0, 0), 100, 0);
gtkadd($w->{window},
gtkpack(new Gtk::VBox(0,20),
- _("Going to install %d MB. You can choose to install more programs", $current) .
+_("Now that you've selected desired groups, please choose
+how many packages you want, ranging from minimal to full
+installation of each selected groups.") .
($::expert ? "\n" . _("You will be able to choose more precisely in next step") : ''),
create_packtable({ col_spacings => 10 },
[ _("Choose the size you want to install"), $spin, _("MB"), ],
@@ -332,12 +322,7 @@ sub chooseSizeToInstall {
);
$spin->signal_connect(activate => sub { $w->{retval} = 1; Gtk->main_quit });
$spin->grab_focus();
- $w->main or return;
-
- ($o->{packages_}{ind}, $o->{packages_}{select_level}) =
- pkgs::setSelectedFromCompssList($o->{compssListLevels}, $o->{packages}, 1,
- pkgs::invCorrectSize($spin->get_value_as_int) * sqr(1024),
- $o->{installClass}, $o->{isUpgrade});
+ $w->main and pkgs::invCorrectSize($spin->get_value_as_int) * sqr(1024);
}
sub choosePackagesTree {
my ($o, $packages, $compss) = @_;
@@ -433,17 +418,17 @@ sub choosePackagesTree {
&$update();
});
- my $select_add = sub {
- my ($ind, $level) = @{$o->{packages_}}{"ind", "select_level"};
- $level = max(0, min(100, ($level + $_[0])));
- $o->{packages_}{select_level} = $level;
-
- pkgs::unselect_all($packages);
- foreach (pkgs::allpackages($packages)) {
- pkgs::select($packages, $_) if $_->{values}[$ind] >= $level;
- }
- &$update;
- };
+#- my $select_add = sub {
+#- my ($ind, $level) = @{$o->{packages_}}{"ind", "select_level"};
+#- $level = max(0, min(100, ($level + $_[0])));
+#- $o->{packages_}{select_level} = $level;
+#-
+#- pkgs::unselect_all($packages);
+#- foreach (pkgs::allpackages($packages)) {
+#- pkgs::select($packages, $_) if $_->{values}[$ind] >= $level;
+#- }
+#- &$update;
+#- };
my $show_add = sub {
my ($ind, $level) = @{$o->{packages_}}{"ind", "show_level"};