diff options
Diffstat (limited to 'perl-install/standalone/logdrake')
-rwxr-xr-x | perl-install/standalone/logdrake | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake index 94fc15f9a..92b429a2f 100755 --- a/perl-install/standalone/logdrake +++ b/perl-install/standalone/logdrake @@ -142,6 +142,7 @@ my %files = ( ); my $yy = gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("search")) , clicked => \&search),0); +print "widget is $yy\n"; my $log_text = gtktext_insert(Gtk2::TextView->new, [ [ '' ] ]); my $log_buf = $log_text->get_buffer; @@ -168,7 +169,8 @@ gtkadd($my_win->{window}, map { $toggle{$_} = gtksignal_connect(new Gtk2::CheckButton($files{$_}{desc}), clicked => sub { $refcount_search++; - gtkset_sensitive($yy,$refcount_search); + print "widget is $yy\n"; + gtkset_sensitive($yy, $refcount_search); }) } keys %files, ) ), @@ -217,12 +219,12 @@ sub quit() { ugtk2->exit(0) } #------------------------------------------------------------- sub search() { $log_text->window->freeze_updates; - $log_buf->set_text('', -1); + $log_buf->set_text(''); if ($::isFile) { parse_file($::File); } else { foreach (keys %files) { - parse_file($files{$_}{file}, $files{$_}{desc}) if $toggle{$_}->active; + parse_file($files{$_}{file}, $files{$_}{desc}) if $toggle{$_}->get_active; } } $log_text->window->thaw_updates; @@ -298,7 +300,7 @@ sub parse_file { local $_; while (<F>) {}; #to prevent to output the file twice.. # $log_text->set_point($log_text->get_length()); - $timer ||= Gtk2->timeout_add(1000, sub { + $timer ||= Glib::Timeout->add(1000, sub { logcolorize($_) while <F>; seek F, 0, 1; }); @@ -362,7 +364,6 @@ sub logcolorize { sub log_output { gtktext_append($log_text, [ \@_ ]); $log_text->scroll_to_iter(my $iter = $log_buf->get_end_iter, 0, 1, 0.5, 0.5); - $iter->free; } @@ -479,7 +480,7 @@ print F $r; sub save() { $::isWizard = 0; - $yy = $in->ask_file(N("Save as.."), "/root") or return; + my $y = $in->ask_file(N("Save as.."), "/root") or return; my $buf = $log_text->get_buffer; - output($yy, $buf->get_text(($buf->get_bounds), 0)); + output($y, $buf->get_text(($buf->get_bounds), 0)); } |