aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-09-18 14:14:56 +0000
committerThierry Vignaud <tv@mandriva.org>2006-09-18 14:14:56 +0000
commit2258754d45b41b32fa9735ba6550255be2f88770 (patch)
tree5f997e8c758286ccda6a94cfafc09a17697e053d
parent0d382496ba9d75f7abdb8f949987754c5a6cfe44 (diff)
downloadrpmdrake-2258754d45b41b32fa9735ba6550255be2f88770.tar
rpmdrake-2258754d45b41b32fa9735ba6550255be2f88770.tar.gz
rpmdrake-2258754d45b41b32fa9735ba6550255be2f88770.tar.bz2
rpmdrake-2258754d45b41b32fa9735ba6550255be2f88770.tar.xz
rpmdrake-2258754d45b41b32fa9735ba6550255be2f88770.zip
(format_pkg_simplifiedinfo) display a URL button on security advisory
-rwxr-xr-xrpmdrake16
1 files changed, 12 insertions, 4 deletions
diff --git a/rpmdrake b/rpmdrake
index 7585207c..914eb545 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -642,10 +642,18 @@ sub format_pkg_simplifiedinfo {
format_field(N("Importance: ")) . escape_text_for_TextView_markup_format($descriptions->{$name}{importance}),
format_field(N("Reason for update: ")) . escape_text_for_TextView_markup_format(rpm_description($descriptions->{$name}{pre})),
),
- '', # extra empty line
- (escape_text_for_TextView_markup_format($pkgs->{$key}{description} || $descriptions->{$name}{description}) || '<i>' . N("No description") . '</i>'),
- ));
- push @$s, [ "\n\n" ];
+ '')); # extra empty line
+ if ($update_descr) {
+ push @$s, [ my $link = gtkshow(Gtk2::LinkButton->new($descriptions->{$name}{URL}, N("Security advisory"))) ];
+ $link->set_uri_hook(sub {
+ my (undef, $url) = @_;
+ run_program::raw({ detach => 1 }, 'www-browser', $url);
+ });
+ }
+
+ push @$s, @{ ugtk2::markup_to_TextView_format(join("\n",
+ (escape_text_for_TextView_markup_format($pkgs->{$key}{description} || $descriptions->{$name}{description}) || '<i>' . N("No description") . '</i>')
+ )) };
push @$s, [ gtkadd(gtkshow(my $exp = Gtk2::Expander->new(format_field(N("Files:")))),
gtktext_insert(Gtk2::TextView->new,
exists $pkgs->{$key}{files} ?