diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-05-28 12:58:43 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-05-28 12:58:43 +0000 |
commit | c8ce404ab436e913e5ed78ff54706b6c90cbffb8 (patch) | |
tree | aa9cb8cdb0b26b02174136d72a7e939f32048e9b /lib/network/netcenter.pm | |
parent | 197d0726845097104132ed12576270fbb8f4c1d8 (diff) | |
download | drakx-net-c8ce404ab436e913e5ed78ff54706b6c90cbffb8.tar drakx-net-c8ce404ab436e913e5ed78ff54706b6c90cbffb8.tar.gz drakx-net-c8ce404ab436e913e5ed78ff54706b6c90cbffb8.tar.bz2 drakx-net-c8ce404ab436e913e5ed78ff54706b6c90cbffb8.tar.xz drakx-net-c8ce404ab436e913e5ed78ff54706b6c90cbffb8.zip |
do not use a networks list when there is only one network (cellular cards)
Diffstat (limited to 'lib/network/netcenter.pm')
-rwxr-xr-x | lib/network/netcenter.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/network/netcenter.pm b/lib/network/netcenter.pm index ca04085..d8e0cea 100755 --- a/lib/network/netcenter.pm +++ b/lib/network/netcenter.pm @@ -17,6 +17,7 @@ sub build_cmanager { my $cmanager = network::connection_manager->new($in, $net, $w, $pixbufs); $cmanager->set_connection($connection); + $cmanager->{gui}{show_unique_network} = $cmanager->{connection}->has_unique_network; if ($connection->can('get_networks')) { $cmanager->create_networks_list; @@ -73,8 +74,12 @@ sub main { 0, gtknew('Label', padding => [ 5, 0 ]), 1, gtknew('VBox', spacing => 5, children_tight => [ ($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}), + $cmanager->{gui}{show_unique_network} ? ( + $cmanager->{gui}{networks_list}, + ): ( + gtknew('Label', text => N("Please select your network:"), alignment => [ 0, 0 ]), + gtknew('ScrolledWindow', height => 160, child => $cmanager->{gui}{networks_list}) + ), ) : ()), gtknew('HBox', children => [ 1, gtknew('HButtonBox', spacing => 6, layout => 'start', children_loose => [ |