summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-04-04 07:49:39 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-04-04 07:49:39 +0000
commite032366577d644b346fcb870d9150fb18b8edc5a (patch)
tree8dcae356a15590a4e5f45a11b9fffc3c59bb06e6
parentd346b7da18681208f8dbc457100d52b93a1d4884 (diff)
downloaddrakx-e032366577d644b346fcb870d9150fb18b8edc5a.tar
drakx-e032366577d644b346fcb870d9150fb18b8edc5a.tar.gz
drakx-e032366577d644b346fcb870d9150fb18b8edc5a.tar.bz2
drakx-e032366577d644b346fcb870d9150fb18b8edc5a.tar.xz
drakx-e032366577d644b346fcb870d9150fb18b8edc5a.zip
- perl_checker fixes
- ensure only one callback do regular parsing
-rwxr-xr-xperl-install/standalone/logdrake14
1 files changed, 7 insertions, 7 deletions
diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake
index 3984ea162..9ee51926e 100755
--- a/perl-install/standalone/logdrake
+++ b/perl-install/standalone/logdrake
@@ -232,9 +232,11 @@ sub search {
}
local *F;
+my $timer;
sub parse_file {
- my ($file, $descr) = @_;;
+ local *F = *F;
+ my ($file, $descr) = @_;
$file =~ s/\.gz$//;
my ($pbar, $win_pb);
@@ -298,15 +300,13 @@ sub parse_file {
local $_;
while (<F>) {}; #to prevent to output the file twice..
# $log_text->set_point($log_text->get_length());
- my $timer = Gtk2->timeout_add(1000, \&input_callback);
+ $timer ||= Gtk2->timeout_add(1000, sub {
+ logcolorize($_) while <F>;
+ seek F, 0, 1;
+ });
}
}
-sub input_callback {
- logcolorize($_) while <F>;
- seek F, 0, 1;
-}
-
##########################################################################################