aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-08-25 14:45:10 +0000
committerThierry Vignaud <tv@mandriva.org>2006-08-25 14:45:10 +0000
commitfd6620b5f318d761b3f6a9ed3726bc720f17f41d (patch)
tree2a1027453c0626315fcd82a58cb17da1283f31e4
parent5cd7298cc230cf9ea78e47d6c0f135720bf11cf4 (diff)
downloadrpmdrake-fd6620b5f318d761b3f6a9ed3726bc720f17f41d.tar
rpmdrake-fd6620b5f318d761b3f6a9ed3726bc720f17f41d.tar.gz
rpmdrake-fd6620b5f318d761b3f6a9ed3726bc720f17f41d.tar.bz2
rpmdrake-fd6620b5f318d761b3f6a9ed3726bc720f17f41d.tar.xz
rpmdrake-fd6620b5f318d761b3f6a9ed3726bc720f17f41d.zip
(get_icon) use smaller icons for subgroups
-rwxr-xr-xrpmdrake9
1 files changed, 5 insertions, 4 deletions
diff --git a/rpmdrake b/rpmdrake
index 031b498b..41b1af9a 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -635,7 +635,6 @@ sub format_pkg_info {
sub run_treeview_dialog {
my ($callback_action) = @_;
- add_icon_path('/usr/share/icons/');
my ($urpm, $pkgs, $descriptions);
my $pkgs_provider = sub {
my ($options, $mode) = @_;
@@ -708,9 +707,11 @@ sub run_treeview_dialog {
get_icon => sub {
my ($group, $parent) = @_;
my $pixbuf;
- eval { $pixbuf = gtkcreate_pixbuf($group_icons{$group}) };
- eval { $pixbuf ||= gtkcreate_pixbuf($group_icons{$parent}) } if $parent;
- $pixbuf ||= gtkcreate_pixbuf('applications_section');
+ my $path = $group =~ /\|/ ? '/usr/share/icons/mini/' : '/usr/share/icons/';
+ my $create_pixbuf = sub { gtkcreate_pixbuf(join('', $path, $_[0], '.png')) };
+ eval { $pixbuf = $create_pixbuf->($group_icons{$group}) };
+ eval { $pixbuf ||= $create_pixbuf->($group_icons{$parent}) } if $parent;
+ $pixbuf ||= $create_pixbuf->('applications_section');
},
node_state => sub {
my $pkg = $pkgs->{$_[0]};