summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-06-24 10:46:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-06-24 10:46:30 +0000
commit1dfc06422978cbae04f06f13165d2aea37fac8e1 (patch)
tree6272b1add0068da59fe9f58ba818e617dd7a0a29 /perl-install/install_steps_gtk.pm
parent2a0bbee296669686a3332e6595bc1021757249b0 (diff)
downloaddrakx-1dfc06422978cbae04f06f13165d2aea37fac8e1.tar
drakx-1dfc06422978cbae04f06f13165d2aea37fac8e1.tar.gz
drakx-1dfc06422978cbae04f06f13165d2aea37fac8e1.tar.bz2
drakx-1dfc06422978cbae04f06f13165d2aea37fac8e1.tar.xz
drakx-1dfc06422978cbae04f06f13165d2aea37fac8e1.zip
no_comment
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r--perl-install/install_steps_gtk.pm27
1 files changed, 11 insertions, 16 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 7bf295fb8..032c33a7d 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -742,8 +742,6 @@ sub create_steps_window {
my ($o) = @_;
$o->{steps_window}->destroy if $o->{steps_window};
- my %reachableSteps if 0;
- %reachableSteps = ();
my $w = bless {}, 'my_gtk';
$w->{rwindow} = $w->{window} = new Gtk::Window;
@@ -751,14 +749,6 @@ sub create_steps_window {
$w->{rwindow}->set_usize($::stepswidth, $::stepsheight);
$w->{rwindow}->set_name("Steps");
$w->{rwindow}->set_events('button_press_mask');
- $w->{rwindow}->signal_connect(button_press_event => sub {
- $::setstep or return;
- my $Y = $_[1]{'y'};
- map_each {
- my (undef, $y, undef, $height) = @{$::b->allocation};
- $y <= $Y && $Y < $y + $height and die "setstep $::a\n";
- } %reachableSteps;
- });
$w->show;
my @steps_icons = map { [ gtkcreate_xpm($w->{window}, "$ENV{SHARE_PATH}/step-$_.xpm") ] } qw(green orange red);
@@ -766,15 +756,20 @@ sub create_steps_window {
gtkadd($w->{window},
gtkpack_(new Gtk::VBox(0,0),
(map {; 1, $_ } map {
+ my $step_name = $_;
my $step = $o->{steps}{$_};
my $w = new Gtk::Label(translate($step->{text}));
- $w->set_name("Steps" . ($step->{reachable} && "Reachable"));
- gtkpack_(my $b = new Gtk::HBox(0,5), 0,
- new Gtk::Pixmap(@{$steps_icons[$step->{done} ? 0 : $step->{entered} ? 1 : 2]}), 0, $w);
+ my $pixmap = new Gtk::Pixmap(@{$steps_icons[$step->{done} ? 0 : $step->{entered} ? 1 : 2]});
+ gtkpack_(my $b = new Gtk::HBox(0,5), 0, $pixmap, 0, $w);
+
+ $pixmap->set_events('enter_notify_mask');
+ $pixmap->signal_connect(enter_notify_event => sub { print "HERE\n" });
- $reachableSteps{$_} = $b if $step->{reachable};
- $b;
+ if ($step->{reachable}) {
+ gtksignal_connect(gtkadd(new Gtk::Button, $b),
+ clicked => sub { die "setstep $step_name\n" });
+ } else { $b }
} grep {
!eval $o->{steps}{$_}{hidden};
} @{$o->{orderedSteps}}),
@@ -782,7 +777,7 @@ sub create_steps_window {
my $t = $_;
my $w = new Gtk::Button('');
$w->set_name($t);
- $w->set_usize(0, 7);
+# $w->set_usize(0, 7);
gtksignal_connect($w, clicked => sub {
$::setstep or return; #- just as setstep s
install_theme($o, $t); die "theme_changed\n"