summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-08-30 10:29:53 +0000
committerOlivier Blin <oblin@mandriva.org>2005-08-30 10:29:53 +0000
commit6c8e8baf51116d8fe9d218e73fcc5dc7c4adc0c4 (patch)
tree0df40000354547d0088d1667417d71459b127696 /perl-install/standalone
parent327eeae76d4a1e73091b329ccfea5da521d42e3e (diff)
downloaddrakx-6c8e8baf51116d8fe9d218e73fcc5dc7c4adc0c4.tar
drakx-6c8e8baf51116d8fe9d218e73fcc5dc7c4adc0c4.tar.gz
drakx-6c8e8baf51116d8fe9d218e73fcc5dc7c4adc0c4.tar.bz2
drakx-6c8e8baf51116d8fe9d218e73fcc5dc7c4adc0c4.tar.xz
drakx-6c8e8baf51116d8fe9d218e73fcc5dc7c4adc0c4.zip
display wireless link icon in net_applet if connected through wireless
Diffstat (limited to 'perl-install/standalone')
-rw-r--r--perl-install/standalone/net_applet14
1 files changed, 11 insertions, 3 deletions
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet
index 8d78aba41..7e29e14a1 100644
--- a/perl-install/standalone/net_applet
+++ b/perl-install/standalone/net_applet
@@ -248,9 +248,17 @@ sub go2State {
}
}
sub update_tray_icon() {
- !$ifw_alert || $img->get_storage_type ne 'pixbuf' ?
- $img->set_from_pixbuf($pixbufs{state}{$current_state eq 'connected' ? 'connected' : 'disconnected'}) :
- $img->set_from_stock('gtk-dialog-warning', 'small-toolbar');
+ if (!$ifw_alert || $img->get_storage_type ne 'pixbuf') {
+ my $pixbuf;
+ if (detect_devices::is_wireless_interface($current_interface)) {
+ my $net = find { $_->{current} } values %wireless_networks;
+ $pixbuf = $pixbufs{link_level}{$net->{approx_level}} if $net;
+ }
+ $pixbuf ||= $pixbufs{state}{$current_state eq 'connected' ? 'connected' : 'disconnected'};
+ $img->set_from_pixbuf($pixbuf);
+ } else {
+ $img->set_from_stock('gtk-dialog-warning', 'small-toolbar');
+ }
}
sub generate_menu {
my ($interface) = @_;