From 1d7416abd3528e9d64c1444720632f4e719376c1 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 12 Nov 2007 13:50:41 +0000 Subject: do not make refresh/monitor buttons sensitive if device has no interface --- lib/network/connection_manager.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/network/connection_manager.pm') 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; -- cgit v1.2.1