aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-03-03 16:21:22 +0000
committerThierry Vignaud <tv@mandriva.org>2010-03-03 16:21:22 +0000
commit3c1c8d60190ba3c20848257bb57e90557fac6604 (patch)
tree914d0e1fe5c0afa7a0f7e4b98c7a7cf7c3847aca
parent4acde2a949abf48945f2650cb61803aed000ed9b (diff)
downloadrpmdrake-3c1c8d60190ba3c20848257bb57e90557fac6604.tar
rpmdrake-3c1c8d60190ba3c20848257bb57e90557fac6604.tar.gz
rpmdrake-3c1c8d60190ba3c20848257bb57e90557fac6604.tar.bz2
rpmdrake-3c1c8d60190ba3c20848257bb57e90557fac6604.tar.xz
rpmdrake-3c1c8d60190ba3c20848257bb57e90557fac6604.zip
(get_description) split it out of format_pkg_simplifiedinfo()
-rw-r--r--Rpmdrake/gui.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index 5e928676..2ad32c02 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -138,6 +138,17 @@ sub get_advisory_link {
[ $link ];
}
+sub get_description {
+ my ($pkg, $update_descr) = @_;
+ @{ ugtk2::markup_to_TextView_format(join("\n",
+ (eval {
+ escape_text_for_TextView_markup_format(
+ $pkg->{description}
+ || $update_descr->{description});
+ } || '<i>' . N("No description") . '</i>')
+ )) };
+}
+
sub format_pkg_simplifiedinfo {
my ($pkgs, $key, $urpm, $descriptions) = @_;
@@ -164,9 +175,7 @@ sub format_pkg_simplifiedinfo {
'')); # extra empty line
push @$s, get_advisory_link($update_descr) if $is_update;
- push @$s, @{ ugtk2::markup_to_TextView_format(join("\n",
- (eval { escape_text_for_TextView_markup_format($pkg->{description} || $update_descr->{description}) } || '<i>' . N("No description") . '</i>')
- )) };
+ push @$s, get_description($pkg, $update_descr);
push @$s, [ "\n" ];
my $installed_version = eval { find_installed_version($upkg) };