From 75dc3515e3bee1f917392969e7cf8be27dfda83f Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 5 Mar 2008 22:12:00 +0000 Subject: show only non-zeroconf virtual interfaces --- lib/network/netcenter.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/network/netcenter.pm') diff --git a/lib/network/netcenter.pm b/lib/network/netcenter.pm index 2423b35..6c53114 100755 --- a/lib/network/netcenter.pm +++ b/lib/network/netcenter.pm @@ -10,6 +10,7 @@ use mygtk2; use ugtk2 qw(:create :helpers :wrappers); use network::connection; use network::connection_manager; +use network::tools; sub build_cmanager { my ($in, $net, $w, $pixbufs, $connection) = @_; @@ -41,9 +42,12 @@ sub main { my $wait = $in->wait_message(N("Please wait"), N("Please wait")); my @all_connections = map { $_->get_connections(automatic_only => 1, fast_only => 1) } network::connection::get_types; + @all_connections = grep { !network::tools::is_zeroconf_interface($_->get_interface) } @all_connections; my ($sysfs, $no_sysfs) = partition { exists $_->{device}{sysfs_device} } @all_connections; + my ($real, $other) = partition { network::tools::is_real_interface($_->get_interface) } @$sysfs; my @connections = ( - (uniq_ { $_->{device}{sysfs_device} } @$sysfs), + (uniq_ { $_->{device}{sysfs_device} } @$real), + (uniq_ { $_->{device}{sysfs_device} } @$other), (uniq_ { $_->{device}{interface} } @$no_sysfs), ); -- cgit v1.2.1