diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-01-31 15:03:48 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-01-31 15:03:48 +0000 |
commit | 5f6ac0aee772f055565ee614e5dd3c0ba0b7a6b8 (patch) | |
tree | 669c9934b84c173f7382e7223cccd55f72ae25c2 /perl-install/standalone | |
parent | c7245deb260a6ad896029e36310f2d09c302369f (diff) | |
download | drakx-backup-do-not-use-5f6ac0aee772f055565ee614e5dd3c0ba0b7a6b8.tar drakx-backup-do-not-use-5f6ac0aee772f055565ee614e5dd3c0ba0b7a6b8.tar.gz drakx-backup-do-not-use-5f6ac0aee772f055565ee614e5dd3c0ba0b7a6b8.tar.bz2 drakx-backup-do-not-use-5f6ac0aee772f055565ee614e5dd3c0ba0b7a6b8.tar.xz drakx-backup-do-not-use-5f6ac0aee772f055565ee614e5dd3c0ba0b7a6b8.zip |
(format_trace_with_message) factorize some formatting code
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/drakbug | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug index 1dd87f6b0..37d193472 100755 --- a/perl-install/standalone/drakbug +++ b/perl-install/standalone/drakbug @@ -122,6 +122,11 @@ $table = create_packtable({ col_spacings => 5, row_spacings => 10 }, $comb_app->set_popdown_strings("", uniq(sort(@generic_tool), if_($prog, $prog))); $comb_app->set_text(""); +sub format_trace_with_message { + my ($message, $trace) = @_; + ([ $message ], [ "\n\n " . join("\n ", split("\n", $trace)) . "\n\n", { family => 'monospace' }]); +} + my $parent_uid = get_parent_uid(); gtkadd($window->{window}, @@ -131,25 +136,13 @@ gtkadd($window->{window}, gtknew('TextView', editable => 0, height => 200, text => [ if_($prog && $error, - [ + format_trace_with_message( ($gdb_trace ? N("The \"%s\" program has segfaulted with the following error:", $prog) : N("The \"%s\" program has crashed with the following error:", $prog)), - ], - [ - "\n\n " . join("\n ", split("\n", $error)) . "\n\n", - { family => 'monospace' } - ] - ), - if_($prog && $gdb_trace, - [ - N("Its gdb trace is:") - ], - [ - "\n\n " . join("\n ", split("\n", $gdb_trace)) . "\n\n", - { family => 'monospace' } - ] + $error) ), + if_($prog && $gdb_trace, format_trace_with_message(N("Its gdb trace is:"), $gdb_trace)), [ N("To submit a bug report, click on the report button. \nThis will open a web browser window on %s where you'll find a form to fill in. The information displayed above will be transferred to that server. \nThings useful to include in your report are the output of lspcidrake -v, kernel version, and /proc/cpuinfo.", $wizard_name) ] |