summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-09-19 15:39:18 +0000
committerOlivier Blin <oblin@mandriva.com>2007-09-19 15:39:18 +0000
commit879fea07386796d18dd9ff8bd18fe3a670ec035b (patch)
tree45b12da038acd54f45e4cb6d279567eafddf06a4 /bin
parent289cf2b938e521e176ff9d85854e60bafc5529d3 (diff)
downloaddrakx-net-879fea07386796d18dd9ff8bd18fe3a670ec035b.tar
drakx-net-879fea07386796d18dd9ff8bd18fe3a670ec035b.tar.gz
drakx-net-879fea07386796d18dd9ff8bd18fe3a670ec035b.tar.bz2
drakx-net-879fea07386796d18dd9ff8bd18fe3a670ec035b.tar.xz
drakx-net-879fea07386796d18dd9ff8bd18fe3a670ec035b.zip
use new connected/disconnected/unconfigured icons
Diffstat (limited to 'bin')
-rwxr-xr-x[-rw-r--r--]bin/net_applet15
1 files changed, 5 insertions, 10 deletions
diff --git a/bin/net_applet b/bin/net_applet
index f1a0f12..78dc311 100644..100755
--- a/bin/net_applet
+++ b/bin/net_applet
@@ -43,7 +43,7 @@ my %pixbufs =
(
firewall => gtknew('Pixbuf', file => 'drakfirewall'),
firewall_icon => gtknew('Pixbuf', file => 'drakfirewall')->scale_simple(24, 24, 'hyper'),
- state => { map { $_ => gtknew('Pixbuf', file => $_) } qw(connected disconnected) },
+ state => { map { $_ => gtknew('Pixbuf', file => $_) } qw(connected disconnected unconfigured) },
link_level => { map {
$_ => gtknew('Pixbuf', file => 'wifi-' . sprintf('%03d', $_))->scale_simple(24, 24, 'hyper');
} qw(20 40 60 80 100) },
@@ -332,15 +332,10 @@ sub get_current_network() {
sub get_state_pixbuf() {
my $pixbuf;
- if ($current_state eq 'connected') {
- my $wnet = get_current_network();
- $pixbuf = $wnet ?
- network::signal_strength::get_strength_icon($wnet) :
- $pixbufs{state}{connected};
- } else {
- $pixbuf = $pixbufs{state}{disconnected};
- }
- $pixbuf;
+ my $wnet = $current_state eq 'connected' && get_current_network();
+ $wnet ?
+ network::signal_strength::get_strength_icon($wnet) :
+ $pixbufs{state}{$current_state};
}
sub update_tray_icon() {