summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-14 15:59:53 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-14 15:59:53 +0000
commitc7acd1fea07f792a9047144e4e39e74533796c7e (patch)
tree8daf45b00069c2d92620cc9510a5efbc220dd07f /perl-install
parent7de9d9d7310413574d4526160a38d91717f1c856 (diff)
downloaddrakx-c7acd1fea07f792a9047144e4e39e74533796c7e.tar
drakx-c7acd1fea07f792a9047144e4e39e74533796c7e.tar.gz
drakx-c7acd1fea07f792a9047144e4e39e74533796c7e.tar.bz2
drakx-c7acd1fea07f792a9047144e4e39e74533796c7e.tar.xz
drakx-c7acd1fea07f792a9047144e4e39e74533796c7e.zip
use action callbacks instead of inexistent clicked signal
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ugtk2.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 26a7c922c..47c5ff852 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -1579,13 +1579,17 @@ sub show {
my $info = $self->{queue}[0];
$self->{bubble} = Gtk2::Notify->new_with_status_icon($info->{title}, $info->{message}, undef, $self->{statusicon});
$self->{bubble}->set_icon_from_pixbuf($info->{pixbuf});
- # FIXME: replace clicked for IFW:
- $self->{bubble}->signal_connect(clicked => sub {
- $self->{bubble}->hide;
- #- has to call process_next when done
- $info->{clicked}->();
- }) if $info->{clicked};
+ foreach my $a (@{$info->{actions} || []}) {
+ $self->{bubble}->add_action(
+ $a->{action}, $a->{label},
+ sub {
+ $info->{processed} = 1;
+ #- $a->{callback} has to call $selft->process_next when done
+ $a->{callback}->();
+ });
+ }
$self->{bubble}->signal_connect(closed => sub {
+ $info->{processed} and return;
$info->{timeout}->() if $info->{timeout};
$self->process_next;
});