From ed76955e239d467e996ea3d20e8ae14c13db0253 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 23 Mar 2000 17:30:36 +0000 Subject: no_comment --- perl-install/ChangeLog | 11 +++++++++++ perl-install/c/stuff.xs.pm | 5 ++--- perl-install/install_steps_gtk.pm | 27 ++++++++++++++++++++++++++- perl-install/install_steps_interactive.pm | 8 +++----- perl-install/install_steps_newt.pm | 22 ++++++++++++++++++++-- perl-install/mouse.pm | 2 +- perl-install/pkgs.pm | 2 +- 7 files changed, 64 insertions(+), 13 deletions(-) (limited to 'perl-install') diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index d828ede61..b9b7c0cad 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,14 @@ +2000-03-23 Pixel + + * install_steps_gtk.pm (selectMouse): added, takes care of telling + the X server if the user changed the mouse type. Only done if + a serial mouse is chosen. + + * install_steps_newt.pm (doPartitionDisks): add a call to + + * mouse.pm (write): added "device=" in etc/sysconfig/mouse for + devfs (it looses the symlink /dev/mouse) + 2000-03-22 Pixel * pci_probing/pcitable: replace Server:Rage128 by proper XFree entry diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index d8395dc66..6b1fdd732 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -80,16 +80,15 @@ Xtest(display) RETVAL void -setMouse(display, type) +setMouseMicrosoft(display) char *display - int type CODE: { XF86MiscMouseSettings mseinfo; Display *d = XOpenDisplay(display); if (d) { if (XF86MiscGetMouseSettings(d, &mseinfo) == True) { - mseinfo.type = type; + mseinfo.type = MTYPE_MICROSOFT; mseinfo.flags = 128; XF86MiscSetMouseSettings(d, &mseinfo); XFlush(d); diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index b7ce8b00c..33b5997de 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -257,6 +257,21 @@ sub selectLanguage { install_theme($o); } +#------------------------------------------------------------------------------ +sub selectMouse { + my ($o, $force) = @_; + my $old_dev = $o->{mouse}{device}; + $o->SUPER::selectMouse($force); + + my $dev = $o->{mouse}{device}; + if ($old_dev ne $dev && $dev =~ /ttyS/) { + log::l("telling X server to use another mouse"); + eval { commands::modprobe("serial") }; + symlinkf($dev, "/dev/mouse"); + c::setMouseMicrosoft($ENV{DISPLAY}); + } +} + #------------------------------------------------------------------------------ sub doPartitionDisks($$) { my ($o, $hds, $raid) = @_; @@ -494,6 +509,10 @@ sub installPackages { ), $text, $progress_total, + '', + gtkadd(create_hbox(), + gtksignal_connect(new Gtk::Button(_("Cancel")), + clicked => sub { $pkgs::cancel_install = 1 })), ))); $msg->set(_("Preparing installation")); $w->sync; @@ -563,6 +582,10 @@ _("There was an error ordering packages:"), $1, _("Go on anyway?") ], 1) and ret } 0; }; + if ($pkgs::cancel_install) { + $pkgs::cancel_install = 0; + die "setstep choosePackages\n"; + } $w->destroy; } @@ -773,6 +796,8 @@ sub init_sizes() { sub createXconf($$$) { my ($file, $mouse_type, $mouse_dev, $wacom_dev) = @_; + symlinkf($mouse_dev, "/dev/mouse"); + my $wacom; if ($wacom_dev) { $wacom_dev = devices::make($wacom_dev); @@ -835,7 +860,7 @@ EndSection Section "Pointer" Protocol "$mouse_type" - Device "/dev/$mouse_dev" + Device "/dev/mouse" Emulate3Buttons Emulate3Timeout 50 EndSection diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index e736afb74..beb193878 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -137,10 +137,8 @@ sub selectInstallClass($@) { sub selectMouse { my ($o, $force) = @_; - my $name = $o->{mouse}{FULLNAME}; - if (!$name || $::expert || $force) { - $name ||= "Generic Mouse (serial)"; - $name = $o->ask_from_list_('', _("What is the type of your mouse?"), [ mouse::names() ], $name); + if ($o->{mouse}{unsafe} || !$::beginner || $force) { + my $name = $o->ask_from_list_('', _("What is the type of your mouse?"), [ mouse::names() ], $o->{mouse}{FULLNAME}); $o->{mouse} = mouse::name2mouse($name); } $o->{mouse}{XEMU3} = 'yes' if $o->{mouse}{nbuttons} < 3; #- if $o->{mouse}{nbuttons} < 3 && $o->ask_yesorno('', _("Emulate third button?"), 1); @@ -279,7 +277,7 @@ _("You need %dMB for a full install of the groups you selected. You can go on anyway, but be warned that you won't get all packages", $max_size / sqr(1024)), 1) or goto &choosePackages } - my $size2install = $::beginner ? $available * 0.7 : $o->chooseSizeToInstall($packages, $min_size, min($max_size, $available * 0.9)) or goto &choosePackages; + my $size2install = $::beginner && $first_time ? $available * 0.7 : $o->chooseSizeToInstall($packages, $min_size, min($max_size, $available * 0.9)) or goto &choosePackages; ($o->{packages_}{ind}) = pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, 1, $size2install, $o->{installClass}); diff --git a/perl-install/install_steps_newt.pm b/perl-install/install_steps_newt.pm index b35d47e9d..015de1c05 100644 --- a/perl-install/install_steps_newt.pm +++ b/perl-install/install_steps_newt.pm @@ -11,6 +11,8 @@ use vars qw(@ISA); #-###################################################################################### use install_steps_interactive; use interactive_newt; +use install_any; +use devices; use common qw(:common); my $banner = __(); @@ -29,11 +31,27 @@ sub new($$) { banner(''); Newt::PushHelpLine(_(" / between elements | selects | next screen ")); - $o->{partitioning}{readonly} = 1; #- needed til diskdrake is graphic only... - (bless {}, ref $type || $type)->SUPER::new($o); } +sub doPartitionDisks($$) { + my ($o, $hds, $raid) = @_; + + Newt::Suspend(); + foreach (@$hds) { + print +_("You can now partition your %s hard drive +When you are done, don't forget to save using `w'", $_->{device}); + print "\n\n"; + my $pid = fork or exec "fdisk", devices::make($_->{device}); + waitpid($pid, 0); + } + Newt::Resume(); + + install_any::getHds($o); + $o->ask_mntpoint_s($o->{fstab}); +} + sub enteringStep { my ($o, $step) = @_; $o->SUPER::enteringStep($step); diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index 0e8c18d7e..5bb5b5e8b 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -93,7 +93,7 @@ sub read($) { sub write($;$) { my ($prefix, $mouse) = @_; local $mouse->{FULLNAME} = qq("$mouse->{FULLNAME}"); - setVarsInSh("$prefix/etc/sysconfig/mouse", $mouse, qw(MOUSETYPE XMOUSETYPE FULLNAME XEMU3)); + setVarsInSh("$prefix/etc/sysconfig/mouse", $mouse, qw(MOUSETYPE XMOUSETYPE FULLNAME XEMU3 device)); symlinkf $mouse->{device}, "$prefix/dev/mouse" or log::l("creating $prefix/dev/mouse symlink failed"); } diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 0f8a5bd52..3be8ece68 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -821,7 +821,7 @@ sub install($$$;$$) { c::rpmdbClose($db); die "installation of rpms failed:\n ", join("\n ", @probs); } - } while ($nb > 0); + } while ($nb > 0 && !$pkgs::cancel_install); c::rpmdbClose($db); log::l("rpm database closed"); -- cgit v1.2.1