From 1e9fb1574ec27a9c8be8d03d3a4a5455a23744c2 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 5 Oct 2009 09:27:49 +0000 Subject: (create_widget) remember real kind thus fixing crash on clicking Up/Down buttons (#54077) ; remember we use some stock icon so that we keep arrows on the same horizontal bar --- perl-install/interactive/gtk.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perl-install/interactive') diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 12aeccebb..6cfedf766 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -459,7 +459,8 @@ sub create_widget { my $button = /^gtk-/ ? gtknew('Button', image => gtknew('Image', stock => $_)) : Gtk2::Button->new(translate($_)); my $kind = $_; - { kind => lc $kind, action => $actions->{$kind}, button => $button }; + $kind =~ s/^gtk-go-//; + { kind => lc $kind, action => $actions->{$kind}, button => $button, real_kind => $_ }; } @buttons; my $modify = find { $_->{kind} eq 'modify' } @buttons; @@ -476,7 +477,7 @@ sub create_widget { } add_modify_remove_sensitive(\@buttons, $e); - my ($images, $real_buttons) = partition { $_->{kind} =~ /^gtk-/ } @buttons; + my ($images, $real_buttons) = partition { $_->{real_kind} =~ /^gtk-/ } @buttons; $real_w = gtkpack_(Gtk2::HBox->new(0,0), 1, create_scrolled_window($w), 0, gtkpack__(Gtk2::VBox->new(0,0), -- cgit v1.2.1