[Pkg-mozext-commits] [nostalgy] 124/235: when cycling with "`" is over, restore the last search mode

David Prévot taffit at alioth.debian.org
Tue Oct 8 20:42:01 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 1066f7210d5583aea4f05549dc0d0d90643f1f77
Author: frisch <frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date:   Tue Jul 17 19:02:38 2007 +0000

    when cycling with "`" is over, restore the last search mode
    
    git-svn-id: http://nostalgy.googlecode.com/svn/trunk@124 56b81dcf-5a2f-0410-9db0-014be2e416ff
---
 CHANGES             |    1 +
 content/nostalgy.js |   10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/CHANGES b/CHANGES
index c2edbb2..707dfcf 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 Since 0.2.13
   - don't capture keys when another widgets want them (e.g. a menu popup)
   - moving dev repository from CVS to SVN with public access
+  - when cycling with "`" is over, restore the last search mode
 
 0.2.13
   - a system to export and import Nostalgy's rules (through e-mails)
diff --git a/content/nostalgy.js b/content/nostalgy.js
index 08fe894..920eabc 100644
--- a/content/nostalgy.js
+++ b/content/nostalgy.js
@@ -737,6 +737,7 @@ function NostalgyFocusMessagePane() {
 
 var last_cycle_restrict_value = null;
 var last_cycle_restrict = 0;
+var last_cycle_saved_searchMode = 0;
 
 function NostalgySearchSender() {
   if (!window.GetSearchInput) return false;
@@ -749,14 +750,19 @@ function NostalgySearchSender() {
   input.clearButtonHidden = false;
   var name = (recips ? MailRecipName() : MailAuthorName());
   var subj = MailSubject();
-  if (input.value != last_cycle_restrict_value) last_cycle_restrict = 0;
+  if (input.value != last_cycle_restrict_value) {
+    last_cycle_restrict = 0;
+    last_cycle_saved_searchMode = input.searchMode;
+  }
   last_cycle_restrict++;
   if (last_cycle_restrict == 1)
   { input.value = name; input.searchMode = kQuickSearchSender; }
   else if (last_cycle_restrict == 2)
   { input.value = subj; input.searchMode = kQuickSearchSubject; }
   else
-  { last_cycle_restrict = 0; input.value = ""; }
+  { last_cycle_restrict = 0; input.value = "";
+    input.searchMode = last_cycle_saved_searchMode;
+  }
   last_cycle_restrict_value = input.value;
   onEnterInSearchBar();
   SetFocusThreadPane();

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