[Pkg-mozext-commits] [nostalgy] 200/235: Fix for TB 3.1
David Prévot
taffit at alioth.debian.org
Tue Oct 8 20:42:25 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 7937e879a6fc74d9d8d597a223e60e33194f752d
Author: frisch <frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date: Wed Jul 7 10:20:16 2010 +0000
Fix for TB 3.1
git-svn-id: http://nostalgy.googlecode.com/svn/trunk@200 56b81dcf-5a2f-0410-9db0-014be2e416ff
---
CHANGES | 2 ++
content/nostalgy.js | 43 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+)
diff --git a/CHANGES b/CHANGES
index 032d2d5..aa597a9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,8 @@ Since 0.2.23
when the user does not want it
- Fix bug when a category is selected (Group by sort mode)
- allow to install on TB 3.1
+ - restore folder view after folder change
+ - fix the 'search for same sender/subject' feature for TB 3.1
0.2.23
- Add explicit size for the preference dialog.
diff --git a/content/nostalgy.js b/content/nostalgy.js
index 49e0392..977dca3 100644
--- a/content/nostalgy.js
+++ b/content/nostalgy.js
@@ -710,7 +710,50 @@ var last_cycle_restrict_value = "";
var last_cycle_restrict = 0;
var last_cycle_saved_searchMode = 0;
+function NostalgySearchSenderQuickFilter() {
+ // TB 3.1
+ var input = gEBI("qfb-qs-textbox");
+ if (!input) return false;
+
+ var sender = MailAuthorName();
+ var recipient = MailRecipName();
+ var subject = MailSubject();
+
+ var values = { sender: sender, subject: subject, recipients: recipient };
+ if (NostalgyCurrentFolder().displayRecipients)
+ fields = [ "recipients", "subject" ];
+ else
+ fields = [ "sender", "subject" ];
+
+ var state = QuickFilterBarMuxer.activeFilterer.filterValues.text;
+ var make_state = function(field) {
+ var new_state = {text: null, states: { }};
+ for (var key in state.states) new_state.states[key] = false;
+ if (field != null) {
+ new_state.text = values[field];
+ new_state.states[field] = true;
+ }
+ return new_state;
+ }
+
+ var current = JSON.stringify(state);
+
+ var found = 0;
+ for (var i = 0; i < fields.length; i++)
+ if (JSON.stringify(make_state(fields[i])) == current) found = i + 1;
+ var new_state = null;
+ if (found < fields.length) new_state = make_state(fields[found]);
+ else new_state = make_state(null);
+ QuickFilterBarMuxer.activeFilterer.filterValues.text = new_state;
+ QuickFilterBarMuxer.onActiveAllMessagesLoaded(gFolderDisplay);
+ QuickFilterBarMuxer._showFilterBar(new_state.text != null);
+ QuickFilterBarMuxer.updateSearch();
+ return true;
+}
+
function NostalgySearchSender() {
+ if (NostalgySearchSenderQuickFilter()) return;
+
var input = gEBI("searchInput");
if (!input) { alert("Nostalgy error:\nCannot perform this action when Quick Search is not enabled"); return false; }
try {
--
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