summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-08-11 06:46:32 +0000
committerOlivier Blin <oblin@mandriva.org>2004-08-11 06:46:32 +0000
commit8a4b29f7b0c727357677ad2c6d476a19770b082f (patch)
treeaf783723b33a9cae237ecd75f7a1bb1a2e513fd0
parent0775ad6ba1c141bd0bfee8361d1e5fcd0a35e85e (diff)
downloaddrakx-8a4b29f7b0c727357677ad2c6d476a19770b082f.tar
drakx-8a4b29f7b0c727357677ad2c6d476a19770b082f.tar.gz
drakx-8a4b29f7b0c727357677ad2c6d476a19770b082f.tar.bz2
drakx-8a4b29f7b0c727357677ad2c6d476a19770b082f.tar.xz
drakx-8a4b29f7b0c727357677ad2c6d476a19770b082f.zip
run UpdateStatus after a timeout in case 'ps' output isn't updated immediately
-rwxr-xr-xperl-install/standalone/drakroam5
1 files changed, 3 insertions, 2 deletions
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() {