[kupfer] plugin.locate: Take first 12, not 10 results
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] plugin.locate: Take first 12, not 10 results
- Date: Wed, 4 Nov 2009 16:46:27 +0000 (UTC)
commit 6e909abc20b15d918df8c6a72195434a54eed9e2
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Wed Nov 4 13:56:36 2009 +0100
plugin.locate: Take first 12, not 10 results
Right now, the result table lists the first 10 results *that are
valid*. If any of the first ten are not valid, that means we still
have to wait for the full result from locate -- so we give it a margin
of some extra files by taking the first 12.
kupfer/plugin/locate.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/kupfer/plugin/locate.py b/kupfer/plugin/locate.py
index 2dc5423..ac0e039 100644
--- a/kupfer/plugin/locate.py
+++ b/kupfer/plugin/locate.py
@@ -48,11 +48,11 @@ class LocateQuerySource (Source):
def get_items(self):
ignore_case = '--ignore-case' if __kupfer_settings__["ignore_case"] else ''
- # Start two processes, one to take the first 10 hits, one
+ # Start two processes, one to take the first hits, one
# to take the remaining up to maximum. We start both at the same time
# (regrettably, locate wont output streamingly to stdout)
- # but we ask the second for results only after iterating the first 10
- first_num = 10
+ # but we ask the second for results only after iterating the first few
+ first_num = 12
first_command = ("locate --quiet --null --limit %d %s '%s'" %
(first_num, ignore_case, self.query))
full_command = ("locate --quiet --null --limit %d %s '%s'" %
@@ -66,7 +66,7 @@ class LocateQuerySource (Source):
for F in get_locate_output(p1, 0):
yield F
- for F in get_locate_output(p2, 10):
+ for F in get_locate_output(p2, first_num):
yield F
def get_gicon(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]