[Pkg-mozext-commits] [nostalgy] 102/252: *** empty log message ***

David Prévot taffit at moszumanska.debian.org
Tue Jun 14 15:24:46 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 35bcfeb7abe061e54c7d39906ba5da315f9aa26e
Author: frisch <frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date:   Thu May 31 09:32:46 2007 +0000

    *** empty log message ***
---
 content/composer.js   |  6 +++---
 content/edit_prefs.js | 17 +++++++----------
 content/edit_rule.js  |  3 +--
 content/folders.js    |  5 +----
 content/misc.js       |  9 +++++++--
 content/nostalgy.js   | 37 ++++++++++++++++++-------------------
 files                 | 21 ++++++++++-----------
 7 files changed, 47 insertions(+), 51 deletions(-)

diff --git a/content/composer.js b/content/composer.js
index 4226405..6b21f9e 100644
--- a/content/composer.js
+++ b/content/composer.js
@@ -17,7 +17,7 @@ function nostalgy_awRecipientKeyPress(event, element) {
       element.value = u.substr(i,u.length - i);
       element.selectionStart = 0; element.selectionEnd = 0;
     }, 0);
-    event.stopPropagation();
+    NostalgyStopEvent(event);
     return;
   }
   }
@@ -40,7 +40,7 @@ function NostalgyKeyPress(ev) {
   else if (NostalgyEscapePressed >= 1) {
     if (ev.charCode == 97) { // A
       goDoCommand('cmd_attachFile');
-      ev.preventDefault();
+      NostalgyStopEvent(ev);
     }
   }
 }
@@ -52,4 +52,4 @@ function onNostalgyLoad(){
   window.addEventListener("keypress", NostalgyKeyPress, false);
 }
 
-window.addEventListener("load", onNostalgyLoad, false);
\ No newline at end of file
+window.addEventListener("load", onNostalgyLoad, false);
diff --git a/content/edit_prefs.js b/content/edit_prefs.js
index 17b94aa..0a307f3 100644
--- a/content/edit_prefs.js
+++ b/content/edit_prefs.js
@@ -346,8 +346,7 @@ function onKeyPress(ev) {
   // should only to that in the relevant tab
 
   else if (wait_key && ev.keyCode == KeyEvent.DOM_VK_ESCAPE) {
-    ev.preventDefault();
-    ev.stopPropagation();
+    NostalgyStopEvent(ev);
     wait_key.value = wait_key_old;
     wait_key = null;
   } else if (wait_key) /* && (ev.keyCode != 13 || ev.ctrlKey || ev.altKey)) */ {
@@ -355,19 +354,17 @@ function onKeyPress(ev) {
     wait_key = null;
   } else if (ev.keyCode == KeyEvent.DOM_VK_ESCAPE) {
     if 
-      (!confirm("Do you really want to cancel all your changes to the preferences?")) {
-      ev.preventDefault();
-      ev.stopPropagation();
-    }
+      (!confirm
+       ("Do you really want to cancel all your changes to the preferences?")) 
+      NostalgyStopEvent(ev);
   }
 }
 
 
 function Recognize(ev, tgt) {
- ev.preventDefault();
- ev.stopPropagation();
- var k = RecognizeKey(ev);
- if (k) tgt.value = k;
+  NostalgyStopEvent(ev);
+  var k = RecognizeKey(ev);
+  if (k) tgt.value = k;
 }
 
 function WaitKey(tgt) {
diff --git a/content/edit_rule.js b/content/edit_rule.js
index dedb398..5cdc317 100644
--- a/content/edit_rule.js
+++ b/content/edit_rule.js
@@ -64,8 +64,7 @@ function ChooseUnder() {
 function OnKeyPressTxt(ev) {
   if (ev.keyCode==KeyEvent.DOM_VK_RETURN) {
    setTimeout(function(){gUnderSelect.focus();},30);
-   ev.preventDefault();
-   ev.stopPropagation();
+   NostalgyStopEvent(ev);
   }
 }
 
diff --git a/content/folders.js b/content/folders.js
index 651a88d..1e63984 100644
--- a/content/folders.js
+++ b/content/folders.js
@@ -245,10 +245,7 @@ function NostalgyProcessKeyPress(aEvent) {
      }
      break;
   }
-  if (killEvent) {
-    aEvent.preventDefault();
-    aEvent.stopPropagation();
-  }
+  if (killEvent) NostalgyStopEvent(aEvent);
   return true;
 }
 
diff --git a/content/misc.js b/content/misc.js
index 7f90ae3..d49a2cd 100644
--- a/content/misc.js
+++ b/content/misc.js
@@ -17,9 +17,13 @@ function NostalgyDebug(aText)
   cs.logStringMessage(aText);
 }
 
+function NostalgyStopEvent(ev) {
+  ev.preventDefault();
+  // ev.stopPropagation();
+}
+
 function NostalgyJSONEval(s) {
-  if (/^("(\\.|[^"\\\n\r])*?"|[a-z]+:|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/. // "
-  test(s)) {
+  if (/^("(\\.|[^"\\\n\r"])*?"|[a-z]+:|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(s)) {
     try {  
       return eval('(' + s + ')');
     } catch (e) {
@@ -31,3 +35,4 @@ function NostalgyJSONEval(s) {
     return null;
   }
 }
+
diff --git a/content/nostalgy.js b/content/nostalgy.js
index cbf09e4..f90a020 100644
--- a/content/nostalgy.js
+++ b/content/nostalgy.js
@@ -384,15 +384,16 @@ function NostalgyCmd(lab,cmd,require_file) {
  nostalgy_command = cmd;
  nostalgy_th_statusBar.hidden = true;
  nostalgy_folderBox.shell_completion = false;
+ NostalgyDebug("unhide nostalgy");
  nostalgy_statusBar.hidden = false;
  nostalgy_folderBox.value = "";
 
  setTimeout(function() { 
-    nostalgy_folderBox.focus();  
-    nostalgy_folderBox.processInput(); 
+   nostalgy_folderBox.focus();  
+   nostalgy_folderBox.processInput(); 
  }, 0);
-   // For some unknown reason, doing nostalgyBox.focus immediatly
-   // sometimes does not work...
+ // For some unknown reason, doing nostalgyBox.focus immediatly
+ // sometimes does not work...
  return true;
 }
 
@@ -801,63 +802,61 @@ function NostalgySearchMode(dir) {
 }
 
 function onNostalgyKeyPress(ev) {
-  //  NostalgyDebug(RecognizeKey(ev) + "  " + nostalgy_search_focused);
-  // if (ev.keyCode == 27) NostalgyEscape();
+  var focused = "";
+  try { focused = document.commandDispatcher.focusedElement.nodeName; }
+  catch (ex) { }
 
   if (NostalgyEscapePressed >= 1) {
     if (!in_message_window && ev.charCode == 109) { // M
       NostalgyFocusMessagePane();
-      ev.preventDefault();
+      NostalgyStopEvent(ev);
     } else
     if (!in_message_window && ev.charCode == 102) { // F
       SetFocusFolderPane();
-      ev.preventDefault();
+      NostalgyStopEvent(ev);
     } else
     if (!in_message_window && ev.charCode == 105) { // I
       GetSearchInput().focus();
-      ev.preventDefault();
+      NostalgyStopEvent(ev);
     }
     return;
   } 
-  if (!nostalgy_statusBar.hidden &&
-      document.commandDispatcher.focusedElement.nodeName != "html:input")
+  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);
     }
-    ev.preventDefault();
+    NostalgyStopEvent(ev);
     return;
   }
   var kn = RecognizeKey(ev);
   if (ev.keyCode == KeyEvent.DOM_VK_DOWN && nostalgy_search_focused) {
     NostalgySearchMode(1); 
-    ev.stopPropagation();
-    ev.preventDefault();
+    NostalgyStopEvent(ev);
     return;
   }
   if (ev.keyCode == KeyEvent.DOM_VK_UP && nostalgy_search_focused) {
     NostalgySearchMode(-1);
-    ev.stopPropagation();
-    ev.preventDefault();
+    NostalgyStopEvent(ev);
     return;
   }
   if (ev.keyCode == KeyEvent.DOM_VK_ESCAPE && nostalgy_search_focused) {
     Search(""); 
     SetFocusThreadPane();
-    ev.stopPropagation();
-    ev.preventDefault();
+    NostalgyStopEvent(ev);
     return;
   }
   if (ev.charCode && ev.originalTarget.localName == "input" 
       && !ev.ctrlKey && !ev.altKey) 
     return;
   var k = nostalgy_active_keys[kn];
-  if (k) { if (ParseCommand(k)) { ev.preventDefault(); ev.stopPropagation();}}
+  if (k && ParseCommand(k)) NostalgyStopEvent(ev);
 }
 
 function ParseCommand(k) {
+  NostalgyDebug("parse command:" + k);
   if (k.indexOf("JS:") == 0)
     return eval(k.substr(3,k.length - 3));
 
diff --git a/files b/files
index edfdad5..de5d4d7 100644
--- a/files
+++ b/files
@@ -1,19 +1,18 @@
-content/about.xhtml
 content/about.xul
-content/composer.js
-content/composerOverlay.xul
-content/edit_prefs.js
 content/edit_prefs.xul
-content/edit_rule.js
-content/edit_rule.xul
-content/folders.js
-content/messageOverlay.xul
-content/nostalgy.js
 content/thunderbirdOverlay.xul
-content/.#nostalgy.js.1.34
+content/misc.js
 content/dummy_window.xul
+content/composer.js
+content/messageOverlay.xul
+content/about.xhtml
+content/edit_rule.xul
+content/folders.js
+content/edit_rule.js
+content/composerOverlay.xul
 content/nostalgy_keys.js
-content/misc.js
+content/edit_prefs.js
+content/nostalgy.js
 locale/en-US/nostalgy.dtd
 locale/en-US/nostalgy.properties
 defaults/preferences/nostalgy.js

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