diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-05-28 12:57:20 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-05-28 12:57:20 +0000 |
commit | 197d0726845097104132ed12576270fbb8f4c1d8 (patch) | |
tree | 596443bc178c9e31b133d7cebb23f38598a80fc8 /lib | |
parent | d81193d6e541ca41ef01723087e19e81d8579a29 (diff) | |
download | drakx-net-197d0726845097104132ed12576270fbb8f4c1d8.tar drakx-net-197d0726845097104132ed12576270fbb8f4c1d8.tar.gz drakx-net-197d0726845097104132ed12576270fbb8f4c1d8.tar.bz2 drakx-net-197d0726845097104132ed12576270fbb8f4c1d8.tar.xz drakx-net-197d0726845097104132ed12576270fbb8f4c1d8.zip |
extract some variables (for next commit)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/network/connection_manager.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm index 388589e..124a423 100644 --- a/lib/network/connection_manager.pm +++ b/lib/network/connection_manager.pm @@ -309,11 +309,14 @@ sub update_networks { my @networks = filter_networks($cmanager->{connection}); foreach my $network (@networks) { my $ap = $network->{ap}; + my $connected_pixbuf = $network->{current} ? $connected ? $cmanager->{gui}{pixbufs}{state}{connected} : $cmanager->{gui}{pixbufs}{state}{refresh} : undef; + my $network_name = !$network->{essid} && exists $cmanager->{net}{wireless}{$ap} && $cmanager->{net}{wireless}{$ap}{WIRELESS_ESSID} || $network->{name}; + my $strength_pixbuf = network::signal_strength::get_strength_icon($network); push @{$cmanager->{gui}{networks_list}{data}}, [ $ap || $network->{name}, - $network->{current} ? $connected ? $cmanager->{gui}{pixbufs}{state}{connected} : $cmanager->{gui}{pixbufs}{state}{refresh} : undef, - !$network->{essid} && exists $cmanager->{net}{wireless}{$ap} && $cmanager->{net}{wireless}{$ap}{WIRELESS_ESSID} || $network->{name}, - network::signal_strength::get_strength_icon($network), + $connected_pixbuf, + $network_name, + $strength_pixbuf, $cmanager->{gui}{pixbufs}{encryption}{$network->{flags} =~ /WPA/i ? 'strong' : $network->{flags} =~ /WEP/i ? 'weak' : 'open'}, $network->{mode}, ]; |