summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-03-21 19:29:10 +0000
committerThierry Vignaud <tv@mandriva.org>2008-03-21 19:29:10 +0000
commitda538bcfe3cd112cce09544afeeb0a907f85db1f (patch)
tree4102bb76acd92672f1a6cfd8baec232d73f8e05c /mdkapplet
parent3875685fd42a03d44a26a9ef0f3dfac164e04aa4 (diff)
downloadmgaonline-da538bcfe3cd112cce09544afeeb0a907f85db1f.tar
mgaonline-da538bcfe3cd112cce09544afeeb0a907f85db1f.tar.gz
mgaonline-da538bcfe3cd112cce09544afeeb0a907f85db1f.tar.bz2
mgaonline-da538bcfe3cd112cce09544afeeb0a907f85db1f.tar.xz
mgaonline-da538bcfe3cd112cce09544afeeb0a907f85db1f.zip
(setState) do not show icon while checking if previously hidden
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet8
1 files changed, 8 insertions, 0 deletions
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}) {