diff options
-rw-r--r-- | perl-install/NEWS | 3 | ||||
-rw-r--r-- | perl-install/install/NEWS | 3 | ||||
-rw-r--r-- | perl-install/interactive/gtk.pm | 19 |
3 files changed, 9 insertions, 16 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 678f0e2de..858471cd7 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,6 @@ +- use "ComboBoxEntry" gtk2 widget instead of "Combo" (which is deprecated), + this also workarounds gtk2 bug with "hidden" Entry + "Combo" + Version 11.79 - 16 January 2008 - drakbug: diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 8ab787af6..5a9e0d65a 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,6 @@ +- use "ComboBoxEntry" gtk2 widget instead of "Combo" (which is deprecated), + this also workarounds gtk2 bug with "hidden" Entry + "Combo" + Version 11.79 - 16 January 2008 - disable resizing ext4 since resize2fs is known to be broken regarding extents diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 7a939dc0c..c4967e4f6 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -503,14 +503,10 @@ sub create_widget { ($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}; } else { - $w = Gtk2::Combo->new; - $w->set_use_arrows_always(1); - $w->entry->set_editable(1); - $w->disable_activate; - ($real_w, $w) = ($w, $w->entry); + $w = Gtk2::ComboBoxEntry->new_text; + ($real_w, $w) = ($w, $w->child); } $real_w->set_popdown_strings(@formatted_list); - $real_w->set_text(ref($e->{val}) ? may_apply($e->{format}, ${$e->{val}}) : $formatted_list[0]) if $real_w->isa('Gtk2::ComboBox'); } else { $model = __create_tree_model($e); $real_w = $w = Gtk2::ComboBox->new_with_model($model); @@ -533,16 +529,7 @@ sub create_widget { }; defined $i ? $e->{list}[$i] : $w->get_text; }; - if ($real_w->isa('Gtk2::Combo')) { - #- FIXME workaround gtk suckiness (set_text generates two 'change' signals, one when removing the whole, one for inserting the replacement..) - my $idle; - $w->signal_connect(changed => sub { - return if $$ignore_ref; - $idle ||= Glib::Idle->add(sub { undef $idle; $onchange_f->($get); 0 }); - }); - } else { - $w->signal_connect(changed => $onchange->($get)); - } + $w->signal_connect(changed => $onchange->($get)); $set = sub { my $s = may_apply($e->{format}, $_[0]); |