diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2009-01-19 09:52:21 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2009-01-19 09:52:21 +0000 |
commit | 6f4c44fdc7f6215680af1bf8c407734e81a1b30c (patch) | |
tree | 5a97dde0a367e335cb2b8bc2b6031b7b8382559d /perl-install | |
parent | c5640e09feb5bba961cbf9327ef8ada79aff010e (diff) | |
download | drakx-6f4c44fdc7f6215680af1bf8c407734e81a1b30c.tar drakx-6f4c44fdc7f6215680af1bf8c407734e81a1b30c.tar.gz drakx-6f4c44fdc7f6215680af1bf8c407734e81a1b30c.tar.bz2 drakx-6f4c44fdc7f6215680af1bf8c407734e81a1b30c.tar.xz drakx-6f4c44fdc7f6215680af1bf8c407734e81a1b30c.zip |
make things more clear (needed for next commit):
since $w->entry (defined in ugtk2) on ComboBox returns $w, inline it
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/interactive/gtk.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 9b7797c9c..913c2dc11 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -498,7 +498,7 @@ sub create_widget { if (!$e->{separator}) { if ($e->{not_edit}) { - $w = Gtk2::ComboBox->new_text; + $real_w = $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}; $w->set_wrap_width($e->{gtk}{wrap_width}) if exists $e->{gtk}{wrap_width}; @@ -507,12 +507,13 @@ sub create_widget { $w->set_use_arrows_always(1); $w->entry->set_editable(1); $w->disable_activate; + ($real_w, $w) = ($w, $w->entry); } $w->set_popdown_strings(@formatted_list); $w->set_text(ref($e->{val}) ? may_apply($e->{format}, ${$e->{val}}) : $formatted_list[0]) if $w->isa('Gtk2::ComboBox'); } else { $model = __create_tree_model($e); - $w = Gtk2::ComboBox->new_with_model($model); + $real_w = $w = Gtk2::ComboBox->new_with_model($model); $w->pack_start(my $texrender = Gtk2::CellRendererText->new, 0); $w->add_attribute($texrender, text => 0); @@ -521,7 +522,6 @@ sub create_widget { $w->add_attribute($pixrender, pixbuf => 1); } } - ($real_w, $w) = ($w, $w->entry); my $get = sub { my $i = $model ? do { |