summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/logdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-07-09 16:01:00 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-07-09 16:01:00 +0000
commitbdd3c581cde1d9fed4cf5c42062a83cec3fbb1ce (patch)
tree508433b3a3d1eea11fa8b96623b7cdde3616a01e /perl-install/standalone/logdrake
parent2403c1c4d98749fbef5740c7dcaccc017da890a9 (diff)
downloaddrakx-bdd3c581cde1d9fed4cf5c42062a83cec3fbb1ce.tar
drakx-bdd3c581cde1d9fed4cf5c42062a83cec3fbb1ce.tar.gz
drakx-bdd3c581cde1d9fed4cf5c42062a83cec3fbb1ce.tar.bz2
drakx-bdd3c581cde1d9fed4cf5c42062a83cec3fbb1ce.tar.xz
drakx-bdd3c581cde1d9fed4cf5c42062a83cec3fbb1ce.zip
switch from gtk2-perl to gtk2-perl-xs
Diffstat (limited to 'perl-install/standalone/logdrake')
-rwxr-xr-xperl-install/standalone/logdrake15
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));
}