From 7ae659aee0cb8c8e7b82ff8e27fc06a512ca63c8 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Wed, 20 Nov 2013 08:45:51 +0100 Subject: [PATCH] Unity Scope: allow adjusting the max results count using the unityscopemaxresults config variable --- src/desktop/unity-scope-recoll/unity_recoll_daemon.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/desktop/unity-scope-recoll/unity_recoll_daemon.py b/src/desktop/unity-scope-recoll/unity_recoll_daemon.py index 21b5d95e..9455d419 100755 --- a/src/desktop/unity-scope-recoll/unity_recoll_daemon.py +++ b/src/desktop/unity-scope-recoll/unity_recoll_daemon.py @@ -271,8 +271,13 @@ class RecollScopeSearch(Unity.ScopeSearchBase): def __init__(self, search_context): super(RecollScopeSearch, self).__init__() self.set_search_context(search_context) + self.max_results = MAX_RESULTS if hasrclconfig: self.config = rclconfig.RclConfig() + try: + self.max_results = int(self.config.getConfParam("unityscopemaxresults")) + except: + pass def connect_db(self): #print("RecollScopeSearch: connect_db", file=sys.stderr) @@ -361,7 +366,7 @@ class RecollScopeSearch(Unity.ScopeSearchBase): dnd_uri=doc.url) actual_results += 1 - if actual_results >= MAX_RESULTS: + if actual_results >= self.max_results: break def date_filter (self, filters):