aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-08-29 14:50:48 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-08-29 14:50:48 +0000
commit600b95b34944bed247fc15e5eee04a9b2c81c7b5 (patch)
treee6dc3d93dd0c59f19da0e9080d86627f6277f426
parent54e7cda28fdef1a45d1a957780eb6e5ca94e04b1 (diff)
downloadrpmdrake-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-xrpmdrake9
1 files changed, 6 insertions, 3 deletions
diff --git a/rpmdrake b/rpmdrake
index e4ff0fbb..32cc48db 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -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 }]);