[Pkg-mozext-commits] [nostalgy] 150/235: Overwrite autocomplete's startLookup method so that the popup is shown even when the text box is empty.
David Prévot
taffit at alioth.debian.org
Tue Oct 8 20:42:09 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository nostalgy.
commit c1ca7dd3a4560656d54822b72579c4bd3af1cb06
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.
git-svn-id: http://nostalgy.googlecode.com/svn/trunk@150 56b81dcf-5a2f-0410-9db0-014be2e416ff
---
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