1 |
slords |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-lib-1.18.0/root/usr/lib/perl5/site_perl/esmith/console.pm mezzanine_patched_e-smith-lib-1.18.0/root/usr/lib/perl5/site_perl/esmith/console.pm |
2 |
|
|
--- e-smith-lib-1.18.0/root/usr/lib/perl5/site_perl/esmith/console.pm 2007-04-04 16:49:49.000000000 -0400 |
3 |
|
|
+++ mezzanine_patched_e-smith-lib-1.18.0/root/usr/lib/perl5/site_perl/esmith/console.pm 2007-04-04 16:49:27.000000000 -0400 |
4 |
|
|
@@ -439,13 +439,15 @@ |
5 |
|
|
the coderef to drive the --gauge widget of the dialog program, as well as to |
6 |
|
|
perform whatever actions are being reported by the progress bar. The coderef |
7 |
|
|
should take one parameter, which is the file handle to write the controlling |
8 |
|
|
-text to. The coderef should return a string, which is displayed by a |
9 |
|
|
+text to. If the return value of the coderef is defined, it is displayed by a |
10 |
|
|
message_page after the progress bar terminates. |
11 |
|
|
|
12 |
|
|
All text used to update the progress bar should either be numbers between 0 |
13 |
|
|
and 100, or arbitrary text sandwiched between leading and training lines |
14 |
|
|
of 'XXX' followed by newline. The numbers will update the percentage complete |
15 |
|
|
-of the display, and the text will update the displayed text. |
16 |
|
|
+of the display, and the text will update the displayed text. Updating the |
17 |
|
|
+displayed text will reset the precentage complete to 0, so text should always |
18 |
|
|
+be followed by number. |
19 |
|
|
|
20 |
|
|
=cut |
21 |
|
|
|
22 |
|
|
@@ -457,14 +459,18 @@ |
23 |
|
|
my $title = $params{title} || 'Progress'; |
24 |
|
|
my $feedback_title = $params{feedback_title} || 'Status'; |
25 |
|
|
my $init_text = $params{text} || 'Progress'; |
26 |
|
|
+ my @args = ( |
27 |
|
|
+ '--backtitle', $self->backtitle, |
28 |
|
|
+ '--title', gettext($title), |
29 |
|
|
+ ); |
30 |
|
|
+ push @args, "--clear" if $params{clear}; |
31 |
|
|
|
32 |
|
|
use FileHandle; |
33 |
|
|
|
34 |
|
|
unless (open(WR, '|-')) |
35 |
|
|
{ |
36 |
|
|
exec('/usr/bin/dialog', |
37 |
|
|
- '--backtitle', $self->backtitle, |
38 |
|
|
- '--title', gettext($title), |
39 |
|
|
+ @args, |
40 |
|
|
'--gauge', |
41 |
|
|
gettext($init_text), |
42 |
|
|
SCREEN_ROWS, |
43 |
|
|
@@ -474,7 +480,8 @@ |
44 |
|
|
WR->autoflush(1); |
45 |
|
|
my $text = &$sub(*WR); |
46 |
|
|
close(WR); |
47 |
|
|
- $self->message_page('title' => $feedback_title, 'text' => $text); |
48 |
|
|
+ $self->message_page('title' => $feedback_title, 'text' => $text) |
49 |
|
|
+ if defined $text; |
50 |
|
|
} |
51 |
|
|
|
52 |
|
|
=head2 run_screens |