aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-08-23 09:25:50 +0000
committerThierry Vignaud <tv@mandriva.org>2006-08-23 09:25:50 +0000
commitcc541ebb34f666af5f4b733eee2cc18f54e4d982 (patch)
tree00cb268dd3e150a438a9319508746f76fa07e1a3
parent6cb0a4063039616a6a13ebc4256e97040f9fd2e2 (diff)
downloadrpmdrake-cc541ebb34f666af5f4b733eee2cc18f54e4d982.tar
rpmdrake-cc541ebb34f666af5f4b733eee2cc18f54e4d982.tar.gz
rpmdrake-cc541ebb34f666af5f4b733eee2cc18f54e4d982.tar.bz2
rpmdrake-cc541ebb34f666af5f4b733eee2cc18f54e4d982.tar.xz
rpmdrake-cc541ebb34f666af5f4b733eee2cc18f54e4d982.zip
(node_state) handle more states
-rwxr-xr-xrpmdrake8
1 files changed, 7 insertions, 1 deletions
diff --git a/rpmdrake b/rpmdrake
index a8b689e4..2a29dee0 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -714,7 +714,13 @@ sub run_treeview_dialog {
$pixbuf ||= gtkcreate_pixbuf('applications_section');
},
node_state => sub {
- $_[0] ? ($pkgs->{$_[0]}{selected} ? 'selected' : $pkgs->{$_[0]}{pkg}->flag_base ? '/usr/share/rpmdrake/icons/base.png' : 'unselected') : 'XXX';
+ my $pkg = $pkgs->{$_[0]};
+ my $urpm_obj = $pkg->{pkg};
+ $_[0] ? $pkg->{selected} ?
+ ($urpm_obj->flag_installed ? 'to_remove' : 'to_install')
+ : ($urpm_obj->flag_installed ?
+ ($urpm_obj->flag_upgrade ? 'to_update' : 'installed')
+ : ($urpm_obj->flag_base ? '/usr/share/rpmdrake/icons/base.png' : 'uninstalled')): 'XXX';
}, #- checks $_[0] -> hack for partial tree displaying
build_tree => sub {
my ($add_node, $flat, $mode) = @_;