/[smeserver]/rpms/e-smith-lib/sme7/e-smith-lib-1.18.0-gauge.patch
ViewVC logotype

Contents of /rpms/e-smith-lib/sme7/e-smith-lib-1.18.0-gauge.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Tue Oct 7 18:41:09 2008 UTC (16 years ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
Error occurred while calculating annotation data.
FILE REMOVED
New streams

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-02-28 15:49:38.000000000 -0500
3 +++ mezzanine_patched_e-smith-lib-1.18.0/root/usr/lib/perl5/site_perl/esmith/console.pm 2007-02-28 15:16:31.000000000 -0500
4 @@ -224,7 +224,6 @@
5 my %params = @_;
6
7 my $title = $params{title};
8 - my $choice = $params{choice};
9 my $message_box = $params{text};
10
11 my $left = defined $params{left} ? $params{left} : gettext("Back");
12 @@ -298,7 +297,7 @@
13
14 =head2 yesno_page
15
16 -This methods displays a simple yes/no screen, so the user can make a
17 +This method displays a simple yes/no screen, so the user can make a
18 simple binary selection.
19
20 =cut
21 @@ -434,6 +433,50 @@
22 return ( gettext("keep"), "${keep_phrase}: $value" );
23 }
24
25 +=head2 gauge
26 +
27 +This method displays a progress bar. It takes a coderef as parameter, and uses
28 +the coderef to drive the --gauge widget of the dialog program, as well as to
29 +perform whatever actions are being reported by the progress bar. The coderef
30 +should take one parameter, which is the file handle to write the controlling
31 +text to. The coderef should return a string, which is displayed by a
32 +message_page after the progress bar terminates.
33 +
34 +All text used to update the progress bar should either be numbers between 0
35 +and 100, or arbitrary text sandwiched between leading and training lines
36 +of 'XXX' followed by newline. The numbers will update the percentage complete
37 +of the display, and the text will update the displayed text.
38 +
39 +=cut
40 +
41 +sub gauge
42 +{
43 + my $self = shift;
44 + my $sub = shift;
45 + my %params = @_;
46 + my $title = $params{title} || 'Progress';
47 + my $feedback_title = $params{feedback_title} || 'Status';
48 + my $init_text = $params{text} || 'Progress';
49 +
50 + use FileHandle;
51 +
52 + unless (open(WR, '|-'))
53 + {
54 + exec('/usr/bin/dialog',
55 + '--backtitle', $self->backtitle,
56 + '--title', gettext($title),
57 + '--gauge',
58 + gettext($init_text),
59 + SCREEN_ROWS,
60 + SCREEN_COLUMNS,
61 + );
62 + }
63 + WR->autoflush(1);
64 + my $text = &$sub(*WR);
65 + close(WR);
66 + $self->message_page('title' => $feedback_title, 'text' => $text);
67 +}
68 +
69 =head2 run_screens
70
71 This method takes a directory of screens to run, and runs them in order.

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed