summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-03 14:59:55 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-03 14:59:55 +0000
commit54ed8953597ddcce8d4d0eba7b1d4d36eecd1a4f (patch)
tree102a0655b8e55431acf7e2e074727887240fc2a9 /mdkapplet
parent98307f8175e921be2467ea691620660bfa9e1fbc (diff)
downloadmgaonline-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-xmdkapplet8
1 files changed, 5 insertions, 3 deletions
diff --git a/mdkapplet b/mdkapplet
index 71385359..c62034d0 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -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);
}