summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/interactive')
-rw-r--r--perl-install/interactive/gtk.pm18
1 files changed, 15 insertions, 3 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index ecdcf554c..971203960 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -453,10 +453,12 @@ sub create_widget {
my @buttons = (N_("Add"), N_("Modify"), N_("Remove"));
# Add Up/Down buttons if their actions are defined
foreach (qw(Up Down)) {
- push @buttons, $_ if $actions->{$_};
+ push @buttons, 'gtk-go-' . lc($_) if $actions->{$_};
}
@buttons = map {
- { kind => lc $_, action => $actions->{$_}, button => Gtk2::Button->new(translate($_)) };
+ my $button = /^gtk-/ ? gtknew('Button', image => gtknew('Image', stock => $_))
+ : Gtk2::Button->new(translate($_));
+ { kind => lc $_, action => $actions->{$_}, button => $button };
} @buttons;
my $modify = find { $_->{kind} eq 'modify' } @buttons;
@@ -473,9 +475,19 @@ sub create_widget {
}
add_modify_remove_sensitive(\@buttons, $e);
+ my ($images, $real_buttons) = partition { $_->{kind} =~ /^gtk-/ } @buttons;
$real_w = gtkpack_(Gtk2::HBox->new(0,0),
1, create_scrolled_window($w),
- 0, gtkpack__(Gtk2::VBox->new(0,0), map { $_->{button} } @buttons));
+ 0, gtkpack__(Gtk2::VBox->new(0,0),
+ (map { $_->{button} } @$real_buttons),
+ if_($images,
+ gtknew('HButtonBox',
+ layout => 'spread',
+ children_loose => [ map { $_->{button} } @$images]
+ )
+ ),
+ ),
+ );
$e->{grow} = 'expand';
} else {
my $use_boxradio = exists $e->{gtk}{use_boxradio} ? $e->{gtk}{use_boxradio} : @{$e->{list}} <= 8;