[Pkg-mozext-commits] [nostalgy] 228/252: Support for multiple boxes.
David Prévot
taffit at moszumanska.debian.org
Tue Jun 14 15:25:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository nostalgy.
commit d1f82296bb9ee0c5784afe1434651aa026f0aa4f
Author: alain.frisch <alain.frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date: Mon Dec 16 14:25:40 2013 +0000
Support for multiple boxes.
---
components/nostalgy-autocomplete.js | 11 ++++++-----
content/folders.js | 1 +
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/components/nostalgy-autocomplete.js b/components/nostalgy-autocomplete.js
index eb2b282..ede033b 100644
--- a/components/nostalgy-autocomplete.js
+++ b/components/nostalgy-autocomplete.js
@@ -24,7 +24,7 @@ NostalgyAutoCompleteResult.prototype = {
_results: [],
get searchString() { return this._searchString; },
- get searchResult() { return this._searchResult; },
+ get searchResult() { return this._searchResult; },
get defaultIndex() { return 0; },
get errorDescription() { return ""; },
get matchCount() { return this._results.length; },
@@ -48,16 +48,17 @@ NostalgyAutoCompleteSearch.prototype = {
classID: CLASS_ID,
classDescription : CLASS_NAME,
contractID : CONTRACT_ID,
- _f: null,
+ _f: {},
+ _id: 0,
- attachGetValuesFunction: function(f) { this._f = f; },
+ attachGetValuesFunction: function(f) { this._id++; this._f[this._id] = f; return this._id; },
startSearch: function(searchString, searchParam, previousResult, listener) {
- var searchResults = this._f(searchString);
+ var searchResults = this._f[searchParam](searchString);
var result = new NostalgyAutoCompleteResult(searchString, searchResults);
listener.onSearchResult(this, result);
},
-
+
stopSearch: function() {},
QueryInterface: XPCOMUtils.generateQI([ Ci.nsIAutoCompleteSearch ])
diff --git a/content/folders.js b/content/folders.js
index d49f466..c703b14 100644
--- a/content/folders.js
+++ b/content/folders.js
@@ -288,6 +288,7 @@ function NostalgyFolderSelectionBox(box) {
.getService()
.wrappedJSObject;
nac.attachGetValuesFunction(NostalgyGetAutoCompleteValuesFunction(box));
+ box.searchParam = nac.attachGetValuesFunction(NostalgyGetAutoCompleteValuesFunction(box));
box.processInput = NostalgyProcessInput;
box.processKeyPress = NostalgyProcessKeyPress;
box.startLookup = NostalgyStartLookup;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/nostalgy.git
More information about the Pkg-mozext-commits
mailing list