diff options
author | Aurélien Lefebvre <alefebvre@mandriva.com> | 2009-09-04 10:07:26 +0000 |
---|---|---|
committer | Aurélien Lefebvre <alefebvre@mandriva.com> | 2009-09-04 10:07:26 +0000 |
commit | 88c3b6c1348c3d895562134dbdefdaeb38ad5446 (patch) | |
tree | 568bd33eccc8e4ac66da822ee5d62317b18598fd /Rpmdrake/gui.pm | |
parent | ae9b6af1ea8cb15fbe8ab56f2cc9b9010c930b4a (diff) | |
download | rpmdrake-88c3b6c1348c3d895562134dbdefdaeb38ad5446.tar rpmdrake-88c3b6c1348c3d895562134dbdefdaeb38ad5446.tar.gz rpmdrake-88c3b6c1348c3d895562134dbdefdaeb38ad5446.tar.bz2 rpmdrake-88c3b6c1348c3d895562134dbdefdaeb38ad5446.tar.xz rpmdrake-88c3b6c1348c3d895562134dbdefdaeb38ad5446.zip |
- rpmdrake
o added dependencies section in package details panel
Diffstat (limited to 'Rpmdrake/gui.pm')
-rw-r--r-- | Rpmdrake/gui.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index 40334a42..e1d0abbc 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -201,6 +201,30 @@ sub format_pkg_simplifiedinfo { : () }) ]; push @$s, [ "\n\n" ]; push @$s, [ build_expander($pkg, N("Changelog:"), 'changelog', sub { $pkg->{changelog} }, $installed_version) ]; + + push @$s, [ "\n\n" ]; + if ($upkg->id) { # If not installed + my $deps_textview; + push @$s, [ gtkadd( + gtksignal_connect( + gtkshow(my $dependencies = Gtk2::Expander->new(format_field(N("Dependencies:")))), + activate => sub { + slow_func($::main_window->window, sub { + my @requested = $urpm->resolve_requested( + open_rpm_db(), $urpm->{state}, + { $upkg->id => 1 }, + ); + $urpm->disable_selected(open_rpm_db(), $urpm->{state}, @requested); + my @nodes_with_deps = map { urpm_name($_) } @requested; + my @deps = sort { $a cmp $b } difference2(\@nodes_with_deps, [ urpm_name($upkg) ]); + gtktext_insert($deps_textview, join("\n", @deps)); + }); + } + ), + $deps_textview = gtknew('TextView') + ) ]; + $dependencies->set_use_markup(1); + } $s; } |