From 0606c3a0dfbf260ee27eec16fa90f32eedd8ae5b Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 30 Jul 2004 11:28:02 +0000 Subject: fix timeout usage --- perl-install/standalone/net_applet | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet index 76e808a03..964a951c1 100644 --- a/perl-install/standalone/net_applet +++ b/perl-install/standalone/net_applet @@ -11,7 +11,7 @@ use Gtk2::TrayIcon; use ugtk2 qw(:create :helpers :wrappers); my ($eventbox, $img); -my ($menu, $_timeout); +my ($menu, $timeout); my $raisedwindow = 0; my $onstartupfile = "$ENV{HOME}/.net_applet"; add_icon_path("/usr/share/libDrakX/pixmaps/"); @@ -119,7 +119,7 @@ sub getIP { return wantarray() ? @ip : $ip[0]; } sub cronNetwork() { - $_timeout = Glib::Timeout->add(60*1000, sub { + $timeout = Glib::Timeout->add(60*1000, sub { checkNetwork(); 1; }); @@ -146,6 +146,7 @@ sub setState { $menu } sub mainQuit() { + Glib::Source->remove($timeout) if $timeout; Gtk2->main_quit } sub setAutoStart { -- cgit v1.2.1