From 59c52202ce716b3fbad8cb9977aaa566bf96d132 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Sat, 16 Oct 2004 17:37:45 +0000 Subject: (update) do not re-select the default interface every 5 seconds --- perl-install/standalone/net_monitor | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'perl-install') diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor index a7cc437d5..8c0d70cfb 100755 --- a/perl-install/standalone/net_monitor +++ b/perl-install/standalone/net_monitor @@ -450,11 +450,14 @@ sub update() { my $intf = $_; $notebook->remove_page($monitor->{$intf}{page}) unless member($intf,@intfs); } - for (my $num_p = 0; $num_p < $notebook->get_n_pages; $num_p++) { - if ($notebook->get_tab_label_text($notebook->get_nth_page($num_p)) eq $default_intf) { - $notebook->set_current_page($num_p); - last; - } + if (@intfs && !@interfaces) { + #- select the default interface at start + for (my $num_p = 0; $num_p < $notebook->get_n_pages; $num_p++) { + if ($notebook->get_tab_label_text($notebook->get_nth_page($num_p)) eq $default_intf) { + $notebook->set_current_page($num_p); + last; + } + } } @interfaces = @intfs; if ($isconnected != -2 && $isconnected != -1 && !$during_connection) { -- cgit v1.2.1