summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2000-08-17 17:14:37 +0000
committerdamien <damien@mandriva.com>2000-08-17 17:14:37 +0000
commit3377c0484dc1c239d979bf8112dfeaaae868ca3f (patch)
treeef5f2c2980fe8094dfbe222454cebb7fe3b9dbb8 /perl-install
parent9c164312d4bfff6d93e1c4529de6b992f2bebc44 (diff)
downloaddrakx-3377c0484dc1c239d979bf8112dfeaaae868ca3f.tar
drakx-3377c0484dc1c239d979bf8112dfeaaae868ca3f.tar.gz
drakx-3377c0484dc1c239d979bf8112dfeaaae868ca3f.tar.bz2
drakx-3377c0484dc1c239d979bf8112dfeaaae868ca3f.tar.xz
drakx-3377c0484dc1c239d979bf8112dfeaaae868ca3f.zip
corrected button_leave when not on the button
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_steps_gtk.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index ac8188d8a..8d639f105 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -663,10 +663,11 @@ sub create_steps_window {
my $step_name = $_;
my $step = $o->{steps}{$_};
my $darea = new Gtk::DrawingArea;
+ my $in_button;
my $draw_pix = sub {
my $pixmap = Gtk::Gdk::Pixmap->create_from_xpm($darea->window,
$darea->style->bg('normal'),
- $_[1]) or die;
+ $_[0]) or die;
$darea->window->draw_pixmap ($darea->style->bg_gc('normal'),
$pixmap, 0, 0,
($darea->allocation->[2]-$PIX_W)/2,
@@ -681,12 +682,12 @@ sub create_steps_window {
};
$darea->set_usize($PIX_W,$PIX_H);
$darea->set_events(['exposure_mask', 'enter_notify_mask', 'leave_notify_mask', 'button_press_mask', 'button_release_mask' ]);
- $darea->signal_connect(expose_event => $draw_pix, $f->(''));
+ $darea->signal_connect(expose_event => sub { $draw_pix->($f->('')) });
if ($step->{reachable}) {
- $darea->signal_connect(enter_notify_event => $draw_pix, $f->('-on'));
- $darea->signal_connect(leave_notify_event => $draw_pix, $f->(''));
- $darea->signal_connect(button_press_event => $draw_pix, $f->('-click'));
- $darea->signal_connect(button_release_event => sub { die "setstep $step_name\n" });
+ $darea->signal_connect(enter_notify_event => sub { $in_button=1; $draw_pix->($f->('-on')); });
+ $darea->signal_connect(leave_notify_event => sub { undef $in_button; $draw_pix->($f->('')); });
+ $darea->signal_connect(button_press_event => sub { $draw_pix->($f->('-click')); });
+ $darea->signal_connect(button_release_event => sub { $in_button && die "setstep $step_name\n" });
}
gtkpack_(new Gtk::HBox(0,5), 0, $darea, 0, new Gtk::Label(translate($step->{text})));
} grep {