aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurélien Lefebvre <alefebvre@mandriva.com>2009-09-04 10:07:26 +0000
committerAurélien Lefebvre <alefebvre@mandriva.com>2009-09-04 10:07:26 +0000
commit88c3b6c1348c3d895562134dbdefdaeb38ad5446 (patch)
tree568bd33eccc8e4ac66da822ee5d62317b18598fd
parentae9b6af1ea8cb15fbe8ab56f2cc9b9010c930b4a (diff)
downloadrpmdrake-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
-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;
}