From 364aff0d5464ca81db8a8c8c2f835ce658f81649 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 24 Jul 2003 16:08:24 +0000 Subject: if the callee explicitely want to force the user to pick sg from a fixed set of options, the right widget to use is an OptionMenu rather than a Combo (see ugtk2 r1.141 log and ugtk2::Gtk2::OptionMenu sub-module) --- perl-install/interactive/gtk.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'perl-install/interactive') diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 391c0bc39..b16edc639 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -520,10 +520,11 @@ sub ask_fromW { } } else { if ($e->{type} eq "combo") { - $w = Gtk2::Combo->new; - $w->set_use_arrows_always(1); - $w->entry->set_editable(!$e->{not_edit}); - $w->disable_activate; + $w = $e->{not_edit} ? Gtk2::OptionMenu->new : Gtk2::Combo->new; + if (!$e->{not_edit}) { + $w->set_use_arrows_always(1); + $w->disable_activate; + } my @formatted_list = map { may_apply($e->{format}, $_) } @{$e->{list}}; -- cgit v1.2.1