From 66138cdc6bbd973426a9345c78c8120d9b446670 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 11 Aug 2000 00:27:27 +0000 Subject: no_comment --- perl-install/install_steps_gtk.pm | 106 -------------------------------------- 1 file changed, 106 deletions(-) (limited to 'perl-install/install_steps_gtk.pm') diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 0e613a620..ac8188d8a 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -199,112 +199,6 @@ sub selectMouse { } } -#------------------------------------------------------------------------------ -sub doPartitionDisks { - my ($o, $hds, $raid) = @_; - - if ($o->{lnx4win}) { - eval { install_steps::doPartitionDisks(@_) }; - if ($@ =~ /no fat/) { - $o->ask_warn('', _("You don't have any windows partitions!")); - } elsif ($@ =~ /not enough room/) { - $o->ask_warn('', _("You don't have any enough room for Lnx4win")); - } else { return } -#- delete $o->{lnx4win}; - } - if ($::beginner && fsedit::is_one_big_fat($hds)) { - #- wizard - my $min_linux = 600 << 11; - my $max_linux = 1500 << 11; - my $min_freewin = 300 << 11; - - my ($part) = fsedit::get_fstab(@{$o->{hds}}); - my $w = $o->wait_message(_("Resizing"), _("Computing FAT filesystem bounds")); - my $resize_fat = eval { resize_fat::main->new($part->{device}, devices::make($part->{device})) }; - $@ and goto diskdrake; - my $min_win = $resize_fat->min_size; - if (!$@ && $part->{size} > $min_linux + $min_freewin + $min_win && $o->ask_okcancel('', -_("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 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}; - $hd->{isDirty} = $hd->{needKernelReread} = 1; - $part->{size} -= min($max_linux, $part->{size} - $min_win); - $hd->adjustEnd($part); - partition_table::adjust_local_extended($hd, $part); - partition_table::adjust_main_extended($hd); - - local *log::l = sub { $w->set(join(' ', @_)) }; - my $b = before_leaving { close $resize_fat->{fd} }; - eval { $resize_fat->resize($part->{size}) }; - if ($@) { - $part->{size} = $oldsize; - $o->ask_warn('', _("Automatic resizing failed")); - } else { - $part->{isFormatted} = 1; - eval { fsedit::auto_allocate($hds, $o->{partitions}) }; - if (!$@) { - partition_table::write($hd) unless $::testing; - return; - } - } - } - } - - diskdrake: - while (1) { - diskdrake::main($hds, $raid, interactive_gtk->new, $o->{partitions}); - if (!grep { isSwap($_) } fsedit::get_fstab(@{$o->{hds}})) { - if ($::beginner) { - $o->ask_warn('', _("You must have a swap partition")); - } elsif (!$::expert) { - $o->ask_okcancel('', _("You don't have a swap partition\n\nContinue anyway?")) and last; - } else { last } - } else { last } - } -} - -sub doPartitionDisksLnx4winDev { - my ($o, @l) = @_; - return $l[0] if $::beginner; - $o->ask_from_listf('', _("Which partition do you want to use to put Linux4Win?"), \&partition_table_raw::description, \@l); -} - -sub doPartitionDisksLnx4winSize { - my ($o, $root_size, $swap_size, $max_root_size, $max_swap_size) = @_; - return 1 if $::beginner; - - my $w = my_gtk->new(''); - - 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); - - gtkadd($w->{window}, - gtkpack(new Gtk::VBox(0,20), -_("Choose the sizes"), - create_packtable({}, - [ _("Root partition size in MB: "), $root_spin ], - [ undef, new Gtk::HScrollbar($root_adj) ], - [ _("Swap partition size in MB: "), $swap_spin ], - [ undef, new Gtk::HScrollbar($swap_adj) ], - ), - create_okcancel($w) - ), - ); - $w->{ok}->grab_focus; - $w->main(sub { - $$root_size = $root_spin->get_value_as_int << 11; - $$swap_size = $swap_spin->get_value_as_int << 11; - }); -} - #------------------------------------------------------------------------------ sub chooseSizeToInstall { my ($o, $packages, $min_size, $max_size_, $availableC, $individual) = @_; -- cgit v1.2.1