summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-05-24 13:10:24 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-05-24 13:10:24 +0000
commit762dee42a6cbe4a3e803d402ccadc8050897752e (patch)
treedc99aaa2ba5ec957f2c1854557e96be6778b3618 /perl-install/interactive
parent55e82bbb21c394f5d939a3b3827ceb99364554cb (diff)
downloaddrakx-backup-do-not-use-762dee42a6cbe4a3e803d402ccadc8050897752e.tar
drakx-backup-do-not-use-762dee42a6cbe4a3e803d402ccadc8050897752e.tar.gz
drakx-backup-do-not-use-762dee42a6cbe4a3e803d402ccadc8050897752e.tar.bz2
drakx-backup-do-not-use-762dee42a6cbe4a3e803d402ccadc8050897752e.tar.xz
drakx-backup-do-not-use-762dee42a6cbe4a3e803d402ccadc8050897752e.zip
switch from deprecated OptionMenu into new ComboBox widget
Diffstat (limited to 'perl-install/interactive')
-rw-r--r--perl-install/interactive/gtk.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 88a102b41..b6dade81d 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -535,8 +535,8 @@ sub ask_fromW {
my @l = sort { $b <=> $a } map { length } @formatted_list;
my $width = $l[@l / 16]; # take the third octile (think quartile)
- if ($e->{not_edit} && $width < 60) { #- OptionMenus do not have an horizontal scroll-bar. This can cause havoc for long strings (eg: diskdrake Create dialog box in expert mode)
- $w = Gtk2::OptionMenu->new;
+ if ($e->{not_edit} && $width < 160) { #- ComboBoxes do not have an horizontal scroll-bar. This can cause havoc for long strings (eg: diskdrake Create dialog box in expert mode)
+ $w = Gtk2::ComboBox->new_text;
} else {
$w = Gtk2::Combo->new;
$w->set_use_arrows_always(1);
@@ -545,6 +545,7 @@ sub ask_fromW {
}
$w->set_popdown_strings(@formatted_list);
+ $w->set_text($formatted_list[0]) if $w->isa('Gtk2::ComboBox');
($real_w, $w) = ($w, $w->entry);
#- FIXME workaround gtk suckiness (set_text generates two 'change' signals, one when removing the whole, one for inserting the replacement..)