aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--Rpmdrake/gui.pm24
2 files changed, 27 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 2e323091..263d4f84 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- rpmdrake
+ o added dependencies section in package details panel
+
Version 5.17 - 1 June 2009, Thierry Vignaud
- consider chrooted /etc/product.id when detecting whether installed
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;
}