diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-11-12 13:50:41 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-11-12 13:50:41 +0000 |
commit | 1d7416abd3528e9d64c1444720632f4e719376c1 (patch) | |
tree | 52fc958dd7bb712f32def368d938f5f4c2268723 /lib/network | |
parent | 68ec8fc63f4fffd7c84144d077a0f080cca7df05 (diff) | |
download | drakx-net-1d7416abd3528e9d64c1444720632f4e719376c1.tar drakx-net-1d7416abd3528e9d64c1444720632f4e719376c1.tar.gz drakx-net-1d7416abd3528e9d64c1444720632f4e719376c1.tar.bz2 drakx-net-1d7416abd3528e9d64c1444720632f4e719376c1.tar.xz drakx-net-1d7416abd3528e9d64c1444720632f4e719376c1.zip |
do not make refresh/monitor buttons sensitive if device has no interface
Diffstat (limited to 'lib/network')
-rw-r--r-- | lib/network/connection_manager.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm index d4ae224..8a36737 100644 --- a/lib/network/connection_manager.pm +++ b/lib/network/connection_manager.pm @@ -299,6 +299,12 @@ sub update_on_status_change { $cmanager->{gui}{buttons}{configure}->set_sensitive($may_have_network) if $cmanager->{gui}{buttons}{configure}; + my $has_interface = to_bool($cmanager->{connection} && $cmanager->{connection}->get_interface); + $cmanager->{gui}{buttons}{refresh}->set_sensitive($has_interface) + if $cmanager->{gui}{buttons}{refresh}; + $cmanager->{gui}{buttons}{monitor}->set_sensitive($has_interface) + if $cmanager->{gui}{buttons}{monitor}; + if ($cmanager->{gui}{status_image} && $cmanager->{connection}) { my $icon = $cmanager->{connection}->get_status_icon; ugtk2::_find_imgfile($icon) or $icon = $cmanager->{connection}->get_type_icon; |