[Pkg-mozext-commits] [nostalgy] 120/235: *** empty log message ***

David Prévot taffit at alioth.debian.org
Tue Oct 8 20:42:00 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 9e1434850603b17ff3555af7cc0ebd169447e34d
Author: frisch <frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date:   Fri Jun 15 16:23:41 2007 +0000

    *** empty log message ***
    
    
    git-svn-id: http://nostalgy.googlecode.com/svn/trunk@120 56b81dcf-5a2f-0410-9db0-014be2e416ff
---
 content/nostalgy.js |   67 ++++++++++++++++++++++++++++-----------------------
 1 file changed, 37 insertions(+), 30 deletions(-)

diff --git a/content/nostalgy.js b/content/nostalgy.js
index 13d8250..a89c828 100644
--- a/content/nostalgy.js
+++ b/content/nostalgy.js
@@ -824,11 +824,44 @@ function NostalgySearchMode(current,dir) {
   onEnterInSearchBar();
 }
 
-function onNostalgyKeyPress(ev) {
+function onNostalgyKeyPressCapture(ev) {
   var focused = "";
   try { focused = document.commandDispatcher.focusedElement.nodeName; }
   catch (ex) { }
+  if (!nostalgy_statusBar.hidden && focused != "html:input")
+    {
+    // ugly hack: it takes some time for the folderBox to be focused
+    if (ev.charCode) {
+      nostalgy_folderBox.value =  nostalgy_folderBox.value + 
+          String.fromCharCode(ev.charCode);
+    }
+    NostalgyStopEvent(ev);
+    return;
+  }
+  if (nostalgy_search_focused) {
+    if (ev.keyCode == KeyEvent.DOM_VK_DOWN) {
+      var i = NostalgyCurrentSearchMode();
+      setTimeout(function(){NostalgySearchMode(i,1);},0);
+      NostalgyStopEvent(ev);
+      return;
+    }
+    if (ev.keyCode == KeyEvent.DOM_VK_UP) {
+      var i = NostalgyCurrentSearchMode();
+      setTimeout(function(){NostalgySearchMode(i,-1);},0);
+      NostalgyStopEvent(ev);
+      return;
+    }
+    if (ev.keyCode == KeyEvent.DOM_VK_ESCAPE) {
+      Search(""); 
+      setTimeout(SetFocusThreadPane,0);
+      NostalgyStopEvent(ev);
+      return;
+    }
+  }
+}
 
+
+function onNostalgyKeyPress(ev) {
   if (NostalgyEscapePressed >= 1) {
     if (!in_message_window && ev.charCode == 109) { // M
       NostalgyFocusMessagePane();
@@ -844,35 +877,8 @@ function onNostalgyKeyPress(ev) {
     }
     return;
   } 
-  if (!nostalgy_statusBar.hidden && focused != "html:input")
-    {
-    // ugly hack: it takes some time for the folderBox to be focused
-    if (ev.charCode) {
-      nostalgy_folderBox.value =  nostalgy_folderBox.value + 
-          String.fromCharCode(ev.charCode);
-    }
-    NostalgyStopEvent(ev);
-    return;
-  }
+
   var kn = RecognizeKey(ev);
-  if (ev.keyCode == KeyEvent.DOM_VK_DOWN && nostalgy_search_focused) {
-    var i = NostalgyCurrentSearchMode();
-    setTimeout(function(){NostalgySearchMode(i,1);},0);
-    NostalgyStopEvent(ev);
-    return;
-  }
-  if (ev.keyCode == KeyEvent.DOM_VK_UP && nostalgy_search_focused) {
-    var i = NostalgyCurrentSearchMode();
-    setTimeout(function(){NostalgySearchMode(i,-1);},0);
-    NostalgyStopEvent(ev);
-    return;
-  }
-  if (ev.keyCode == KeyEvent.DOM_VK_ESCAPE && nostalgy_search_focused) {
-    Search(""); 
-    setTimeout(SetFocusThreadPane,0);
-    NostalgyStopEvent(ev);
-    return;
-  }
   if (ev.charCode && ev.originalTarget.localName == "input" 
       && !ev.ctrlKey && !ev.altKey) 
     return;
@@ -939,6 +945,7 @@ function onNostalgyKeyUp(ev) {
 window.addEventListener("load", onNostalgyLoad, false);
 window.addEventListener("resize", onNostalgyResize, false);
 window.addEventListener("unload", onNostalgyUnload, false);
-window.addEventListener("keypress", onNostalgyKeyPress, true);
+window.addEventListener("keypress", onNostalgyKeyPress, false);
+window.addEventListener("keypress", onNostalgyKeyPressCapture, true);
 window.addEventListener("keydown", onNostalgyKeyDown, true);
 window.addEventListener("keyup", onNostalgyKeyUp, true);

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