From 6c28c649ad9932dbce0ee54b8c73d15088dfd7e2 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 21 Mar 2008 17:49:57 +0000 Subject: (setState) rename 'state_type' as 'state' for readability --- mdkapplet | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mdkapplet b/mdkapplet index ce3dfbc6..511d5cd1 100755 --- a/mdkapplet +++ b/mdkapplet @@ -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 }; } -- cgit v1.2.1