mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 08:17:59 +01:00
new folder navigation commands gi (go inbox), ctrl-n and ctrl-p
This commit is contained in:
@@ -186,6 +186,54 @@ liberator.Mail = function ()
|
|||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ 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"],
|
liberator.mappings.add(modes, ["za"],
|
||||||
"Toggle thread collapsed/expanded",
|
"Toggle thread collapsed/expanded",
|
||||||
function () { if (!liberator.mail.expandThread()) liberator.mail.collapseThread(); });
|
function () { if (!liberator.mail.expandThread()) liberator.mail.collapseThread(); });
|
||||||
@@ -208,25 +256,26 @@ liberator.Mail = function ()
|
|||||||
|
|
||||||
|
|
||||||
liberator.mappings.add(modes, ["<C-i>"],
|
liberator.mappings.add(modes, ["<C-i>"],
|
||||||
"Get new messages",
|
"Go forward",
|
||||||
function (count) { if (count < 1) count = 1; while (count--) GoNextMessage(nsMsgNavigationType.forward, true); },
|
function (count) { if (count < 1) count = 1; while (count--) GoNextMessage(nsMsgNavigationType.forward, true); },
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ flags: liberator.Mappings.flags.COUNT });
|
||||||
|
|
||||||
liberator.mappings.add(modes, ["<C-o>"],
|
liberator.mappings.add(modes, ["<C-o>"],
|
||||||
"Get new messages",
|
"Go back",
|
||||||
function (count) { if (count < 1) count = 1; while (count--) GoNextMessage(nsMsgNavigationType.back, true); },
|
function (count) { if (count < 1) count = 1; while (count--) GoNextMessage(nsMsgNavigationType.back, true); },
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ flags: liberator.Mappings.flags.COUNT });
|
||||||
|
|
||||||
liberator.mappings.add(modes, ["gg"],
|
liberator.mappings.add(modes, ["gg"],
|
||||||
"Get new messages",
|
"Select first message",
|
||||||
function (count) { if (count < 1) count = 1; while (count--) GoNextMessage(nsMsgNavigationType.firstMessage, true); },
|
function (count) { if (count < 1) count = 1; while (count--) GoNextMessage(nsMsgNavigationType.firstMessage, true); },
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ flags: liberator.Mappings.flags.COUNT });
|
||||||
|
|
||||||
liberator.mappings.add(modes, ["G"],
|
liberator.mappings.add(modes, ["G"],
|
||||||
"Get new messages",
|
"Select last message",
|
||||||
function (count) { if (count < 1) count = 1; while (count--) GoNextMessage(nsMsgNavigationType.lastMessage, false); },
|
function (count) { if (count < 1) count = 1; while (count--) GoNextMessage(nsMsgNavigationType.lastMessage, false); },
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ flags: liberator.Mappings.flags.COUNT });
|
||||||
|
|
||||||
|
|
||||||
// tagging messages
|
// tagging messages
|
||||||
liberator.mappings.add(modes, ["tr"],
|
liberator.mappings.add(modes, ["tr"],
|
||||||
"Toggle selected messages read",
|
"Toggle selected messages read",
|
||||||
|
|||||||
Reference in New Issue
Block a user