aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-09-21 12:49:47 +0000
committerThierry Vignaud <tv@mandriva.org>2007-09-21 12:49:47 +0000
commitb14d69694c045bf7c5bd99cb050b20e660b27bb7 (patch)
tree7e0ba62e23635a03a9b3d31a6089810b8766d90d
parent17f1ec836b2c5614979155844dcf320657075b38 (diff)
downloadrpmdrake-b14d69694c045bf7c5bd99cb050b20e660b27bb7.tar
rpmdrake-b14d69694c045bf7c5bd99cb050b20e660b27bb7.tar.gz
rpmdrake-b14d69694c045bf7c5bd99cb050b20e660b27bb7.tar.bz2
rpmdrake-b14d69694c045bf7c5bd99cb050b20e660b27bb7.tar.xz
rpmdrake-b14d69694c045bf7c5bd99cb050b20e660b27bb7.zip
(do_search) reorder tests (needed for next commit)
-rwxr-xr-xrpmdrake18
1 files changed, 9 insertions, 9 deletions
diff --git a/rpmdrake b/rpmdrake
index 3c81f23e..3884d969 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -59,7 +59,15 @@ sub do_search($$$$$$$) {
$options->{state}{flat} and $options->{delete_all}->();
$tree->collapse_all;
my @search_results;
- if ($current_search_type ne 'normal') {
+ if ($current_search_type eq 'normal') {
+ my $count;
+ foreach (@filtered_pkgs) {
+ next if !/$entry_rx/;
+ push @search_results, $_;
+ # FIXME: should be done for all research types
+ last if $count++ > 2000;
+ }
+ } else {
my $searchstop;
my $searchw = ugtk2->new(N("Software Management"), grab => 1, transient => $w->{real_window});
gtkadd(
@@ -119,14 +127,6 @@ sub do_search($$$$$$$) {
close $sf;
@search_results = uniq(@search_results); #- there can be multiple packages with same version/release for different arch's
$searchw->destroy;
- } else {
- my $count;
- foreach (@filtered_pkgs) {
- next if !/$entry_rx/;
- push @search_results, $_;
- # FIXME: should be done for all research types
- last if $count++ > 2000;
- }
}
if (@search_results) {
$options->{add_nodes}->(map { [ $_, N("Search results") . ($options->{tree_mode} eq 'by_presence'