summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive/gtk.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-07-24 16:08:24 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-07-24 16:08:24 +0000
commit364aff0d5464ca81db8a8c8c2f835ce658f81649 (patch)
tree00ec68e6dd1e36e4da9fa7835bfa2c310fd1ec67 /perl-install/interactive/gtk.pm
parente87ae4cc58f1a40c695e3c41c0335682b3fb9f87 (diff)
downloaddrakx-364aff0d5464ca81db8a8c8c2f835ce658f81649.tar
drakx-364aff0d5464ca81db8a8c8c2f835ce658f81649.tar.gz
drakx-364aff0d5464ca81db8a8c8c2f835ce658f81649.tar.bz2
drakx-364aff0d5464ca81db8a8c8c2f835ce658f81649.tar.xz
drakx-364aff0d5464ca81db8a8c8c2f835ce658f81649.zip
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)
Diffstat (limited to 'perl-install/interactive/gtk.pm')
-rw-r--r--perl-install/interactive/gtk.pm9
1 files changed, 5 insertions, 4 deletions
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}};