diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-09-19 22:09:49 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-09-19 22:09:49 +0000 |
commit | d0935907247717f1c72ecd6e34adb2f3dc36be12 (patch) | |
tree | 35262a2ab5d367fcafb2ad9aa48e3404c7b0b41d /lib/network/connection_manager.pm | |
parent | 0be7e270e2a21865bf212b972e735aeeddfa5817 (diff) | |
download | drakx-net-d0935907247717f1c72ecd6e34adb2f3dc36be12.tar drakx-net-d0935907247717f1c72ecd6e34adb2f3dc36be12.tar.gz drakx-net-d0935907247717f1c72ecd6e34adb2f3dc36be12.tar.bz2 drakx-net-d0935907247717f1c72ecd6e34adb2f3dc36be12.tar.xz drakx-net-d0935907247717f1c72ecd6e34adb2f3dc36be12.zip |
always allow to connect if no network has to be selected
Diffstat (limited to 'lib/network/connection_manager.pm')
-rw-r--r-- | lib/network/connection_manager.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm index 6cf541e..9f12b77 100644 --- a/lib/network/connection_manager.pm +++ b/lib/network/connection_manager.pm @@ -260,8 +260,12 @@ sub update_on_status_change { $cmanager->{gui}{buttons}{connect_toggle}->set_label($disconnect ? N("Disconnect") : N("Connect")); gtkset($cmanager->{gui}{buttons}{connect_toggle}, image => gtknew('Image', file => $disconnect ? 'stop-16' : 'activate-16')) if $cmanager->{gui}{buttons}{connect_toggle}->get_image; - #- always allow to disconnect if connected - $cmanager->{gui}{buttons}{connect_toggle}->set_sensitive($cmanager->{connection} && ($cmanager->{connection}->get_status || $cmanager->{connection}{network})); + $cmanager->{gui}{buttons}{connect_toggle}->set_sensitive( + $cmanager->{connection} && ( + !$cmanager->{connection}->can('get_networks') || + $cmanager->{connection}->get_status || #- always allow to disconnect if connected + $cmanager->{connection}{network} + )); } $cmanager->{gui}{buttons}{connect_start}->set_sensitive($cmanager->{connection} && (!$cmanager->{connection}->get_status || $cmanager->{connection}{network})) |