diff options
author | Thierry Vignaud <tv@mandriva.org> | 2010-03-03 16:21:19 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2010-03-03 16:21:19 +0000 |
commit | 4acde2a949abf48945f2650cb61803aed000ed9b (patch) | |
tree | 60fd9d539023b3d3cdb20bcbc8099753515461b2 | |
parent | cfffae36751571918d3543d2616117a795c1210d (diff) | |
download | rpmdrake-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.pm | 13 |
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>') |