aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 }]);