diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-10-03 14:59:55 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-10-03 14:59:55 +0000 |
commit | 54ed8953597ddcce8d4d0eba7b1d4d36eecd1a4f (patch) | |
tree | 102a0655b8e55431acf7e2e074727887240fc2a9 /mdkapplet | |
parent | 98307f8175e921be2467ea691620660bfa9e1fbc (diff) | |
download | mgaonline-54ed8953597ddcce8d4d0eba7b1d4d36eecd1a4f.tar mgaonline-54ed8953597ddcce8d4d0eba7b1d4d36eecd1a4f.tar.gz mgaonline-54ed8953597ddcce8d4d0eba7b1d4d36eecd1a4f.tar.bz2 mgaonline-54ed8953597ddcce8d4d0eba7b1d4d36eecd1a4f.tar.xz mgaonline-54ed8953597ddcce8d4d0eba7b1d4d36eecd1a4f.zip |
(setState) make it more readable
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -590,9 +590,11 @@ sub setState { 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 eq 'updates'; - $bubble->add_action('clicked', N("Upgrade the system"), \&upgrade) if $state eq 'new_distribution'; - if (member($state, qw(no_enabled_medium no_update_medium))) { + if ($state eq 'new_distribution') { + $bubble->add_action('clicked', N("Upgrade the system"), \&upgrade); + } elsif ($state eq 'updates') { + $bubble->add_action('clicked', N("Install updates"), \&installUpdates); + } elsif (member($state, qw(no_enabled_medium no_update_medium))) { $bubble->add_action('clicked', N("Add media"), \&add_media); } |