summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-09-12 21:33:34 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-09-12 21:33:34 +0000
commit32a2e8da9e14337df3c797a07ba16e1d232bb9ad (patch)
treed583389f8722f8833c419c1bd5b1e7bf8c18ea24
parent4e7970e8c3429dfe2474a1c2caf9d0c5760be4d2 (diff)
downloaddrakx-32a2e8da9e14337df3c797a07ba16e1d232bb9ad.tar
drakx-32a2e8da9e14337df3c797a07ba16e1d232bb9ad.tar.gz
drakx-32a2e8da9e14337df3c797a07ba16e1d232bb9ad.tar.bz2
drakx-32a2e8da9e14337df3c797a07ba16e1d232bb9ad.tar.xz
drakx-32a2e8da9e14337df3c797a07ba16e1d232bb9ad.zip
no_comment
-rw-r--r--perl-install/install_gtk.pm11
-rw-r--r--perl-install/mouse.pm2
-rw-r--r--perl-install/my_gtk.pm2
3 files changed, 7 insertions, 8 deletions
diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm
index 8d45d0c19..7f1717f54 100644
--- a/perl-install/install_gtk.pm
+++ b/perl-install/install_gtk.pm
@@ -386,12 +386,11 @@ sub test_mouse {
};
my $paintWheel = sub {
my ($x, $y, $w, $h) = ($width / 2 - $bw / 6, $bh / 4, $bw / 3, $bh / 2);
-
- my $offset = 0 if 0;
- $offset += $_[0] if $_[0];
-
+ $mouse->{nbuttons} = max($mouse->{nbuttons}, 5); #- it means, the mouse has more than 3 buttons...
$draw_rect->(1, 0, [ $x, $y, $w, $h ]);
+ my $offset = 0 if 0;
+ $offset += $_[0] if $_[0];
my $step = 10;
for (my $i = $offset % $step; $i < $h; $i += $step) {
$draw_rect->(1, 1, [ $x, $y + $i, $w, min(2, $h - $i) ]);
@@ -407,7 +406,7 @@ sub test_mouse {
my ($t, $y) = @_;
my $font = $darea->style->font;
my $w = $font->string_width($t);
- $darea->window->draw_string($font, $darea->style->black_gc, ($width - $w) / 2, $y, $t);
+ $darea->window->draw_string($font, $darea->style->fg_gc('normal'), ($width - $w) / 2, $y, $t);
};
$darea->signal_connect(button_press_event => sub {
my $b = $_[1]{button};
@@ -425,7 +424,7 @@ sub test_mouse {
$w->sync; # HACK
$draw_rect->(0, 1, [ 0, 0, $width, $height]);
$draw_text->(_("Please test the mouse"), 2 * $bh - 20);
- $draw_text->(_("Move your wheel"), 2 * $bh);# if 1 && $mouse->{XMOUSETYPE} eq 'IMPS/2';
+ $draw_text->(_("Move your wheel"), 2 * $bh) if $mouse->{XMOUSETYPE} eq 'IMPS/2';
$paintButton->($_, 0) foreach 0..2;
$w->main;
}
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index c011519ff..0cd66164e 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -42,7 +42,7 @@ arch() =~ /^sparc/ ? (
[ 2, "inportbm", "Busmouse", "BusMouse", __("Microsoft Bus Mouse") ],
[ 3, "logibm", "Busmouse", "BusMouse", __("Logitech Bus Mouse") ],
[ 2, "usbmouse", "ps/2", "PS/2", __("USB Mouse") ],
- [ 3, "usbmouse", "ps/2", "IMPS/2", __("USB Mouse (3 buttons or more)") ],
+ [ 5, "usbmouse", "ps/2", "IMPS/2", __("USB Mouse (3 buttons or more)") ],
),
[ 0, "none", "none", "Microsoft", __("No Mouse") ],
[ 2, "ttyS", "pnp", "Auto", __("Microsoft Rev 2.1A or higher (serial)") ],
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 800777f7b..dad17459a 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -238,7 +238,7 @@ sub create_okcancel {
my $b2 = !$one && gtksignal_connect(new Gtk::Button($cancel || _("Cancel")), "clicked" => $w->{cancel_clicked} || sub { $w->{retval} = 0; Gtk->main_quit });
my @l = grep { $_ } $::isStandalone ? ($b2, $b1) : ($b1, $b2);
- $_->can_default(1) foreach @l;
+ $_->can_default($::isStandalone) foreach @l;
gtkadd(create_hbox($spread), @l);
}