aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-05-08 06:53:50 +0000
committerThierry Vignaud <tv@mandriva.org>2008-05-08 06:53:50 +0000
commitc0379a5a7083d1fb05b805f1e08ca2c32a29dd7e (patch)
tree5c9ad5a6065a9867a7c110fa8fd8eb059f225168 /Rpmdrake
parentd96224520f2c8018b8c8bdb649981858f06bbc48 (diff)
downloadrpmdrake-c0379a5a7083d1fb05b805f1e08ca2c32a29dd7e.tar
rpmdrake-c0379a5a7083d1fb05b805f1e08ca2c32a29dd7e.tar.gz
rpmdrake-c0379a5a7083d1fb05b805f1e08ca2c32a29dd7e.tar.bz2
rpmdrake-c0379a5a7083d1fb05b805f1e08ca2c32a29dd7e.tar.xz
rpmdrake-c0379a5a7083d1fb05b805f1e08ca2c32a29dd7e.zip
(format_pkg_simplifiedinfo) display URLs of packages (#40571)
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/gui.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index ebf74720..80c48d20 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -177,6 +177,21 @@ sub format_pkg_simplifiedinfo {
),
);
+ my $url = $upkg->url || $pkg->{url};
+ if (!$url) {
+ open_rpm_db()->traverse_tag('name', [ $upkg->name ], sub { $url = $_[0]->url });
+ }
+
+ if ($url) {
+ push @$details_txt,
+ @{ ugtk2::markup_to_TextView_format(format_field("\n$spacing" . N("URL: "))) },
+ [ my $link = gtkshow(Gtk2::LinkButton->new($url, $url)) ];
+ $link->set_uri_hook(sub {
+ my (undef, $url) = @_;
+ run_program::raw({ detach => 1, setuid => get_parent_uid() }, 'www-browser', $url);
+ });
+ }
+
push @$s, [ gtkadd(gtkshow(my $exp0 = Gtk2::Expander->new(format_field(N("Details:")))),
gtknew('TextView', text => $details_txt)) ];
$exp0->set_use_markup(1);