diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-05-08 06:53:50 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-05-08 06:53:50 +0000 |
commit | c0379a5a7083d1fb05b805f1e08ca2c32a29dd7e (patch) | |
tree | 5c9ad5a6065a9867a7c110fa8fd8eb059f225168 | |
parent | d96224520f2c8018b8c8bdb649981858f06bbc48 (diff) | |
download | rpmdrake-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)
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | Rpmdrake/gui.pm | 15 |
2 files changed, 16 insertions, 0 deletions
@@ -1,3 +1,4 @@ +- display URLs of packages (#40571) - handle gracefully locked RPM DB when trying to install some packages (#40244) - rpmdrake: 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); |