aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-09-11 11:45:44 +0000
committerThierry Vignaud <tv@mandriva.org>2006-09-11 11:45:44 +0000
commit987562324bc06a13a9bee8a1de5032cb677e9cee (patch)
tree6eab8b62b6403c81234364a2e9af9670766b17c0
parent3e4d44e043adbbcfbbd94c8e3ae18cb2353056cd (diff)
downloadrpmdrake-987562324bc06a13a9bee8a1de5032cb677e9cee.tar
rpmdrake-987562324bc06a13a9bee8a1de5032cb677e9cee.tar.gz
rpmdrake-987562324bc06a13a9bee8a1de5032cb677e9cee.tar.bz2
rpmdrake-987562324bc06a13a9bee8a1de5032cb677e9cee.tar.xz
rpmdrake-987562324bc06a13a9bee8a1de5032cb677e9cee.zip
(format_pkg_simplifiedinfo) display changelog & file list using expanders
-rwxr-xr-xrpmdrake18
1 files changed, 17 insertions, 1 deletions
diff --git a/rpmdrake b/rpmdrake
index bac304ce..26d1e9cf 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -597,7 +597,7 @@ sub format_field {
sub format_pkg_simplifiedinfo {
my ($pkgs, $key, $urpm, $descriptions) = @_;
my ($name, $version) = split_fullname($key);
- ugtk2::markup_to_TextView_format(join("\n", format_header($name . ' - ' . $pkgs->{$key}{summary}),
+ my $s = ugtk2::markup_to_TextView_format(join("\n", format_header($name . ' - ' . $pkgs->{$key}{summary}),
if_(
$MODE eq 'update',
format_field(N("Importance: ")) . escape_text_for_TextView_markup_format($descriptions->{$name}{importance}),
@@ -606,6 +606,22 @@ sub format_pkg_simplifiedinfo {
'', # extra empty line
(escape_text_for_TextView_markup_format($pkgs->{$key}{description} || $descriptions->{$name}{description}) || '<i>' . N("No description") . '</i>'),
));
+ push @$s, [ "\n\n" ];
+ push @$s, [ gtkadd(gtkshow(my $exp = Gtk2::Expander->new(format_field(N("Files:\n")))),
+ exists $pkgs->{$key}{files}
+ ? gtktext_insert(Gtk2::TextView->new,
+ ugtk2::markup_to_TextView_format('<tt>' . join("\n", map { "\x{200e}$_" } @{$pkgs->{$key}{files}}) . '</tt>') #- to highlight information
+ )
+ : N("(Not available)"),
+ ) ];
+ $exp->set_use_markup(1);
+ push @$s, [ "\n\n" ];
+ push @$s, [ gtkadd(gtkshow(my $exp2 = Gtk2::Expander->new(format_field(N("Changelog:\n")))),
+ gtktext_insert(Gtk2::TextView->new, $pkgs->{$key}{changelog} ? $pkgs->{$key}{changelog} : N("(Not available)"))
+ ) ];
+ $exp2->set_use_markup(1);
+ $s;
+
}
sub format_pkg_info {