diff options
Diffstat (limited to 'perl-install/interactive_gtk.pm')
-rw-r--r-- | perl-install/interactive_gtk.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index 4f01fcbb7..5d328dc7c 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -28,9 +28,10 @@ sub ask_from_entryW { sub ask_from_listW { my ($o, $title, $messages, $l, $def) = @_; + my $w = my_gtk->new($title, %$o); + $w->{retval} = $def || $l->[0]; #- nearly especially for the X test case (see timeout in Xconfigurator.pm) if (@$l < 5 && sum(map { length $_ } @$l) < 70) { my $defW; - my $w = my_gtk->new($title, %$o); my $f = sub { $w->{retval} = $_[1]; Gtk->main_quit }; gtkadd($w->{window}, gtkpack(create_box_with_title($w, @$messages), @@ -46,7 +47,6 @@ sub ask_from_listW { $defW->grab_focus if $defW; $w->main; } else { - my $w = my_gtk->new($title); $w->_ask_from_list($messages, $l, $def); $w->main; } |