From 87f50c3f427e6d5c4db145a54d023640701ee121 Mon Sep 17 00:00:00 2001 From: Marina Zhurakhinskaya Date: Fri, 13 Feb 2009 15:31:10 -0500 Subject: [PATCH] Fix up triggering search in the overlay. Make sure to set this._searchQueued to true, so that we don't queue the search twice. Remove an unused variable. --- js/ui/overlay.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/ui/overlay.js b/js/ui/overlay.js index 1a7582d66..47e80887a 100644 --- a/js/ui/overlay.js +++ b/js/ui/overlay.js @@ -113,15 +113,14 @@ Sideshow.prototype = { text: ""}); this.actor.add_actor(this._searchEntry); this._searchQueued = false; - this._searchActive = false; this._searchEntry.connect('notify::text', function (se, prop) { if (me._searchQueued) return; + me._searchQueued = true; Mainloop.timeout_add(250, function() { // Strip leading and trailing whitespace let text = me._searchEntry.text.replace(/^\s+/g, "").replace(/\s+$/g, ""); me._searchQueued = false; - me._searchActive = text != ''; me._appDisplay.setSearch(text); me._docDisplay.setSearch(text); return false;