diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-12-11 23:21:55 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-12-11 23:21:55 +0100 |
commit | cbf74f004888f056bc39d1d67004620cb31f194f (patch) | |
tree | 96feb42b630701a118a27180a5cfb81ddb4de0ac /lib/AdminPanel/Rpmdragora | |
parent | 0ebf574eb7a8bac32d6789724136b65088cd93b7 (diff) | |
download | colin-keep-cbf74f004888f056bc39d1d67004620cb31f194f.tar colin-keep-cbf74f004888f056bc39d1d67004620cb31f194f.tar.gz colin-keep-cbf74f004888f056bc39d1d67004620cb31f194f.tar.bz2 colin-keep-cbf74f004888f056bc39d1d67004620cb31f194f.tar.xz colin-keep-cbf74f004888f056bc39d1d67004620cb31f194f.zip |
Fixed output in pacakge details
Diffstat (limited to 'lib/AdminPanel/Rpmdragora')
-rw-r--r-- | lib/AdminPanel/Rpmdragora/gui.pm | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/AdminPanel/Rpmdragora/gui.pm b/lib/AdminPanel/Rpmdragora/gui.pm index 150c697..38bec25 100644 --- a/lib/AdminPanel/Rpmdragora/gui.pm +++ b/lib/AdminPanel/Rpmdragora/gui.pm @@ -197,25 +197,23 @@ sub get_main_text { my ($medium, $fullname, $name, $summary, $is_update, $update_descr) = @_; my $txt = get_string_from_keywords($medium, $fullname); - my $notice = MDK::Common::Func::if_($txt, format_field($loc->N("Notice: ")) . $txt . "\n") || ""; + my $notice = MDK::Common::Func::if_($txt, format_field($loc->N("Notice: ")) . $txt); ensure_utf8($notice); - my $hdr = format_header(join(' - ', $name, $summary)) . "\n"; + my $hdr = "<h2>" . format_header(join(' - ', $name, $summary)) . "</h2>"; ensure_utf8($hdr); my $update = MDK::Common::Func::if_($is_update, # is it an update? - format_field($loc->N("Importance: ")) . format_update_field($update_descr->{importance}) . "\n", - format_field($loc->N("Reason for update: ")) . format_update_field(rpm_description($update_descr->{pre})) . "\n", - ) || ""; + format_field($loc->N("Importance: ")) . format_update_field($update_descr->{importance}), + format_field($loc->N("Reason for update: ")) . format_update_field(rpm_description($update_descr->{pre})), + ); ensure_utf8($update); - # TODO Too many lines - join( - "\n", - $hdr, - $notice, - $update - ); + my $main_text = $hdr; + $main_text .= "<br /> " . $notice if $notice; + $main_text .= "<br /> " . $update if $update; + + return $main_text; } sub get_details { @@ -361,7 +359,9 @@ sub _format_pkg_simplifiedinfo { @changelog = $pkg->{changelog} ? @{$pkg->{changelog}} : ( $loc->N("(Not available)") ); } utf8::encode(\@changelog); - $changelog_link .= "\n\n". join("", @changelog); + + $changelog_link .= "<br /> " . join("<br /> ", @changelog); + $changelog_link =~ s|\n||g; AdminPanel::rpmdragora::remove_wait_msg($wait); } push @$s, join("\n\n", $changelog_link, "\n"); @@ -369,7 +369,7 @@ sub _format_pkg_simplifiedinfo { my $deps_link = format_link(format_field($loc->N("New dependencies:")), $hidden_info{new_deps} ); if ($options->{new_deps}) { if ($upkg->id) { # If not installed - $deps_link .= "\n\n". join("\n", @{get_new_deps($urpm, $upkg)}); + $deps_link .= "<br /> " . join("<br /> ", @{get_new_deps($urpm, $upkg)}); # push @$s, get_new_deps($urpm, $upkg); } } @@ -1214,7 +1214,7 @@ sub setInfoOnWidget { $infoWidget->setValue(""); - my $info_text ="<h2>" . $loc->N("Informations") . "</h2>"; + my $info_text = ""; my @data = get_info($pkgname, $options); for(@{$data[0]}){ |