From 67376ed2a30600ffde62df3c5342da9ba0f8ecff Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 10 Sep 2004 04:19:49 +0000 Subject: (configure_net) use network::test to test internet connection --- perl-install/standalone/drakconnect | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 3d5099f2a..cf6fc22bc 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -39,6 +39,7 @@ use modules; use network::isdn; use network::adsl; use network::tools; +use network::test; use MDK::Common::Globals "network", qw($in); use POSIX ":sys_wait_h"; @@ -799,6 +800,21 @@ sub update2() { 1; } + +my $net_test; +sub update_network_status() { + unless ($net_test) { + $net_test = network::test->new; + $net_test->start; + } + if ($net_test->is_done) { + $isconnected = $net_test->is_connected; + update_intbutt(); + $net_test->start; + } + 1; +} + sub quit_global() { ugtk2->exit(0); } @@ -1021,7 +1037,8 @@ Run the \"Add Connection\" assistant from the Mandrakelinux Control Center")); ); $dialog->{rwindow}->show_all; - Glib::Timeout->add(200, \&update_intbutt); + update_network_status(); + Glib::Timeout->add(2000, \&update_network_status); $dialog->main; ugtk2->exit(0); } -- cgit v1.2.1