[Pkg-mozext-commits] [nostalgy] 10/15: Support for multiple boxes.

Guido Guenther agx at moszumanska.debian.org
Mon Jul 14 11:15:43 UTC 2014


This is an automated email from the git hooks/post-receive script.

agx pushed a commit to annotated tag debian/0.2.32-1
in repository nostalgy.

commit 687462e5a969d5b8dea4197d5092c3efb7020d4a
Author: alain.frisch <alain.frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date:   Mon Dec 16 14:25:40 2013 +0000

    Support for multiple boxes.
    
    git-svn-id: svn://frisch.fr/nostalgy/trunk@229 56b81dcf-5a2f-0410-9db0-014be2e416ff
---
 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