[Pkg-mozext-commits] [nostalgy] 11/252: *** empty log message ***
David Prévot
taffit at moszumanska.debian.org
Tue Jun 14 15:24:37 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 e4321368f2624b0721b51793cfff85f6de532421
Author: frisch <frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date: Thu Jul 20 15:34:32 2006 +0000
*** empty log message ***
---
content/overlay.js | 41 ++++++++++++++++++++++++++++++++++++++---
content/thunderbirdOverlay.xul | 12 +++++++++---
2 files changed, 47 insertions(+), 6 deletions(-)
diff --git a/content/overlay.js b/content/overlay.js
index 61e7234..3a506f9 100644
--- a/content/overlay.js
+++ b/content/overlay.js
@@ -50,6 +50,9 @@ myautocomplete.prototype.QueryInterface = function(iid) {
var default_label = "";
var focus_saved = null;
var command = null;
+var last_folder_author = new Array();
+var last_folder_subject = new Array();
+var last_folder = null;
function onNostalgyLoad() {
var nostalgyBox = document.getElementById("statusbar-nostalgy");
@@ -64,14 +67,14 @@ function NostalgyCollapseFolderPane() {
fp.collapsed = !fp.collapsed;
}
-function NostalgyCmd(lab,cmd) {
+function NostalgyCmd(lab,cmd,init) {
var nostalgyBox = document.getElementById("statusbar-nostalgy");
focus_saved = document.commandDispatcher.focusedElement;
if (!focus_saved) {
focus_saved = document.getElementById("messagepane").contentWindow;
}
- nostalgyBox.value = "";
nostalgyBox.hidden = false;
+ nostalgyBox.value = init;
setTimeout(function() { nostalgyBox.focus(); }, 50);
// For some unknown reason, doing nostalgyBox.focus immediatly
// sometimes does not work...
@@ -157,21 +160,53 @@ function IterateSubfolders(folder,f) {
}
}
+function MailAuthor() {
+ return(gDBView.hdrForFirstSelectedMessage.author);
+}
+
+function MailSubject() {
+ return(gDBView.hdrForFirstSelectedMessage.subject);
+}
+
+function register_folder(folder) {
+ last_folder_author[MailAuthor()] = folder;
+ last_folder_subject[MailSubject()] = folder;
+ last_folder = folder
+}
+
+function get_last_folder() {
+ var r = last_folder_author[MailAuthor()];
+ if (r) { return(r); }
+ r = last_folder_subject[MailSubject()];
+ if (r) { return(r); }
+ return(last_folder);
+}
+
/** Commands **/
-function ShowFolder(folder) {
+function ShowFolder(folder) {
SelectFolder(folder.URI);
}
function MoveToFolder(folder) {
+ register_folder(folder);
gDBView.doCommandWithFolder(nsMsgViewCommandType.moveMessages,folder);
SetNextMessageAfterDelete();
}
function CopyToFolder(folder) {
+ register_folder(folder);
gDBView.doCommandWithFolder(nsMsgViewCommandType.copyMessages,folder);
}
+function NostalgyAgain(lab,cmd) {
+ var f = get_last_folder();
+ if (f) {
+ var nostalgyBox = document.getElementById("statusbar-nostalgy");
+ NostalgyCmd(lab, cmd, folder_name(f));
+ }
+}
+
/** Marking **/
diff --git a/content/thunderbirdOverlay.xul b/content/thunderbirdOverlay.xul
index 3932d05..67c641a 100644
--- a/content/thunderbirdOverlay.xul
+++ b/content/thunderbirdOverlay.xul
@@ -6,9 +6,15 @@
<script src="overlay.js"/>
<keyset id="mailKeys">
- <key key="G" oncommand="NostalgyCmd('&nostalgy.go-memo;', ShowFolder);"/>
- <key key="S" oncommand="NostalgyCmd('&nostalgy.move-memo;', MoveToFolder);"/>
- <key key="C" oncommand="NostalgyCmd('&nostalgy.copy-memo;', CopyToFolder);"/>
+ <key key="G" oncommand="NostalgyCmd('&nostalgy.go-memo;', ShowFolder, '');"/>
+ <key key="S"
+ oncommand="NostalgyCmd('&nostalgy.move-memo;', MoveToFolder, '');"/>
+ <key key="S" modifiers="shift"
+ oncommand="NostalgyAgain('&nostalgy.move-memo;',MoveToFolder);"/>
+ <key key="C"
+ oncommand="NostalgyCmd('&nostalgy.copy-memo;', CopyToFolder, '');"/>
+ <key key="C" modifiers="shift"
+ oncommand="NostalgyAgain('&nostalgy.copy-memo;',CopyToFolder);"/>
<key key="L" oncommand="NostalgyCollapseFolderPane();"/>
</keyset>
--
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