diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-14 16:14:05 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-14 16:14:05 +0000 |
commit | 234552eaddb712a1092b0c7bc4db06b501c2be64 (patch) | |
tree | 0d2bf4966ca410a9b5788616ba89a3f32b3c911f /perl-install | |
parent | d9ff30821c226c47b48a42110502ba5b8e540f7b (diff) | |
download | drakx-234552eaddb712a1092b0c7bc4db06b501c2be64.tar drakx-234552eaddb712a1092b0c7bc4db06b501c2be64.tar.gz drakx-234552eaddb712a1092b0c7bc4db06b501c2be64.tar.bz2 drakx-234552eaddb712a1092b0c7bc4db06b501c2be64.tar.xz drakx-234552eaddb712a1092b0c7bc4db06b501c2be64.zip |
do not initialize and keep around bubble value, it's local
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/ugtk2.pm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 9f9552cc3..cfb0c5d81 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -1552,7 +1552,6 @@ sub new { require Gtk2::Notify; my $self = bless { - bubble => Gtk2::Notify->new('', '', undef, undef), queue => [], statusicon => $statusicon, display => 5000, @@ -1577,10 +1576,10 @@ sub add { sub show { my ($self) = @_; # perl_checker: $self = Gtk2::Notify->new 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}); + my $notification = Gtk2::Notify->new_with_status_icon($info->{title}, $info->{message}, undef, $self->{statusicon}); + $notification->set_icon_from_pixbuf($info->{pixbuf}); foreach my $a (@{$info->{actions} || []}) { - $self->{bubble}->add_action( + $notification->add_action( $a->{action}, $a->{label}, sub { $info->{processed} = 1; @@ -1588,12 +1587,12 @@ sub show { $a->{callback}->(); }); } - $self->{bubble}->signal_connect(closed => sub { + $notification->signal_connect(closed => sub { $info->{processed} and return; $info->{timeout}->() if $info->{timeout}; $self->process_next; }); - $self->{bubble}->show(); + $notification->show(); } 1; |