[Pkg-mozext-commits] [nostalgy] 149/252: Overwrite autocomplete's startLookup method so that the popup is shown even when the text box is empty.

David Prévot taffit at moszumanska.debian.org
Tue Jun 14 15:24:51 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 a8ed3d5f3452c63cbb6bb960a862f48c82e8043d
Author: frisch <frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date:   Wed Mar 18 21:42:49 2009 +0000

    Overwrite autocomplete's startLookup method so that the popup is shown even when the text box is empty.
---
 content/edit_prefs.js |  2 --
 content/folders.js    | 22 +++++++++++++++++++++-
 files                 |  3 +++
 3 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/content/edit_prefs.js b/content/edit_prefs.js
index cb384eb..6f44318 100644
--- a/content/edit_prefs.js
+++ b/content/edit_prefs.js
@@ -136,8 +136,6 @@ function CreateItem(rule) {
   SetItem(item,rule);
   gList.appendChild(item);
   gList.selectedItem = item;
-  NostalgyDebug("Visible Rows: " + gList.getNumberOfVisibleRows());
-  NostalgyDebug("Row Count: " + gList.getRowCount());
 }
 
 
diff --git a/content/folders.js b/content/folders.js
index 7612f73..c96ecd0 100644
--- a/content/folders.js
+++ b/content/folders.js
@@ -160,7 +160,7 @@ function(text, results, listener) {
  };
 
  var f = function (folder) { add_folder(folder_name(folder)); };
-
+ 
  if (text == "") {
    for (var j = 0; j < nostalgy_recent_folders.length; j++)
      add_folder(nostalgy_recent_folders[j]);
@@ -191,6 +191,25 @@ function(iid) {
  throw Components.results.NS_NOINTERFACE;
 }
 
+function NostalgyStartLookup() {
+    // Copy from autocomplete.xml, but does not exit early if box is empty
+    var str = this.currentSearchString;
+
+    this.isSearching = true;
+    this.mFirstReturn = true;
+    this.mSessionReturns = this.sessionCount;
+    this.mFailureItems = 0;
+    this.mDefaultMatchFilled = false; // clear out our prefill state.
+
+    // tell each session to start searching...
+    for (var name in this.mSessions)
+        try {
+            this.mSessions[name].onStartLookup(str, this.mLastResults[name], this.mListeners[name]);
+        } catch (e) {
+            --this.mSessionReturns;
+            this.searchFailed();
+        }
+}
 
 function NostalgyProcessResults(aSessionName, aResults, aStatus) {
  this.clearResults(false); // clear results, but don't repaint yet
@@ -277,6 +296,7 @@ function NostalgyFolderSelectionBox(box) {
  box.addSession(new NostalgyAutocomplete(box));
  box.processInput = NostalgyProcessInput;
  box.processKeyPress = NostalgyProcessKeyPress;
+ box.startLookup = NostalgyStartLookup;
 }
 
 function NostalgyFolderSelectionBoxes() {
diff --git a/files b/files
index cea700b..8d41090 100644
--- a/files
+++ b/files
@@ -3,6 +3,8 @@ content/about.xul
 content/composer.js
 content/composerOverlay.xul
 content/dummy_window.xul
+content/edit_exceptions.js
+content/edit_exceptions.xul
 content/edit_prefs.js
 content/edit_prefs.xul
 content/edit_rule.js
@@ -11,6 +13,7 @@ content/folders.js
 content/messageOverlay.xul
 content/misc.js
 content/nostalgy.js
+content/nostalgy.js.orig
 content/nostalgy_keys.js
 content/thunderbirdOverlay.xul
 locale/en-US/nostalgy.dtd

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