From 3fb01f2059e111aa2ecc9707c3aaf7bafef8c7fe Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 27 Jan 2003 08:18:00 +0000 Subject: cosmetic fix for embedded mode: don't display "wait while parsing" window when embedded --- perl-install/standalone/logdrake | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'perl-install/standalone/logdrake') diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake index 92e1f0d40..a0d051ed7 100755 --- a/perl-install/standalone/logdrake +++ b/perl-install/standalone/logdrake @@ -243,17 +243,19 @@ sub parse_file { my ($file) = @_;#$_[0]; $file =~ s/\.gz$//; - gtkadd(my $win_pb = gtkset_modal(new Gtk2::Window('toplevel'), 1), - gtkpack(new Gtk2::VBox(2,0), - new Gtk2::Label(" " . N("please wait, parsing file: %s", $files{$_}{desc}) . " "), - my $pbar = new Gtk2::ProgressBar() - ) - ); - $win_pb->set_transient_for($my_win->{rwindow}) unless $::isEmbedded; - $win_pb->set_modal(1); - $win_pb->set_position('center'); - $win_pb->realize(); - $win_pb->show_all(); + unless ($::isEmbedded) { + gtkadd(my $win_pb = gtkset_modal(new Gtk2::Window('toplevel'), 1), + gtkpack(new Gtk2::VBox(2,0), + new Gtk2::Label(" " . N("please wait, parsing file: %s", $files{$_}{desc}) . " "), + my $pbar = new Gtk2::ProgressBar() + ) + ); + $win_pb->set_transient_for($my_win->{rwindow}) unless $::isEmbedded; + $win_pb->set_modal(1); + $win_pb->set_position('center'); + $win_pb->realize(); + $win_pb->show_all(); + } my $ey = $e_yes->get_chars(0, -1); my $en = $e_no->get_chars(0, -1); $ey =~ s/ OR /\|/; @@ -283,7 +285,7 @@ sub parse_file { my $i = 0; foreach (@all) { $i++; - if ($i % 10) { + if (!$::isEmbedded && $i % 10) { $pbar->set_fraction($i/$taille); gtkflush(); } @@ -292,7 +294,7 @@ sub parse_file { if (! /$en/i and /$ey/i) { logcolorize($_); next } if (! /$en/i and $ey eq "") { logcolorize($_); next } } - $win_pb->destroy(); + $win_pb->destroy() unless $::isEmbedded; if ($::isTail) { close F; -- cgit v1.2.1