From c5640e09feb5bba961cbf9327ef8ada79aff010e Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 19 Jan 2009 09:40:04 +0000 Subject: drop special case for non-editable combo boxes with large labels. at least the special case for diskdrake "Create" is not needed anymore (cf #43611) --- perl-install/interactive/gtk.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 2dea19599..9b7797c9c 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -496,11 +496,8 @@ sub create_widget { my @formatted_list = map { may_apply($e->{format}, $_) } @{$e->{list}}; $e->{formatted_list} = \@formatted_list; - my @l = sort { $b <=> $a } map { length } @formatted_list; - my $width = $l[@l / 16]; # take the third octile (think quartile) - if (!$e->{separator}) { - 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) + if ($e->{not_edit}) { $w = Gtk2::ComboBox->new_text; # FIXME: the following causes Gtk-CRITICAL but not solvable at realize time: ($w->child->get_cell_renderers)[0]->set_property('ellipsize', 'end') if !$e->{do_not_ellipsize}; @@ -508,7 +505,7 @@ sub create_widget { } else { $w = Gtk2::Combo->new; $w->set_use_arrows_always(1); - $w->entry->set_editable(!$e->{not_edit}); + $w->entry->set_editable(1); $w->disable_activate; } $w->set_popdown_strings(@formatted_list); -- cgit v1.2.1