aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-03-03 16:21:19 +0000
committerThierry Vignaud <tv@mandriva.org>2010-03-03 16:21:19 +0000
commit4acde2a949abf48945f2650cb61803aed000ed9b (patch)
tree60fd9d539023b3d3cdb20bcbc8099753515461b2
parentcfffae36751571918d3543d2616117a795c1210d (diff)
downloadrpmdrake-4acde2a949abf48945f2650cb61803aed000ed9b.tar
rpmdrake-4acde2a949abf48945f2650cb61803aed000ed9b.tar.gz
rpmdrake-4acde2a949abf48945f2650cb61803aed000ed9b.tar.bz2
rpmdrake-4acde2a949abf48945f2650cb61803aed000ed9b.tar.xz
rpmdrake-4acde2a949abf48945f2650cb61803aed000ed9b.zip
(get_advisory_link) split it out of format_pkg_simplifiedinfo()
-rw-r--r--Rpmdrake/gui.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index b08fc4b3..5e928676 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -131,6 +131,14 @@ sub build_expander {
}
+sub get_advisory_link {
+ my ($update_descr) = @_;
+ my $link = gtkshow(Gtk2::LinkButton->new($update_descr->{URL}, N("Security advisory")));
+ $link->set_uri_hook(\&run_help_callback);
+ [ $link ];
+}
+
+
sub format_pkg_simplifiedinfo {
my ($pkgs, $key, $urpm, $descriptions) = @_;
my ($name, $version, $release) = split_fullname($key);
@@ -154,10 +162,7 @@ sub format_pkg_simplifiedinfo {
format_field(N("Reason for update: ")) . format_update_field(rpm_description($update_descr->{pre})),
),
'')); # extra empty line
- if ($is_update) {
- push @$s, [ my $link = gtkshow(Gtk2::LinkButton->new($update_descr->{URL}, N("Security advisory"))) ];
- $link->set_uri_hook(\&run_help_callback);
- }
+ 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>')