diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-02-26 17:26:10 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-02-26 17:26:10 +0000 |
commit | 9a9e8f11fc07c17a4a33ab57f33faa8c9df90bb2 (patch) | |
tree | 7fce79ff9092817efba3aca226a927c185dbe8d1 | |
parent | f67e4952fd97e9f8342159b3ce27009dd473a0c9 (diff) | |
download | drakx-net-9a9e8f11fc07c17a4a33ab57f33faa8c9df90bb2.tar drakx-net-9a9e8f11fc07c17a4a33ab57f33faa8c9df90bb2.tar.gz drakx-net-9a9e8f11fc07c17a4a33ab57f33faa8c9df90bb2.tar.bz2 drakx-net-9a9e8f11fc07c17a4a33ab57f33faa8c9df90bb2.tar.xz drakx-net-9a9e8f11fc07c17a4a33ab57f33faa8c9df90bb2.zip |
allow to scan networks in netcenter even if slow (like cellular), just don't do it at startup
-rwxr-xr-x | lib/network/netcenter.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/network/netcenter.pm b/lib/network/netcenter.pm index 3577014..64963c4 100755 --- a/lib/network/netcenter.pm +++ b/lib/network/netcenter.pm @@ -16,10 +16,11 @@ sub build_cmanager { my $cmanager = network::connection_manager::create($in, $net, $w, $pixbufs); $cmanager->{connection} = $connection; - $cmanager->{gui}{show_networks} = $connection->can('get_networks') && !$connection->network_scan_is_slow; - if ($cmanager->{gui}{show_networks}) { + + if ($connection->can('get_networks')) { network::connection_manager::create_networks_list($cmanager); - network::connection_manager::update_networks($cmanager); + network::connection_manager::update_networks($cmanager) + if !$connection->network_scan_is_slow; } $cmanager; } @@ -35,7 +36,7 @@ sub main { #- so that transient_for is defined, for wait messages and popups to be centered $::main_window = $w->{real_window}; - my @connections = map { $_->get_connections(automatic_only => 1) } network::connection::get_types; + my @connections = map { $_->get_connections(automatic_only => 1, fast_only => 1) } network::connection::get_types; @connections = uniq_ { $_->{device} } @connections; my $pixbufs = network::connection_manager::create_pixbufs(); @@ -58,7 +59,7 @@ sub main { my $content = gtknew('HBox', children => [ 0, gtknew('Label', padding => [ 5, 0 ]), 1, gtknew('VBox', spacing => 5, children_tight => [ - ($cmanager->{gui}{show_networks} ? ( + ($cmanager->{connection}->can('get_networks') ? ( gtknew('Label', text => N("Please select your network:"), alignment => [ 0, 0 ]), gtknew('ScrolledWindow', height => 160, child => $cmanager->{gui}{networks_list}), ) : ()), @@ -72,7 +73,7 @@ sub main { gtknew('Button', text => N("Configure"), image => gtknew('Image', file => 'configure-16'), clicked => sub { network::connection_manager::configure_connection($cmanager) }), - ($cmanager->{gui}{show_networks} ? + ($cmanager->{connection}->can('get_networks') ? $cmanager->{gui}{buttons}{refresh} = gtknew('Button', text => N("Refresh"), image => gtknew('Image', file => 'refresh', size => 16), |