summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/interactive')
-rw-r--r--perl-install/interactive/gtk.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 9476d78de..4e3d2666c 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -356,9 +356,15 @@ sub add_modify_remove_action {
${$e->{val}} = $e->{list}[0];
}
ugtk2::gtk_set_treelist($treelist, [ map { may_apply($e->{format}, $_) } @{$e->{list}} ]);
+
+ add_modify_remove_sensitive($buttons, $e);
+ 1;
+}
+
+sub add_modify_remove_sensitive {
+ my ($buttons, $e) = @_;
$_->{button}->set_sensitive(@{$e->{list}} != ()) foreach
grep { member($_->{kind}, 'modify', 'remove') } @$buttons;
- 1;
}
sub ask_fromW {
@@ -482,6 +488,8 @@ sub ask_fromW {
foreach my $button (@buttons) {
$button->{button}->signal_connect(clicked => sub { $do_action->($button) });
}
+ add_modify_remove_sensitive(\@buttons, $e);
+
$real_w = gtkpack_(Gtk2::HBox->new(0,0),
1, create_scrolled_window($w),
0, gtkpack__(Gtk2::VBox->new(0,0), map { $_->{button} } @buttons));