diff options
author | Thierry Vignaud <tv@mandriva.org> | 2006-08-23 09:25:50 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2006-08-23 09:25:50 +0000 |
commit | cc541ebb34f666af5f4b733eee2cc18f54e4d982 (patch) | |
tree | 00cb268dd3e150a438a9319508746f76fa07e1a3 | |
parent | 6cb0a4063039616a6a13ebc4256e97040f9fd2e2 (diff) | |
download | rpmdrake-cc541ebb34f666af5f4b733eee2cc18f54e4d982.tar rpmdrake-cc541ebb34f666af5f4b733eee2cc18f54e4d982.tar.gz rpmdrake-cc541ebb34f666af5f4b733eee2cc18f54e4d982.tar.bz2 rpmdrake-cc541ebb34f666af5f4b733eee2cc18f54e4d982.tar.xz rpmdrake-cc541ebb34f666af5f4b733eee2cc18f54e4d982.zip |
(node_state) handle more states
-rwxr-xr-x | rpmdrake | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) = @_; |