aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-08 16:22:23 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-08 16:22:23 +0000
commitac174a10e01ba2e6a854e8e1e939c07d9b1aea9a (patch)
tree477383b8c788ebcb3e5bda79cfbe4791ba5fcb0c
parentc3899ecfc032dec415c2f67416ef86911cd38951 (diff)
downloadrpmdrake-ac174a10e01ba2e6a854e8e1e939c07d9b1aea9a.tar
rpmdrake-ac174a10e01ba2e6a854e8e1e939c07d9b1aea9a.tar.gz
rpmdrake-ac174a10e01ba2e6a854e8e1e939c07d9b1aea9a.tar.bz2
rpmdrake-ac174a10e01ba2e6a854e8e1e939c07d9b1aea9a.tar.xz
rpmdrake-ac174a10e01ba2e6a854e8e1e939c07d9b1aea9a.zip
(build_expander) simplify by passing only the used field
-rw-r--r--Rpmdrake/gui.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index 7d8be590..5f09ea62 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -80,7 +80,7 @@ sub get_summary {
}
sub build_expander {
- my ($key, $label, $type, $get_data) = @_;
+ my ($pkg, $label, $type, $get_data) = @_;
my $textview;
gtkadd(
gtkshow(my $exp = gtksignal_connect(
@@ -90,7 +90,7 @@ sub build_expander {
return if $first;
$first = 1;
slow_func($::main_window->window, sub {
- extract_header($pkgs->{$key}, $urpm, $type);
+ extract_header($pkg, $urpm, $type);
gtktext_insert($textview, $get_data->() || [ [ N("(Not available)") ] ]);
});
})),
@@ -152,7 +152,7 @@ sub format_pkg_simplifiedinfo {
)) ];
$exp0->set_use_markup(1);
push @$s, [ "\n\n" ];
- push @$s, [ build_expander($key, N("Files:"), 'files', sub {
+ push @$s, [ build_expander($pkg, N("Files:"), 'files', sub {
exists $pkg->{files} ?
ugtk2::markup_to_TextView_format('<tt>' . $spacing .
join("\n$spacing",
@@ -160,7 +160,7 @@ sub format_pkg_simplifiedinfo {
) . '</tt>') #- to highlight information
: ()}) ];
push @$s, [ "\n\n" ];
- push @$s, [ build_expander($key, N("Changelog:"), 'changelog', sub { $pkg->{changelog} }) ];
+ push @$s, [ build_expander($pkg, N("Changelog:"), 'changelog', sub { $pkg->{changelog} }) ];
$s;
}