[Pkg-mozext-commits] [nostalgy] 64/252: *** empty log message ***
David Prévot
taffit at moszumanska.debian.org
Tue Jun 14 15:24:42 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 d09709d17cc921aac49a8df0615f3325009cbd0e
Author: frisch <frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date: Fri Apr 27 14:42:52 2007 +0000
*** empty log message ***
---
CHANGES | 8 +++++
content/nostalgy.js | 73 ++++++++++++++++++++++++++++++++++++++++--
content/thunderbirdOverlay.xul | 4 +++
files | 14 ++++----
4 files changed, 89 insertions(+), 10 deletions(-)
diff --git a/CHANGES b/CHANGES
index 327dabf..7a89d6b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,11 @@
+After 0.2.3
+ - bug fix: esc-M set focus on the message content, not the "subject" field
+ - the "`" key (back quote) search for all messages from the same
+ author as the current message (in the Sent fold, search mail sent To:
+ the same address as the first To: of the current message)
+ - when selecting a new folder with the G key, keep the current value
+ of the quick search box (if any)
+
0.2.3
- let it work with TB 2.0
diff --git a/content/nostalgy.js b/content/nostalgy.js
index 4f547e2..8c1328e 100644
--- a/content/nostalgy.js
+++ b/content/nostalgy.js
@@ -262,6 +262,28 @@ function MailAuthor() {
return(gDBView.hdrForFirstSelectedMessage.author.toLowerCase());
}
+function MailAuthorName()
+{
+ var msgHdr = gDBView.hdrForFirstSelectedMessage;
+ var headerParser =
+ Components.classes["@mozilla.org/messenger/headerparser;1"].
+ getService(Components.interfaces.nsIMsgHeaderParser);
+ var emailAddress = headerParser.extractHeaderAddressMailboxes(null, msgHdr.author);
+ return emailAddress;
+}
+
+function MailRecipName()
+{
+ var msgHdr = gDBView.hdrForFirstSelectedMessage;
+ var headerParser =
+ Components.classes["@mozilla.org/messenger/headerparser;1"].
+ getService(Components.interfaces.nsIMsgHeaderParser);
+ var emailAddress = headerParser.extractHeaderAddressMailboxes(null, msgHdr.recipients);
+ var i = emailAddress.indexOf(" ",0);
+ if (i > 0) emailAddress = emailAddress.substr(0,i-1);
+ return emailAddress;
+}
+
function MailSubject() {
return(gDBView.hdrForFirstSelectedMessage.subject.toLowerCase());
}
@@ -333,6 +355,13 @@ function NostalgyEnsureFolderIndex(builder, msgFolder)
return index;
}
+function NostalgySelectLastMsg() {
+ if (gDBView) {
+ if (gDBView.numSelected == 0)
+ gDBView.selectMsgByKey(gDBView.getKeyAt(0));
+ }
+}
+
function ShowFolder(folder) {
var folderTree = GetFolderTree();
var totry = 1;
@@ -341,6 +370,9 @@ function ShowFolder(folder) {
totry = kNumFolderViews;
savedFolderView = gCurrentFolderView;
}
+ var input = GetSearchInput();
+ var search = input.value;
+ if (input.showingSearchCriteria) search = "";
while (totry > 0) {
try {
var idx = NostalgyEnsureFolderIndex(folderTree.builderView, folder);
@@ -353,6 +385,11 @@ function ShowFolder(folder) {
} catch (ex) { totry--; CycleFolderView(true); }
}
if (window.CycleFolderView) { loadFolderView(savedFolderView); }
+ if (search != "") {
+ input.focus();
+ input.value = search;
+ setTimeout(function(){onEnterInSearchBar(true);}, 200);
+ }
}
function MoveToFolder(folder) {
@@ -389,6 +426,11 @@ function NostalgyScrollMsg(d) {
var NostalgyEscapePressed = 0;
+function NostalgyFocusThreadPane() {
+ SetFocusThreadPane();
+ NostalgySelectLastMsg();
+}
+
function NostalgyEscape(ev) {
NostalgyEscapePressed++;
var i = NostalgyEscapePressed;
@@ -397,15 +439,40 @@ function NostalgyEscape(ev) {
300);
if (NostalgyEscapePressed == 3) {
onClearSearch();
- setTimeout(SetFocusThreadPane,100);
+ setTimeout(NostalgyFocusThreadPane,100);
}
- if (NostalgyEscapePressed == 2) SetFocusThreadPane();
+ if (NostalgyEscapePressed == 2) NostalgyFocusThreadPane();
+}
+
+function NostalgyFocusMessagePane() {
+ // for some reason, advanceFocusIntoSubtree(getebi("messagepane")) does not work
+
+ SetFocusMessagePane();
+ var i = 10;
+ while (i > 0 &&
+ top.document.commandDispatcher.focusedWindow.name != "messagepane")
+ {
+ document.commandDispatcher.advanceFocus(); i--;
+ }
+}
+
+function NostalgySearchSender() {
+ var recips = gDBView.msgFolder.displayRecipients;
+ var key = gDBView.hdrForFirstSelectedMessage.messageKey;
+ var input = GetSearchInput();
+ input.focus();
+ input.searchMode = 1; // sender = kQuickSearchSender
+ var name = (recips ? MailRecipName() : MailAuthorName());
+ if (input.value == name) input.value = ""; else input.value = name;
+ onEnterInSearchBar(true);
+ SetFocusThreadPane();
+ gDBView.selectMsgByKey(key);
}
function onNostalgyKeyPress(ev) {
if (NostalgyEscapePressed >= 1) {
if (ev.charCode == 109) { // M
- SetFocusMessagePane();
+ NostalgyFocusMessagePane();
ev.preventDefault();
} else
if (ev.charCode == 102) { // F
diff --git a/content/thunderbirdOverlay.xul b/content/thunderbirdOverlay.xul
index a69c2f2..95a5c21 100644
--- a/content/thunderbirdOverlay.xul
+++ b/content/thunderbirdOverlay.xul
@@ -28,6 +28,7 @@
<key key="C" modifiers="shift"
oncommand="NostalgySuggested('&nostalgy.copy-memo;',CopyToFolder);"/>
<key key="L" oncommand="NostalgyCollapseFolderPane();"/>
+ <key key="`" oncommand="NostalgySearchSender();"/>
<key keycode="VK_LEFT" modifiers="control"
oncommand="NostalgyScrollMsg(-50);"/>
@@ -66,6 +67,9 @@
</statusbarpanel>
</statusbar>
+<!-- <tree id="threadTree" onclick="alert('Click' + NostalgyEscapePressed);">
+ </tree> -->
+
</overlay>
diff --git a/files b/files
index d30c5b8..8b27024 100644
--- a/files
+++ b/files
@@ -1,15 +1,15 @@
-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/thunderbirdOverlay.xul
+content/composer.js
+content/messageOverlay.xul
+content/about.xhtml
content/edit_rule.xul
content/folders.js
-content/messageOverlay.xul
+content/edit_rule.js
+content/composerOverlay.xul
+content/edit_prefs.js
content/nostalgy.js
-content/thunderbirdOverlay.xul
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