summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakbug
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-01-31 15:03:48 +0000
committerThierry Vignaud <tv@mandriva.org>2008-01-31 15:03:48 +0000
commit5f6ac0aee772f055565ee614e5dd3c0ba0b7a6b8 (patch)
tree669c9934b84c173f7382e7223cccd55f72ae25c2 /perl-install/standalone/drakbug
parentc7245deb260a6ad896029e36310f2d09c302369f (diff)
downloaddrakx-5f6ac0aee772f055565ee614e5dd3c0ba0b7a6b8.tar
drakx-5f6ac0aee772f055565ee614e5dd3c0ba0b7a6b8.tar.gz
drakx-5f6ac0aee772f055565ee614e5dd3c0ba0b7a6b8.tar.bz2
drakx-5f6ac0aee772f055565ee614e5dd3c0ba0b7a6b8.tar.xz
drakx-5f6ac0aee772f055565ee614e5dd3c0ba0b7a6b8.zip
(format_trace_with_message) factorize some formatting code
Diffstat (limited to 'perl-install/standalone/drakbug')
-rwxr-xr-xperl-install/standalone/drakbug23
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)
]