From c7acd1fea07f792a9047144e4e39e74533796c7e Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 14 Mar 2008 15:59:53 +0000 Subject: use action callbacks instead of inexistent clicked signal --- perl-install/ugtk2.pm | 16 ++++++++++------ 1 file 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; }); -- cgit v1.2.1