1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 00:27:57 +01:00

new folder navigation commands gi (go inbox), ctrl-n and ctrl-p

This commit is contained in:
Martin Stubenschrott
2008-04-29 20:19:39 +00:00
parent 607eaa513d
commit 2e857ecbd9

View File

@@ -186,6 +186,54 @@ liberator.Mail = function ()
{ flags: liberator.Mappings.flags.COUNT });
// FOLDER SWITCHING
liberator.mappings.add(modes, ["gi"],
"Go to inbox",
function (count)
{
var folder = liberator.mail.getFolders("Inbox", false, true)[(count > 0) ? (count - 1) : 0];
if (folder)
SelectFolder(folder.URI);
else
liberator.beep();
},
{ flags: liberator.Mappings.flags.COUNT });
liberator.mappings.add(modes, ["<C-n>"],
"Select next folder",
function (count)
{
count = (count > 0 ) ? count : 1;
var tree = GetFolderTree();
var c = tree.currentIndex;
if (c + count >= tree.view.rowCount)
{
liberator.beep();
return;
}
tree.view.selection.timedSelect(c + count, tree._selectDelay );
},
{ flags: liberator.Mappings.flags.COUNT });
liberator.mappings.add(modes, ["<C-p>"],
"Select previous folder",
function (count)
{
count = (count > 0 ) ? count : 1;
var tree = GetFolderTree();
var c = tree.currentIndex;
if (c - count < 0)
{
liberator.beep();
return;
}
tree.view.selection.timedSelect(c - count, tree._selectDelay );
},
{ flags: liberator.Mappings.flags.COUNT });
// THREADING
liberator.mappings.add(modes, ["za"],
"Toggle thread collapsed/expanded",
function () { if (!liberator.mail.expandThread()) liberator.mail.collapseThread(); });
@@ -208,25 +256,26 @@ liberator.Mail = function ()
liberator.mappings.add(modes, ["<C-i>"],
"Get new messages",
"Go forward",
function (count) { if (count < 1) count = 1; while (count--) GoNextMessage(nsMsgNavigationType.forward, true); },
{ flags: liberator.Mappings.flags.COUNT });
liberator.mappings.add(modes, ["<C-o>"],
"Get new messages",
"Go back",
function (count) { if (count < 1) count = 1; while (count--) GoNextMessage(nsMsgNavigationType.back, true); },
{ flags: liberator.Mappings.flags.COUNT });
liberator.mappings.add(modes, ["gg"],
"Get new messages",
"Select first message",
function (count) { if (count < 1) count = 1; while (count--) GoNextMessage(nsMsgNavigationType.firstMessage, true); },
{ flags: liberator.Mappings.flags.COUNT });
liberator.mappings.add(modes, ["G"],
"Get new messages",
"Select last message",
function (count) { if (count < 1) count = 1; while (count--) GoNextMessage(nsMsgNavigationType.lastMessage, false); },
{ flags: liberator.Mappings.flags.COUNT });
// tagging messages
liberator.mappings.add(modes, ["tr"],
"Toggle selected messages read",