summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xmdkapplet8
2 files changed, 9 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index ec5f99bb..c2662d22 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
- mdkapplet:
o do not check for network while checking for updates
o do not show icon while waiting for initial check
+ o do not show icon while checking if previously hidden
o do not skip first RPM check (change made in 2.16 in march 2007)
o do not start network cyclic checks before first media test (#38991)
o check for network just before first check
diff --git a/mdkapplet b/mdkapplet
index a24697d2..3ac861e0 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -27,6 +27,7 @@ use lib qw(/usr/lib/libDrakX);
use standalone; # for explanations
use common;
use run_program;
+use feature 'state';
BEGIN { unshift @::textdomains, 'mdkonline' }
@@ -427,12 +428,19 @@ sub shouldStart() {
sub setState {
my ($state) = @_;
my $checkme;
+ state $previous_state;
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}{tt}[0])));
my @invisible_states = qw(delayed okay);
$icon->set_visible(!member($state, @invisible_states));
+
+ # do not show icon while checking if previously hidden:
+ $icon->set_visible(0) if $state eq 'busy' && member($previous_state, @invisible_states);
+
+ $previous_state = $state;
+
gtkflush(); # so that bubbles are displayed on right icon
if ($state{$state}{tt}[0] && $icon->isa('Gtk2::StatusIcon') && !$state{$state}{do_not_use_bubble}) {