diff options
author | pad <pad@mandriva.com> | 1999-09-04 20:38:58 +0000 |
---|---|---|
committer | pad <pad@mandriva.com> | 1999-09-04 20:38:58 +0000 |
commit | beb56af292cfc8f5ed3e78034da33e96ca9e7953 (patch) | |
tree | 75f51796e90b55bdc8ec647b3d370d654935d0c3 /perl-install | |
parent | bed52c9b16c8329cf4e1ce13f11ca41d09f05d4a (diff) | |
download | drakx-backup-do-not-use-beb56af292cfc8f5ed3e78034da33e96ca9e7953.tar drakx-backup-do-not-use-beb56af292cfc8f5ed3e78034da33e96ca9e7953.tar.gz drakx-backup-do-not-use-beb56af292cfc8f5ed3e78034da33e96ca9e7953.tar.bz2 drakx-backup-do-not-use-beb56af292cfc8f5ed3e78034da33e96ca9e7953.tar.xz drakx-backup-do-not-use-beb56af292cfc8f5ed3e78034da33e96ca9e7953.zip |
return fonctionne
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/interactive_gtk.pm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index 854d7148f..0926d5327 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -78,7 +78,10 @@ sub ask_from_entries_refW { my $num_champs = @{$l}; my $ignore = 0; + my $w = my_gtk->new($title, %$o); my @entries = map { new Gtk::Entry } @{$l}; + my $ok = $w->create_okcancel; + my @updates = mapn { my ($entry, $ref) = @_; return sub { ${$ref} = $entry->get_text }; @@ -91,7 +94,7 @@ sub ask_from_entries_refW { } \@entries, $val; - for (my $i = 0; $i <$num_champs; $i++) { + for (my $i = 0; $i < $num_champs; $i++) { my $ind = $i; my $callback = sub { return if $ignore; #handle recursive deadlock @@ -106,17 +109,21 @@ sub ask_from_entries_refW { }; my $entry = $entries[$i]; $entry->signal_connect(changed => $callback); + $entry->signal_connect(activate => sub { + ($ind == ($num_champs -1)) ? + $w->{ok}->grab_focus() : $entries[$ind+1]->grab_focus(); + }); $entry->set_text(${$val->[$i]}) if ${$val->[$i]}; $entry->set_visibility(0) if $_[0] =~ /password/i; # &{$updates[$i]}; } my @entry_list = mapn { [($_[0], $_[1])]} $l, \@entries; - my $w = my_gtk->new($title, %$o); gtkadd($w->{window}, gtkpack( create_box_with_title($w, @$messages), create_packtable({}, @entry_list), - $w->create_okcancel)); + $ok + )); $entries[0]->grab_focus(); $w->main(); |