[Pkg-mozext-commits] [nostalgy] 07/13: Support for SeaMonkey (by J. Hatlak).

David Prévot taffit at moszumanska.debian.org
Fri Feb 6 22:43:57 UTC 2015


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

taffit pushed a commit to branch master
in repository nostalgy.

commit cc7dffa59c037984b911b4fd12ffbddf5b6426de
Author: alain.frisch <alain.frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date:   Wed Aug 13 16:01:56 2014 +0000

    Support for SeaMonkey (by J. Hatlak).
    
    git-svn-id: http://nostalgy.googlecode.com/svn/trunk@244 56b81dcf-5a2f-0410-9db0-014be2e416ff
---
 content/nostalgy.js | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/content/nostalgy.js b/content/nostalgy.js
index 73e4703..272c976 100644
--- a/content/nostalgy.js
+++ b/content/nostalgy.js
@@ -316,17 +316,28 @@ function NostalgyCmd(lab,cmd,require_file) {
    nostalgy_folderBox.focus();
 
    // Force search on the empty string (-> recent folders)
-   NostalgyShowRecentFoldersList(nostalgy_folderBox);
+   NostalgyShowRecentFoldersList();
  }, 0);
  return true;
 }
 
-function NostalgyShowRecentFoldersList(box) {
-  var listener;
+function NostalgyShowRecentFoldersList() {
+  var listener = null;
+  var box = nostalgy_folderBox;
   if (box.controller) // Toolkit
     listener = box.controller.QueryInterface(Components.interfaces.nsIAutoCompleteObserver);
-  else // XPFE
-    listener = box.mAutoCompleteObserver;
+  else { // XPFE
+    // box.mAutoCompleteObserver uses a flawed equality check so we have to replace it.
+    // Since we only use one autocompleter, its name is equal to the autocompletesearch attribute.
+    listener = {
+      onSearchResult: function(aSearch, aResult) {
+        box.processResults(box.getAttribute("autocompletesearch"), aResult);
+      }
+    };
+    // Reset internal state
+    box.currentSearchString = "";
+  }
+
   NostalgyAutocompleteComponent().startSearch("", box.searchParam, null, listener);
 }
 

-- 
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