summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-11-07 17:17:57 +0000
committerOlivier Blin <oblin@mandriva.org>2005-11-07 17:17:57 +0000
commit49c93b516a95fcc997bc9dce38a23caa8f6561ae (patch)
tree5cd247067999fe0440209626db565d0714a1e4a5 /perl-install/standalone
parentbd586d7d27b861192a1708172b7616216cfdc8a8 (diff)
downloaddrakx-49c93b516a95fcc997bc9dce38a23caa8f6561ae.tar
drakx-49c93b516a95fcc997bc9dce38a23caa8f6561ae.tar.gz
drakx-49c93b516a95fcc997bc9dce38a23caa8f6561ae.tar.bz2
drakx-49c93b516a95fcc997bc9dce38a23caa8f6561ae.tar.xz
drakx-49c93b516a95fcc997bc9dce38a23caa8f6561ae.zip
use disconnected icon if no route, even if wifi is associated
Diffstat (limited to 'perl-install/standalone')
-rw-r--r--perl-install/standalone/net_applet12
1 files changed, 8 insertions, 4 deletions
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet
index 82ee2a005..c701992a1 100644
--- a/perl-install/standalone/net_applet
+++ b/perl-install/standalone/net_applet
@@ -268,11 +268,15 @@ sub go2State {
sub update_tray_icon() {
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;
+ if ($current_state eq 'connected') {
+ 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}{connected}
+ } else {
+ $pixbuf = $pixbufs{state}{disconnected};
}
- $pixbuf ||= $pixbufs{state}{$current_state eq 'connected' ? 'connected' : 'disconnected'};
$img->set_from_pixbuf($pixbuf);
} else {
$img->set_from_stock('gtk-dialog-warning', 'small-toolbar');