summaryrefslogtreecommitdiffstats
path: root/lib/network
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2017-03-05 01:13:53 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2017-03-05 01:13:53 +0100
commit037af4d0166dda98cedebac7f1bd94a7c879b2e8 (patch)
tree295069caa892980c9f098a0b589e5343a5b732e7 /lib/network
parentc0dc8a23e95ecee2c861b19789c32bd5b2a564de (diff)
downloaddrakx-net-037af4d0166dda98cedebac7f1bd94a7c879b2e8.tar
drakx-net-037af4d0166dda98cedebac7f1bd94a7c879b2e8.tar.gz
drakx-net-037af4d0166dda98cedebac7f1bd94a7c879b2e8.tar.bz2
drakx-net-037af4d0166dda98cedebac7f1bd94a7c879b2e8.tar.xz
drakx-net-037af4d0166dda98cedebac7f1bd94a7c879b2e8.zip
Hybrid support for both SNI (for Plasma) and GtkStatusIcon
Diffstat (limited to 'lib/network')
-rw-r--r--lib/network/signal_strength.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/network/signal_strength.pm b/lib/network/signal_strength.pm
index 4dd17aa..8a3a5be 100644
--- a/lib/network/signal_strength.pm
+++ b/lib/network/signal_strength.pm
@@ -9,9 +9,7 @@ my %pixbufs;
sub get_strength_icon {
my ($network) = @_;
my $approx = 20 + min(80, int($network->{signal_strength}/20)*20);
- my $file_name = 'wifi-' . sprintf('%03d', $approx);
- $pixbufs{$approx} ||= ugtk3::gtkcreate_pixbuf($file_name);
- return wantarray ? ($pixbufs{$approx}, $file_name) : $pixbufs{$approx};
+ return $pixbufs{$approx} ||= ugtk3::gtkcreate_pixbuf('wifi-' . sprintf('%03d', $approx));
}
1;