From 8a4b29f7b0c727357677ad2c6d476a19770b082f Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 11 Aug 2004 06:46:32 +0000 Subject: run UpdateStatus after a timeout in case 'ps' output isn't updated immediately --- perl-install/standalone/drakroam | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perl-install/standalone/drakroam') diff --git a/perl-install/standalone/drakroam b/perl-install/standalone/drakroam index bd0597292..3454fe0b9 100755 --- a/perl-install/standalone/drakroam +++ b/perl-install/standalone/drakroam @@ -168,6 +168,7 @@ sub UpdateAll { sub UpdateRoaming() { my $status = (any { /wlandetect$/ } run_program::get_stdout("ps", "-A")) ? "on" : "off"; $RoamStatus->set_text("Roaming: $status"); + return FALSE; #- do not update again if launched on timeout } sub UpdateStatus() { @@ -280,12 +281,12 @@ sub WriteConfig() { sub StartRoam { system("killall wlandetect; $WLanDetect -d -t $ScanInterval &"); - &UpdateRoaming + Glib::Timeout->add(1000, \&UpdateRoaming); } sub StopRoam { system("killall wlandetect"); - &UpdateRoaming; + Glib::Timeout->add(1000, \&UpdateRoaming); } sub SetInterval() { -- cgit v1.2.1