mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-08 09:45:46 +01:00
[muttator] fixed lots of problems with the latest thunderbird nightly. Might break muttator for older thunderbirds though
This commit is contained in:
1
TODO
1
TODO
@@ -32,6 +32,7 @@ BUGS:
|
|||||||
Structs are slow, as removing the "icon" -> favicon field didn't make it faster.
|
Structs are slow, as removing the "icon" -> favicon field didn't make it faster.
|
||||||
- start with an empty window with an about:blank tab only:
|
- start with an empty window with an about:blank tab only:
|
||||||
:b a<tab> changes the (Untitled) title to "about:blank"
|
:b a<tab> changes the (Untitled) title to "about:blank"
|
||||||
|
- visual caret mode is broken
|
||||||
|
|
||||||
FEATURES:
|
FEATURES:
|
||||||
9 adaptive timeout for auto-completions, :set completions can be updated more often than
|
9 adaptive timeout for auto-completions, :set completions can be updated more often than
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ function Bookmarks() //{{{
|
|||||||
let uri = ioService.newURI(node.uri, null, null);
|
let uri = ioService.newURI(node.uri, null, null);
|
||||||
let keyword = bookmarksService.getKeywordForBookmark(node.itemId);
|
let keyword = bookmarksService.getKeywordForBookmark(node.itemId);
|
||||||
let tags = taggingService.getTagsForURI(uri, {}) || [];
|
let tags = taggingService.getTagsForURI(uri, {}) || [];
|
||||||
return bookmarks.push(new Bookmark(node.uri, node.title, null, keyword, tags, node.itemId));
|
//return bookmarks.push(new Bookmark(node.uri, node.title, null, keyword, tags, node.itemId));
|
||||||
|
return bookmarks.push({url: node.uri, title: node.title, icon: null, keyword: keyword, tags: tags, id: node.itemId});
|
||||||
}
|
}
|
||||||
|
|
||||||
function readBookmark(id)
|
function readBookmark(id)
|
||||||
@@ -735,6 +736,7 @@ function History() //{{{
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
load: function() { load(); }, // temporary only, for performance testing
|
||||||
get: function (filter)
|
get: function (filter)
|
||||||
{
|
{
|
||||||
if (!placesHistory)
|
if (!placesHistory)
|
||||||
|
|||||||
@@ -105,6 +105,12 @@ function Mail() //{{{
|
|||||||
return [0, completions];
|
return [0, completions];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCurrentFolderIndex()
|
||||||
|
{
|
||||||
|
// for some reason, the index is interpreted as a string, therefore the parseInt
|
||||||
|
return parseInt(gFolderTreeView.getIndexOfFolder(gFolderTreeView.getSelectedFolders()[0]));
|
||||||
|
}
|
||||||
|
|
||||||
function getRSSUrl()
|
function getRSSUrl()
|
||||||
{
|
{
|
||||||
return gDBView.hdrForFirstSelectedMessage.messageId.replace(/(#.*)?@.*$/, "");
|
return gDBView.hdrForFirstSelectedMessage.messageId.replace(/(#.*)?@.*$/, "");
|
||||||
@@ -166,17 +172,17 @@ function Mail() //{{{
|
|||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// does not wrap yet, intentional?
|
||||||
function selectUnreadFolder(backwards, count)
|
function selectUnreadFolder(backwards, count)
|
||||||
{
|
{
|
||||||
count = (count > 0 ) ? count : 1;
|
count = (count > 0 ) ? count : 1;
|
||||||
var direction = backwards ? -1 : 1;
|
var direction = backwards ? -1 : 1;
|
||||||
var tree = GetFolderTree();
|
var c = getCurrentFolderIndex();
|
||||||
var c = tree.currentIndex;
|
|
||||||
var i = direction;
|
var i = direction;
|
||||||
var folder;
|
var folder;
|
||||||
while (count > 0 && (c + i) < tree.view.rowCount && (c + i) >= 0)
|
while (count > 0 && (c + i) < gFolderTreeView.rowCount && (c + i) >= 0)
|
||||||
{
|
{
|
||||||
var resource = GetFolderResource(tree, (c + i)).QueryInterface(Components.interfaces.nsIMsgFolder);
|
let resource = gFolderTreeView._rowMap[c+i]._folder;
|
||||||
if (!resource.isServer && resource.getNumUnread(false))
|
if (!resource.isServer && resource.getNumUnread(false))
|
||||||
{
|
{
|
||||||
count -= 1;
|
count -= 1;
|
||||||
@@ -187,7 +193,7 @@ function Mail() //{{{
|
|||||||
if (!folder || count > 0)
|
if (!folder || count > 0)
|
||||||
liberator.beep();
|
liberator.beep();
|
||||||
else
|
else
|
||||||
tree.view.selection.timedSelect(c + folder, tree._selectDelay);
|
gFolderTreeView.selection.timedSelect(c + folder, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
function escapeRecipient(recipient)
|
function escapeRecipient(recipient)
|
||||||
@@ -472,14 +478,13 @@ function Mail() //{{{
|
|||||||
function (count)
|
function (count)
|
||||||
{
|
{
|
||||||
count = (count > 0 ) ? count : 1;
|
count = (count > 0 ) ? count : 1;
|
||||||
var tree = GetFolderTree();
|
let newPos = getCurrentFolderIndex() + count;
|
||||||
var c = tree.currentIndex;
|
if (newPos >= gFolderTreeView.rowCount)
|
||||||
if (c + count >= tree.view.rowCount)
|
|
||||||
{
|
{
|
||||||
liberator.beep();
|
newPos = newPos % gFolderTreeView.rowCount;
|
||||||
return;
|
commandline.echo("search hit BOTTOM, continuing at TOP", commandline.HL_WARNINGMSG, commandline.APPEND_TO_MESSAGES);
|
||||||
}
|
}
|
||||||
tree.view.selection.timedSelect(c + count, tree._selectDelay );
|
gFolderTreeView.selection.timedSelect(newPos, 500);
|
||||||
},
|
},
|
||||||
{ flags: Mappings.flags.COUNT });
|
{ flags: Mappings.flags.COUNT });
|
||||||
|
|
||||||
@@ -496,14 +501,13 @@ function Mail() //{{{
|
|||||||
function (count)
|
function (count)
|
||||||
{
|
{
|
||||||
count = (count > 0 ) ? count : 1;
|
count = (count > 0 ) ? count : 1;
|
||||||
var tree = GetFolderTree();
|
let newPos = getCurrentFolderIndex() - count;
|
||||||
var c = tree.currentIndex;
|
if (newPos < 0)
|
||||||
if (c - count < 0)
|
|
||||||
{
|
{
|
||||||
liberator.beep();
|
newPos = (newPos % gFolderTreeView.rowCount) + gFolderTreeView.rowCount;
|
||||||
return;
|
commandline.echo("search hit TOP, continuing at BOTTOM", commandline.HL_WARNINGMSG, commandline.APPEND_TO_MESSAGES);
|
||||||
}
|
}
|
||||||
tree.view.selection.timedSelect(c - count, tree._selectDelay );
|
gFolderTreeView.selection.timedSelect(newPos, 500);
|
||||||
},
|
},
|
||||||
{ flags: Mappings.flags.COUNT });
|
{ flags: Mappings.flags.COUNT });
|
||||||
|
|
||||||
@@ -752,9 +756,7 @@ function Mail() //{{{
|
|||||||
|
|
||||||
get currentFolder()
|
get currentFolder()
|
||||||
{
|
{
|
||||||
var tree = GetFolderTree();
|
return gFolderTreeView.getSelectedFolders()[0];
|
||||||
return GetFolderResource(tree, tree.currentIndex).
|
|
||||||
QueryInterface(Components.interfaces.nsIMsgFolder);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
composeNewMail: function (args)
|
composeNewMail: function (args)
|
||||||
@@ -822,10 +824,9 @@ function Mail() //{{{
|
|||||||
if (includeMsgFolders === undefined)
|
if (includeMsgFolders === undefined)
|
||||||
includeMsgFolders = true;
|
includeMsgFolders = true;
|
||||||
|
|
||||||
var tree = GetFolderTree();
|
for (let i = 0; i < gFolderTreeView.rowCount; i++)
|
||||||
for (let i = 0; i < tree.view.rowCount; i++)
|
|
||||||
{
|
{
|
||||||
var resource = GetFolderResource(tree, i).QueryInterface(Components.interfaces.nsIMsgFolder);
|
let resource = gFolderTreeView._rowMap[i]._folder;
|
||||||
if ((resource.isServer && !includeServers) || (!resource.isServer && !includeMsgFolders))
|
if ((resource.isServer && !includeServers) || (!resource.isServer && !includeMsgFolders))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -841,19 +842,10 @@ function Mail() //{{{
|
|||||||
|
|
||||||
getNewMessages: function (currentAccountOnly)
|
getNewMessages: function (currentAccountOnly)
|
||||||
{
|
{
|
||||||
var accounts = currentAccountOnly ? [this.currentAccount]
|
if (currentAccountOnly)
|
||||||
: this.getFolders("", true, false);
|
MsgGetMessagesForAccount();
|
||||||
|
else
|
||||||
accounts.forEach(function (account) {
|
GetMessagesForAllAuthenticatedAccounts();
|
||||||
try
|
|
||||||
{
|
|
||||||
account.getNewMessages(msgWindow, null);
|
|
||||||
}
|
|
||||||
catch (e)
|
|
||||||
{
|
|
||||||
liberator.log("Error getting messages for account " + account.prettyName + ": " + e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getStatistics: function (currentAccountOnly)
|
getStatistics: function (currentAccountOnly)
|
||||||
@@ -987,7 +979,7 @@ function Mail() //{{{
|
|||||||
selectMessageReverse = reverse;
|
selectMessageReverse = reverse;
|
||||||
|
|
||||||
var folders = this.getFolders("", true, true);
|
var folders = this.getFolders("", true, true);
|
||||||
var ci = GetFolderTree().currentIndex;
|
var ci = getCurrentFolderIndex();
|
||||||
for (let i = 1; i < folders.length; i++)
|
for (let i = 1; i < folders.length; i++)
|
||||||
{
|
{
|
||||||
let index = (i + ci) % folders.length;
|
let index = (i + ci) % folders.length;
|
||||||
|
|||||||
Reference in New Issue
Block a user