summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-03 17:00:41 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-03 17:00:41 +0000
commit465c624a2900f2fd89815a9f14b4e5f73929dcec (patch)
treef836356b579cabb346ee3f300dafd19e8f19956b
parentf6b19bceaefa8b659015866beab6b86611e47e26 (diff)
downloadmgaonline-465c624a2900f2fd89815a9f14b4e5f73929dcec.tar
mgaonline-465c624a2900f2fd89815a9f14b4e5f73929dcec.tar.gz
mgaonline-465c624a2900f2fd89815a9f14b4e5f73929dcec.tar.bz2
mgaonline-465c624a2900f2fd89815a9f14b4e5f73929dcec.tar.xz
mgaonline-465c624a2900f2fd89815a9f14b4e5f73929dcec.zip
(setState) only show "Install updates" in right menu only if there're actually updates
-rw-r--r--NEWS2
-rwxr-xr-xmdkapplet5
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index d148c287..de674edd 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@
* ask for confirmation before performing distro upgrade
* if there're updates, install regular updates instead of
performing distro upgrade on left click
+ * only show "Install updates" in right menu only if there're
+ actually updates
* use blue icon
Version 2.48 - 2 October 2008
diff --git a/mdkapplet b/mdkapplet
index a46a123b..8abab03e 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -115,7 +115,7 @@ my %state = (
new_distribution => {
colour => [ 'bundle' ],
changes => [ 'okay' ],
- menu => [ 'upgrade_distro', 'update', 'check' ],
+ menu => [ 'upgrade_distro', 'check' ],
tt => [ N("A new stable distribution has been released") . "\n\n" . N("Do you want to upgrade?") ]
},
disconnected => {
@@ -593,6 +593,9 @@ sub setState {
'/usr/share/icons/mdkonline.png', $icon);
if ($state eq 'new_distribution') {
$bubble->add_action('clicked', N("Upgrade the system"), \&upgrade);
+ if ($sub_state eq 'updates') {
+ push @arr, 'update';
+ }
} elsif ($state eq 'updates') {
$bubble->add_action('clicked', N("Install updates"), \&installUpdates);
} elsif (member($state, qw(no_enabled_medium no_update_medium))) {