summaryrefslogtreecommitdiffstats
path: root/lib/network
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2017-03-04 02:04:38 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2017-03-04 02:04:38 +0100
commitd15d7d0211b9e4e52a53aa4a349641c02b6a8474 (patch)
tree124a23d1e429ddc60edecaefa8413cdfff41bc8c /lib/network
parent13db0f5dafc24b22ee5a1e6cf987180e2efd5cf4 (diff)
downloaddrakx-net-d15d7d0211b9e4e52a53aa4a349641c02b6a8474.tar
drakx-net-d15d7d0211b9e4e52a53aa4a349641c02b6a8474.tar.gz
drakx-net-d15d7d0211b9e4e52a53aa4a349641c02b6a8474.tar.bz2
drakx-net-d15d7d0211b9e4e52a53aa4a349641c02b6a8474.tar.xz
drakx-net-d15d7d0211b9e4e52a53aa4a349641c02b6a8474.zip
Fix the net_applet status icon (mga#17592)
This also restores the tooltip with IP information.
Diffstat (limited to 'lib/network')
-rw-r--r--lib/network/signal_strength.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/network/signal_strength.pm b/lib/network/signal_strength.pm
index 8a3a5be..4dd17aa 100644
--- a/lib/network/signal_strength.pm
+++ b/lib/network/signal_strength.pm
@@ -9,7 +9,9 @@ my %pixbufs;
sub get_strength_icon {
my ($network) = @_;
my $approx = 20 + min(80, int($network->{signal_strength}/20)*20);
- return $pixbufs{$approx} ||= ugtk3::gtkcreate_pixbuf('wifi-' . sprintf('%03d', $approx));
+ my $file_name = 'wifi-' . sprintf('%03d', $approx);
+ $pixbufs{$approx} ||= ugtk3::gtkcreate_pixbuf($file_name);
+ return wantarray ? ($pixbufs{$approx}, $file_name) : $pixbufs{$approx};
}
1;