summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-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;
-}
-
##########################################################################################