diff options
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 }; } |