diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2002-08-29 14:50:48 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2002-08-29 14:50:48 +0000 |
commit | 600b95b34944bed247fc15e5eee04a9b2c81c7b5 (patch) | |
tree | e6dc3d93dd0c59f19da0e9080d86627f6277f426 | |
parent | 54e7cda28fdef1a45d1a957780eb6e5ca94e04b1 (diff) | |
download | rpmdrake-600b95b34944bed247fc15e5eee04a9b2c81c7b5.tar rpmdrake-600b95b34944bed247fc15e5eee04a9b2c81c7b5.tar.gz rpmdrake-600b95b34944bed247fc15e5eee04a9b2c81c7b5.tar.bz2 rpmdrake-600b95b34944bed247fc15e5eee04a9b2c81c7b5.tar.xz rpmdrake-600b95b34944bed247fc15e5eee04a9b2c81c7b5.zip |
when searching in "by selection" or "by update availability" modes,
instead of limiting search results, categorize search results
-rwxr-xr-x | rpmdrake | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -190,10 +190,13 @@ sub do_search($$$$$$) { } else { @search_results = grep { eval { $_ =~ /$entry/i } } keys %$pkgs; } - $options->{tree_mode} eq 'by_presence' and @search_results = grep { $pkgs->{$_}{pkg}->flag_installed } @search_results; - $options->{tree_mode} eq 'by_selection' and @search_results = grep { $pkgs->{$_}{selected} } @search_results; if (@search_results) { - $options->{add_nodes}->(map { [ $_, _("Search results") ] } sort { uc($a) cmp uc($b) } @search_results); + $options->{add_nodes}->(map { [ $_, _("Search results").($options->{tree_mode} eq 'by_presence' + ? '|'.($pkgs->{$_}{pkg}->flag_installed ? _("Upgradable") : _("Addable")) + : ($options->{tree_mode} eq 'by_selection' + ? '|'.($pkgs->{$_}{selected} ? _("Selected") : _("Not selected")) + : '')) + ] } sort { uc($a) cmp uc($b) } @search_results); $tree->expand($tree->node_nth($tree->rows-1)); } else { $options->{add_nodes}->([ '', $results_none, { nochild => 1 }]); |