diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-03-21 17:49:57 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-03-21 17:49:57 +0000 |
commit | 6c28c649ad9932dbce0ee54b8c73d15088dfd7e2 (patch) | |
tree | 6a1b9056eabd0a891d57093d6f164bf3d172f8df /mdkapplet | |
parent | f7e304c9b9040d4318d06e85008b62fb974a6207 (diff) | |
download | mgaonline-6c28c649ad9932dbce0ee54b8c73d15088dfd7e2.tar mgaonline-6c28c649ad9932dbce0ee54b8c73d15088dfd7e2.tar.gz mgaonline-6c28c649ad9932dbce0ee54b8c73d15088dfd7e2.tar.bz2 mgaonline-6c28c649ad9932dbce0ee54b8c73d15088dfd7e2.tar.xz mgaonline-6c28c649ad9932dbce0ee54b8c73d15088dfd7e2.zip |
(setState) rename 'state_type' as 'state' for readability
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -443,19 +443,19 @@ sub shouldStart() { } sub setState { - my ($state_type) = @_; + my ($state) = @_; my $checkme; - my $arr = $state{$state_type}{menu}; - my $tmp = gtkcreate_pixbuf($state{$state_type}{colour}[0]); + my $arr = $state{$state}{menu}; + my $tmp = gtkcreate_pixbuf($state{$state}{colour}[0]); $icon->set_from_pixbuf($tmp); - $icon->set_tooltip(formatAlaTeX(translate($state{$state_type}{tt}[0]))); - $icon->set_visible(!member($state_type, qw(delayed okay))); + $icon->set_tooltip(formatAlaTeX(translate($state{$state}{tt}[0]))); + $icon->set_visible(!member($state, qw(delayed okay))); gtkflush(); # so that bubbles are displayed on right icon - if ($state{$state_type}{tt}[0] && $icon->isa('Gtk2::StatusIcon') && !$state{$state_type}{do_not_use_bubble}) { - my $bubble = Gtk2::Notify->new_with_status_icon(N("Warning"), formatAlaTeX(translate($state{$state_type}{tt}[0])) . "\n", + if ($state{$state}{tt}[0] && $icon->isa('Gtk2::StatusIcon') && !$state{$state}{do_not_use_bubble}) { + my $bubble = Gtk2::Notify->new_with_status_icon(N("Warning"), formatAlaTeX(translate($state{$state}{tt}[0])) . "\n", '/usr/share/icons/mdkonline.png', $icon); - $bubble->add_action('clicked', N("Install updates"), \&installUpdates) if $state_type eq 'updates'; + $bubble->add_action('clicked', N("Install updates"), \&installUpdates) if $state eq 'updates'; $bubble->set_timeout(5000); eval { $bubble->show }; } |