diff options
Diffstat (limited to 'lib/network')
-rw-r--r-- | lib/network/signal_strength.pm | 4 |
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; |