зеркало из https://github.com/mozilla/pjs.git
Bug #379070 ---> nsIMessenger string API cleanup.
patch by Joerg Bornemann <jobor@gmx.de> sr=mscott
This commit is contained in:
Родитель
520d94fa3c
Коммит
0d4059c32b
|
@ -1070,12 +1070,12 @@ function GetSelectTrashUri(folder)
|
||||||
|
|
||||||
function Undo()
|
function Undo()
|
||||||
{
|
{
|
||||||
messenger.Undo(msgWindow);
|
messenger.undo(msgWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Redo()
|
function Redo()
|
||||||
{
|
{
|
||||||
messenger.Redo(msgWindow);
|
messenger.redo(msgWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSearchTermString(searchTerms)
|
function getSearchTermString(searchTerms)
|
||||||
|
|
|
@ -551,10 +551,10 @@ var DefaultController =
|
||||||
SwitchView(command);
|
SwitchView(command);
|
||||||
break;
|
break;
|
||||||
case "cmd_undo":
|
case "cmd_undo":
|
||||||
messenger.Undo(msgWindow);
|
messenger.undo(msgWindow);
|
||||||
break;
|
break;
|
||||||
case "cmd_redo":
|
case "cmd_redo":
|
||||||
messenger.Redo(msgWindow);
|
messenger.redo(msgWindow);
|
||||||
break;
|
break;
|
||||||
case "cmd_expandAllThreads":
|
case "cmd_expandAllThreads":
|
||||||
gDBView.doCommand(nsMsgViewCommandType.expandAll);
|
gDBView.doCommand(nsMsgViewCommandType.expandAll);
|
||||||
|
@ -931,7 +931,7 @@ function MsgDeleteFolder()
|
||||||
if (gCurrentVirtualFolderUri == folderResource.Value)
|
if (gCurrentVirtualFolderUri == folderResource.Value)
|
||||||
gCurrentVirtualFolderUri = null;
|
gCurrentVirtualFolderUri = null;
|
||||||
parentResource = selectedFolder.parent.QueryInterface(Components.interfaces.nsIRDFResource);
|
parentResource = selectedFolder.parent.QueryInterface(Components.interfaces.nsIRDFResource);
|
||||||
messenger.DeleteFolders(GetFolderDatasource(), parentResource, folderResource);
|
messenger.deleteFolders(GetFolderDatasource(), parentResource, folderResource);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var protocolInfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + selectedFolder.server.type].getService(Components.interfaces.nsIMsgProtocolInfo);
|
var protocolInfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + selectedFolder.server.type].getService(Components.interfaces.nsIMsgProtocolInfo);
|
||||||
|
@ -958,7 +958,7 @@ function MsgDeleteFolder()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
parentResource = selectedFolder.parent.QueryInterface(Components.interfaces.nsIRDFResource);
|
parentResource = selectedFolder.parent.QueryInterface(Components.interfaces.nsIRDFResource);
|
||||||
messenger.DeleteFolders(GetFolderDatasource(), parentResource, folderResource);
|
messenger.deleteFolders(GetFolderDatasource(), parentResource, folderResource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,7 +237,7 @@ function ComposeMessage(type, format, folder, messageArray)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
messenger.SetWindow(window, msgWindow);
|
messenger.setWindow(window, msgWindow);
|
||||||
|
|
||||||
var object = null;
|
var object = null;
|
||||||
|
|
||||||
|
@ -599,7 +599,7 @@ function performActionsOnJunkMsgs(aFolder, aMsgHdrs)
|
||||||
{
|
{
|
||||||
var copyService = Components.classes["@mozilla.org/messenger/messagecopyservice;1"].
|
var copyService = Components.classes["@mozilla.org/messenger/messagecopyservice;1"].
|
||||||
getService(Components.interfaces.nsIMsgCopyService);
|
getService(Components.interfaces.nsIMsgCopyService);
|
||||||
copyService.CopyMessages(aFolder, aMsgHdrs, actionParams.junkTargetFolder, true /* isMove */, null,
|
copyService.copyMessages(aFolder, aMsgHdrs, actionParams.junkTargetFolder, true /* isMove */, null,
|
||||||
msgWindow, true /* allow undo */);
|
msgWindow, true /* allow undo */);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ function OnMailWindowUnload()
|
||||||
}
|
}
|
||||||
|
|
||||||
mailSession.RemoveMsgWindow(msgWindow);
|
mailSession.RemoveMsgWindow(msgWindow);
|
||||||
messenger.SetWindow(null, null);
|
messenger.setWindow(null, null);
|
||||||
|
|
||||||
var msgDS;
|
var msgDS;
|
||||||
var viewDataSources = [accountManagerDataSource, folderDataSource,
|
var viewDataSources = [accountManagerDataSource, folderDataSource,
|
||||||
|
|
|
@ -2131,13 +2131,13 @@ function SetupUndoRedoCommand(command)
|
||||||
|
|
||||||
if (command == "cmd_undo")
|
if (command == "cmd_undo")
|
||||||
{
|
{
|
||||||
canUndoOrRedo = messenger.CanUndo();
|
canUndoOrRedo = messenger.canUndo();
|
||||||
txnType = messenger.GetUndoTransactionType();
|
txnType = messenger.getUndoTransactionType();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
canUndoOrRedo = messenger.CanRedo();
|
canUndoOrRedo = messenger.canRedo();
|
||||||
txnType = messenger.GetRedoTransactionType();
|
txnType = messenger.getRedoTransactionType();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canUndoOrRedo)
|
if (canUndoOrRedo)
|
||||||
|
|
|
@ -264,7 +264,7 @@ function delayedOnLoadMessageWindow()
|
||||||
|
|
||||||
InitMsgWindow();
|
InitMsgWindow();
|
||||||
|
|
||||||
messenger.SetWindow(window, msgWindow);
|
messenger.setWindow(window, msgWindow);
|
||||||
InitializeDataSources();
|
InitializeDataSources();
|
||||||
// FIX ME - later we will be able to use onload from the overlay
|
// FIX ME - later we will be able to use onload from the overlay
|
||||||
OnLoadMsgHeaderPane();
|
OnLoadMsgHeaderPane();
|
||||||
|
@ -973,10 +973,10 @@ var MessageWindowController =
|
||||||
MsgGetMessage();
|
MsgGetMessage();
|
||||||
break;
|
break;
|
||||||
case "cmd_undo":
|
case "cmd_undo":
|
||||||
messenger.Undo(msgWindow);
|
messenger.undo(msgWindow);
|
||||||
break;
|
break;
|
||||||
case "cmd_redo":
|
case "cmd_redo":
|
||||||
messenger.Redo(msgWindow);
|
messenger.redo(msgWindow);
|
||||||
break;
|
break;
|
||||||
case "cmd_getMsgsForAuthAccounts":
|
case "cmd_getMsgsForAuthAccounts":
|
||||||
MsgGetMessagesForAllAuthenticatedAccounts();
|
MsgGetMessagesForAllAuthenticatedAccounts();
|
||||||
|
|
|
@ -784,8 +784,8 @@ function UpdateMailPaneConfig(aMsgWindowInitialized) {
|
||||||
|
|
||||||
if (aMsgWindowInitialized && msgPaneReRooted)
|
if (aMsgWindowInitialized && msgPaneReRooted)
|
||||||
{
|
{
|
||||||
messenger.SetWindow(null, null);
|
messenger.setWindow(null, null);
|
||||||
messenger.SetWindow(window, msgWindow);
|
messenger.setWindow(window, msgWindow);
|
||||||
MsgReload();
|
MsgReload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -851,7 +851,7 @@ function delayedOnLoadMessenger()
|
||||||
verifyAccounts(null);
|
verifyAccounts(null);
|
||||||
|
|
||||||
InitMsgWindow();
|
InitMsgWindow();
|
||||||
messenger.SetWindow(window, msgWindow);
|
messenger.setWindow(window, msgWindow);
|
||||||
|
|
||||||
InitializeDataSources();
|
InitializeDataSources();
|
||||||
InitPanes();
|
InitPanes();
|
||||||
|
|
|
@ -110,7 +110,7 @@ function RenameFolder(name,uri)
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
messenger.RenameFolder(GetFolderDatasource(), selectedFolder, name);
|
messenger.renameFolder(GetFolderDatasource(), selectedFolder, name);
|
||||||
}
|
}
|
||||||
catch(e)
|
catch(e)
|
||||||
{
|
{
|
||||||
|
@ -140,11 +140,11 @@ function MsgEmptyTrash()
|
||||||
{
|
{
|
||||||
var folderResource = GetFolderResource(folderTree, startIndex.value);
|
var folderResource = GetFolderResource(folderTree, startIndex.value);
|
||||||
try {
|
try {
|
||||||
messenger.EmptyTrash(GetFolderDatasource(), folderResource);
|
messenger.emptyTrash(GetFolderDatasource(), folderResource);
|
||||||
}
|
}
|
||||||
catch(e)
|
catch(e)
|
||||||
{
|
{
|
||||||
dump ("Exception : messenger.EmptyTrash \n");
|
dump ("Exception : messenger.emptyTrash \n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ function MsgCompactFolder(isAll)
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
messenger.CompactFolder(GetFolderDatasource(), resource, isAll);
|
messenger.compactFolder(GetFolderDatasource(), resource, isAll);
|
||||||
}
|
}
|
||||||
catch(ex)
|
catch(ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@ interface nsIDOMWindowInternal;
|
||||||
interface nsITransactionManager;
|
interface nsITransactionManager;
|
||||||
interface nsIMsgMessageService;
|
interface nsIMsgMessageService;
|
||||||
|
|
||||||
[scriptable, uuid(0F6D0A77-AED8-4658-BEDD-8753A008F0D8)]
|
[scriptable, uuid(3CFFB7E3-D7C6-4335-8941-7B94BBAFB607)]
|
||||||
interface nsIMessenger : nsISupports {
|
interface nsIMessenger : nsISupports {
|
||||||
|
|
||||||
const long eUnknown = 0;
|
const long eUnknown = 0;
|
||||||
|
@ -56,54 +56,54 @@ interface nsIMessenger : nsISupports {
|
||||||
const long eMoveMsg = 2;
|
const long eMoveMsg = 2;
|
||||||
const long eCopyMsg = 3;
|
const long eCopyMsg = 3;
|
||||||
|
|
||||||
void setDisplayCharset(in string aCharset);
|
void setDisplayCharset(in ACString aCharset);
|
||||||
|
|
||||||
readonly attribute nsITransactionManager transactionManager;
|
readonly attribute nsITransactionManager transactionManager;
|
||||||
|
|
||||||
void SetWindow(in nsIDOMWindowInternal ptr, in nsIMsgWindow msgWindow);
|
void setWindow(in nsIDOMWindowInternal ptr, in nsIMsgWindow msgWindow);
|
||||||
|
|
||||||
void DeleteFolders(in nsIRDFCompositeDataSource db,
|
void deleteFolders(in nsIRDFCompositeDataSource db,
|
||||||
in nsIRDFResource parentFolder,
|
in nsIRDFResource parentFolder,
|
||||||
in nsIRDFResource folder);
|
in nsIRDFResource folder);
|
||||||
void CopyMessages(in nsIRDFCompositeDataSource database,
|
void copyMessages(in nsIRDFCompositeDataSource database,
|
||||||
in nsIRDFResource srcResource,
|
in nsIRDFResource srcResource,
|
||||||
in nsIRDFResource dstResource,
|
in nsIRDFResource dstResource,
|
||||||
in nsISupportsArray messages,
|
in nsISupportsArray messages,
|
||||||
in boolean isMove);
|
in boolean isMove);
|
||||||
|
|
||||||
void CopyFolders(in nsIRDFCompositeDataSource database,
|
void copyFolders(in nsIRDFCompositeDataSource database,
|
||||||
in nsIRDFResource dstResource,
|
in nsIRDFResource dstResource,
|
||||||
in nsISupportsArray folders,
|
in nsISupportsArray folders,
|
||||||
in boolean isMoveFolder);
|
in boolean isMoveFolder);
|
||||||
|
|
||||||
|
|
||||||
void OpenURL(in string aURL);
|
void openURL(in ACString aURL);
|
||||||
|
|
||||||
/** load a custom message by url, e.g load a attachment as a email
|
/** load a custom message by url, e.g load a attachment as a email
|
||||||
*/
|
*/
|
||||||
void loadURL(in nsIDOMWindowInternal ptr, in string aURL);
|
void loadURL(in nsIDOMWindowInternal ptr, in ACString aURL);
|
||||||
|
|
||||||
void launchExternalURL(in string aURL);
|
void launchExternalURL(in ACString aURL);
|
||||||
|
|
||||||
void RenameFolder(in nsIRDFCompositeDataSource db,
|
void renameFolder(in nsIRDFCompositeDataSource db,
|
||||||
in nsIRDFResource folder, in wstring name);
|
in nsIRDFResource folder, in AString name);
|
||||||
void CompactFolder(in nsIRDFCompositeDataSource db,
|
void compactFolder(in nsIRDFCompositeDataSource db,
|
||||||
in nsIRDFResource folder,
|
in nsIRDFResource folder,
|
||||||
in boolean forAll);
|
in boolean forAll);
|
||||||
void EmptyTrash(in nsIRDFCompositeDataSource db,
|
void emptyTrash(in nsIRDFCompositeDataSource db,
|
||||||
in nsIRDFResource folder);
|
in nsIRDFResource folder);
|
||||||
|
|
||||||
boolean CanUndo();
|
boolean canUndo();
|
||||||
boolean CanRedo();
|
boolean canRedo();
|
||||||
unsigned long GetUndoTransactionType();
|
unsigned long getUndoTransactionType();
|
||||||
unsigned long GetRedoTransactionType();
|
unsigned long getRedoTransactionType();
|
||||||
void Undo(in nsIMsgWindow msgWindow);
|
void undo(in nsIMsgWindow msgWindow);
|
||||||
void Redo(in nsIMsgWindow msgWindow);
|
void redo(in nsIMsgWindow msgWindow);
|
||||||
void sendUnsentMessages(in nsIMsgIdentity aIdentity, in nsIMsgWindow aMsgWindow);
|
void sendUnsentMessages(in nsIMsgIdentity aIdentity, in nsIMsgWindow aMsgWindow);
|
||||||
void SetDocumentCharset(in string characterSet);
|
void setDocumentCharset(in ACString characterSet);
|
||||||
void saveAs(in string aURI, in boolean aAsFile, in nsIMsgIdentity aIdentity, in wstring aMsgFilename);
|
void saveAs(in ACString aURI, in boolean aAsFile, in nsIMsgIdentity aIdentity, in AString aMsgFilename);
|
||||||
void openAttachment(in string contentTpe, in string url, in string displayName, in string messageUri, in boolean isExternalAttachment);
|
void openAttachment(in ACString contentTpe, in ACString url, in ACString displayName, in ACString messageUri, in boolean isExternalAttachment);
|
||||||
void saveAttachment(in string contentTpe, in string url, in string displayName, in string messageUri, in boolean isExternalAttachment);
|
void saveAttachment(in ACString contentTpe, in ACString url, in ACString displayName, in ACString messageUri, in boolean isExternalAttachment);
|
||||||
void saveAllAttachments(in unsigned long count, [array, size_is(count)] in string contentTypeArray,
|
void saveAllAttachments(in unsigned long count, [array, size_is(count)] in string contentTypeArray,
|
||||||
[array, size_is(count)] in string urlArray, [array, size_is(count)] in string displayNameArray,
|
[array, size_is(count)] in string urlArray, [array, size_is(count)] in string displayNameArray,
|
||||||
[array, size_is(count)] in string messageUriArray);
|
[array, size_is(count)] in string messageUriArray);
|
||||||
|
@ -113,14 +113,14 @@ interface nsIMessenger : nsISupports {
|
||||||
[array, size_is(count)] in string messageUriArray, in boolean saveFirst);
|
[array, size_is(count)] in string messageUriArray, in boolean saveFirst);
|
||||||
// saveAttachmentToFolder is used by the drag and drop code to drop an attachment to a destination folder
|
// saveAttachmentToFolder is used by the drag and drop code to drop an attachment to a destination folder
|
||||||
// we need to return the actual file path (including the filename).
|
// we need to return the actual file path (including the filename).
|
||||||
nsILocalFile saveAttachmentToFolder(in string contentType, in string url, in string displayName, in string messageUri, in nsILocalFile aDestFolder);
|
nsILocalFile saveAttachmentToFolder(in ACString contentType, in ACString url, in ACString displayName, in ACString messageUri, in nsILocalFile aDestFolder);
|
||||||
|
|
||||||
attribute boolean sendingUnsentMsgs;
|
attribute boolean sendingUnsentMsgs;
|
||||||
|
|
||||||
readonly attribute string lastDisplayedMessageUri;
|
readonly attribute ACString lastDisplayedMessageUri;
|
||||||
|
|
||||||
nsIMsgMessageService messageServiceFromURI(in string aUri);
|
nsIMsgMessageService messageServiceFromURI(in ACString aUri);
|
||||||
nsIMsgDBHdr msgHdrFromURI(in string aUri);
|
nsIMsgDBHdr msgHdrFromURI(in ACString aUri);
|
||||||
// for back forward history, we need a list of visited messages,
|
// for back forward history, we need a list of visited messages,
|
||||||
// and where we are in the list.
|
// and where we are in the list.
|
||||||
|
|
||||||
|
@ -128,8 +128,8 @@ interface nsIMessenger : nsISupports {
|
||||||
// Unfortunately, you must call this before navigating to this position,
|
// Unfortunately, you must call this before navigating to this position,
|
||||||
// because calling this has the side effect of making us adjust our current
|
// because calling this has the side effect of making us adjust our current
|
||||||
// history pos, and *not* adding the loaded message to the history queue.
|
// history pos, and *not* adding the loaded message to the history queue.
|
||||||
string getMsgUriAtNavigatePos(in long aPos);
|
ACString getMsgUriAtNavigatePos(in long aPos);
|
||||||
string getFolderUriAtNavigatePos(in long aPos);
|
ACString getFolderUriAtNavigatePos(in long aPos);
|
||||||
attribute long navigatePos;
|
attribute long navigatePos;
|
||||||
// if caller just wants the count and cur pos, they can pass in a null history pointer, which will be more efficent
|
// if caller just wants the count and cur pos, they can pass in a null history pointer, which will be more efficent
|
||||||
// if they want a list suitable for display in a back/forward menu drop down, they should pass in a aHistory pointer,
|
// if they want a list suitable for display in a back/forward menu drop down, they should pass in a aHistory pointer,
|
||||||
|
|
|
@ -68,8 +68,8 @@ const MSG_FOLDER_FLAG_JUNK = 0x40000000;
|
||||||
|
|
||||||
function OpenURL(url)
|
function OpenURL(url)
|
||||||
{
|
{
|
||||||
messenger.SetWindow(window, msgWindow);
|
messenger.setWindow(window, msgWindow);
|
||||||
messenger.OpenURL(url);
|
messenger.openURL(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetMsgFolderFromResource(folderResource)
|
function GetMsgFolderFromResource(folderResource)
|
||||||
|
|
|
@ -550,10 +550,10 @@ var DefaultController =
|
||||||
SwitchView(command);
|
SwitchView(command);
|
||||||
break;
|
break;
|
||||||
case "cmd_undo":
|
case "cmd_undo":
|
||||||
messenger.Undo(msgWindow);
|
messenger.undo(msgWindow);
|
||||||
break;
|
break;
|
||||||
case "cmd_redo":
|
case "cmd_redo":
|
||||||
messenger.Redo(msgWindow);
|
messenger.redo(msgWindow);
|
||||||
break;
|
break;
|
||||||
case "cmd_expandAllThreads":
|
case "cmd_expandAllThreads":
|
||||||
gDBView.doCommand(nsMsgViewCommandType.expandAll);
|
gDBView.doCommand(nsMsgViewCommandType.expandAll);
|
||||||
|
@ -926,7 +926,7 @@ function MsgDeleteFolder()
|
||||||
if (gCurrentVirtualFolderUri == folderResource.Value)
|
if (gCurrentVirtualFolderUri == folderResource.Value)
|
||||||
gCurrentVirtualFolderUri = null;
|
gCurrentVirtualFolderUri = null;
|
||||||
parentResource = selectedFolder.parent.QueryInterface(Components.interfaces.nsIRDFResource);
|
parentResource = selectedFolder.parent.QueryInterface(Components.interfaces.nsIRDFResource);
|
||||||
messenger.DeleteFolders(GetFolderDatasource(), parentResource, folderResource);
|
messenger.deleteFolders(GetFolderDatasource(), parentResource, folderResource);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var protocolInfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + selectedFolder.server.type].getService(Components.interfaces.nsIMsgProtocolInfo);
|
var protocolInfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + selectedFolder.server.type].getService(Components.interfaces.nsIMsgProtocolInfo);
|
||||||
|
@ -953,7 +953,7 @@ function MsgDeleteFolder()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
parentResource = selectedFolder.parent.QueryInterface(Components.interfaces.nsIRDFResource);
|
parentResource = selectedFolder.parent.QueryInterface(Components.interfaces.nsIRDFResource);
|
||||||
messenger.DeleteFolders(GetFolderDatasource(), parentResource, folderResource);
|
messenger.deleteFolders(GetFolderDatasource(), parentResource, folderResource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,7 +235,7 @@ function ComposeMessage(type, format, folder, messageArray)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
messenger.SetWindow(window, msgWindow);
|
messenger.setWindow(window, msgWindow);
|
||||||
|
|
||||||
var object = null;
|
var object = null;
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ function OnMailWindowUnload()
|
||||||
}
|
}
|
||||||
|
|
||||||
mailSession.RemoveMsgWindow(msgWindow);
|
mailSession.RemoveMsgWindow(msgWindow);
|
||||||
messenger.SetWindow(null, null);
|
messenger.setWindow(null, null);
|
||||||
|
|
||||||
var msgDS = folderDataSource.QueryInterface(Components.interfaces.nsIMsgRDFDataSource);
|
var msgDS = folderDataSource.QueryInterface(Components.interfaces.nsIMsgRDFDataSource);
|
||||||
msgDS.window = null;
|
msgDS.window = null;
|
||||||
|
|
|
@ -2127,13 +2127,13 @@ function SetupUndoRedoCommand(command)
|
||||||
|
|
||||||
if (command == "cmd_undo")
|
if (command == "cmd_undo")
|
||||||
{
|
{
|
||||||
canUndoOrRedo = messenger.CanUndo();
|
canUndoOrRedo = messenger.canUndo();
|
||||||
txnType = messenger.GetUndoTransactionType();
|
txnType = messenger.getUndoTransactionType();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
canUndoOrRedo = messenger.CanRedo();
|
canUndoOrRedo = messenger.canRedo();
|
||||||
txnType = messenger.GetRedoTransactionType();
|
txnType = messenger.getRedoTransactionType();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canUndoOrRedo)
|
if (canUndoOrRedo)
|
||||||
|
|
|
@ -253,7 +253,7 @@ function OnLoadMessageWindow()
|
||||||
|
|
||||||
InitMsgWindow();
|
InitMsgWindow();
|
||||||
|
|
||||||
messenger.SetWindow(window, msgWindow);
|
messenger.setWindow(window, msgWindow);
|
||||||
InitializeDataSources();
|
InitializeDataSources();
|
||||||
// FIX ME - later we will be able to use onload from the overlay
|
// FIX ME - later we will be able to use onload from the overlay
|
||||||
OnLoadMsgHeaderPane();
|
OnLoadMsgHeaderPane();
|
||||||
|
@ -805,10 +805,10 @@ var MessageWindowController =
|
||||||
MsgGetMessage();
|
MsgGetMessage();
|
||||||
break;
|
break;
|
||||||
case "cmd_undo":
|
case "cmd_undo":
|
||||||
messenger.Undo(msgWindow);
|
messenger.undo(msgWindow);
|
||||||
break;
|
break;
|
||||||
case "cmd_redo":
|
case "cmd_redo":
|
||||||
messenger.Redo(msgWindow);
|
messenger.redo(msgWindow);
|
||||||
break;
|
break;
|
||||||
case "cmd_getMsgsForAuthAccounts":
|
case "cmd_getMsgsForAuthAccounts":
|
||||||
MsgGetMessagesForAllAuthenticatedAccounts();
|
MsgGetMessagesForAllAuthenticatedAccounts();
|
||||||
|
|
|
@ -316,14 +316,14 @@ function DropOnFolderTree(row, orientation)
|
||||||
try {
|
try {
|
||||||
if (isSourceNews) {
|
if (isSourceNews) {
|
||||||
// news to pop or imap is always a copy
|
// news to pop or imap is always a copy
|
||||||
messenger.CopyMessages(GetFolderDatasource(), sourceResource, targetResource, list, false);
|
messenger.copyMessages(GetFolderDatasource(), sourceResource, targetResource, list, false);
|
||||||
}
|
}
|
||||||
else if (dragSession.dragAction == nsIDragService.DRAGDROP_ACTION_COPY ||
|
else if (dragSession.dragAction == nsIDragService.DRAGDROP_ACTION_COPY ||
|
||||||
dragSession.dragAction == nsIDragService.DRAGDROP_ACTION_MOVE) {
|
dragSession.dragAction == nsIDragService.DRAGDROP_ACTION_MOVE) {
|
||||||
var isMove = (dragSession.dragAction == nsIDragService.DRAGDROP_ACTION_MOVE);
|
var isMove = (dragSession.dragAction == nsIDragService.DRAGDROP_ACTION_MOVE);
|
||||||
pref.setCharPref("mail.last_msg_movecopy_target_uri", targetFolder.URI);
|
pref.setCharPref("mail.last_msg_movecopy_target_uri", targetFolder.URI);
|
||||||
pref.setBoolPref("mail.last_msg_movecopy_was_move", isMove);
|
pref.setBoolPref("mail.last_msg_movecopy_was_move", isMove);
|
||||||
messenger.CopyMessages(GetFolderDatasource(), sourceResource, targetResource, list, isMove);
|
messenger.copyMessages(GetFolderDatasource(), sourceResource, targetResource, list, isMove);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
|
@ -334,7 +334,7 @@ function DropOnFolderTree(row, orientation)
|
||||||
sourceServer = sourceFolder.server;
|
sourceServer = sourceFolder.server;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
messenger.CopyFolders(GetFolderDatasource(), targetResource, list, (sourceServer == targetServer));
|
messenger.copyFolders(GetFolderDatasource(), targetResource, list, (sourceServer == targetServer));
|
||||||
}
|
}
|
||||||
catch(ex)
|
catch(ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -675,8 +675,8 @@ function UpdateMailPaneConfig() {
|
||||||
desiredParent.appendChild(messagePaneSplitter);
|
desiredParent.appendChild(messagePaneSplitter);
|
||||||
desiredParent.appendChild(messagePane);
|
desiredParent.appendChild(messagePane);
|
||||||
messagePaneSplitter.orient = desiredParent.orient;
|
messagePaneSplitter.orient = desiredParent.orient;
|
||||||
messenger.SetWindow(null, null);
|
messenger.setWindow(null, null);
|
||||||
messenger.SetWindow(window, msgWindow);
|
messenger.setWindow(window, msgWindow);
|
||||||
if (gDBView && GetNumSelectedMessages() == 1)
|
if (gDBView && GetNumSelectedMessages() == 1)
|
||||||
gDBView.reloadMessage();
|
gDBView.reloadMessage();
|
||||||
}
|
}
|
||||||
|
@ -704,7 +704,7 @@ function OnLoadMessenger()
|
||||||
verifyAccounts(null);
|
verifyAccounts(null);
|
||||||
|
|
||||||
InitMsgWindow();
|
InitMsgWindow();
|
||||||
messenger.SetWindow(window, msgWindow);
|
messenger.setWindow(window, msgWindow);
|
||||||
|
|
||||||
InitializeDataSources();
|
InitializeDataSources();
|
||||||
InitPanes();
|
InitPanes();
|
||||||
|
|
|
@ -51,7 +51,7 @@ function CharacterSet(){}
|
||||||
function MessengerSetForcedCharacterSet(aCharset)
|
function MessengerSetForcedCharacterSet(aCharset)
|
||||||
{
|
{
|
||||||
// dump(aCharset);dump("\n");
|
// dump(aCharset);dump("\n");
|
||||||
messenger.SetDocumentCharset(aCharset);
|
messenger.setDocumentCharset(aCharset);
|
||||||
msgWindow.mailCharacterSet = aCharset;
|
msgWindow.mailCharacterSet = aCharset;
|
||||||
msgWindow.charsetOverride = true;
|
msgWindow.charsetOverride = true;
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ function RenameFolder(name,uri)
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
messenger.RenameFolder(GetFolderDatasource(), selectedFolder, name);
|
messenger.renameFolder(GetFolderDatasource(), selectedFolder, name);
|
||||||
}
|
}
|
||||||
catch(e)
|
catch(e)
|
||||||
{
|
{
|
||||||
|
@ -140,11 +140,11 @@ function MsgEmptyTrash()
|
||||||
{
|
{
|
||||||
var folderResource = GetFolderResource(folderTree, startIndex.value);
|
var folderResource = GetFolderResource(folderTree, startIndex.value);
|
||||||
try {
|
try {
|
||||||
messenger.EmptyTrash(GetFolderDatasource(), folderResource);
|
messenger.emptyTrash(GetFolderDatasource(), folderResource);
|
||||||
}
|
}
|
||||||
catch(e)
|
catch(e)
|
||||||
{
|
{
|
||||||
dump ("Exception : messenger.EmptyTrash \n");
|
dump ("Exception : messenger.emptyTrash \n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,11 +183,11 @@ function MsgCompactFolder(isAll)
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
messenger.CompactFolder(GetFolderDatasource(), resource, isAll);
|
messenger.compactFolder(GetFolderDatasource(), resource, isAll);
|
||||||
}
|
}
|
||||||
catch(ex)
|
catch(ex)
|
||||||
{
|
{
|
||||||
dump("Exception : messenger.CompactFolder : " + ex + "\n");
|
dump("Exception : messenger.compactFolder : " + ex + "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -63,9 +63,9 @@ public:
|
||||||
NS_DECL_NSIFOLDERLISTENER
|
NS_DECL_NSIFOLDERLISTENER
|
||||||
|
|
||||||
nsresult Alert(const char * stringName);
|
nsresult Alert(const char * stringName);
|
||||||
nsresult SaveAttachment(nsIFile *file, const char* unescapedUrl,
|
nsresult SaveAttachment(nsIFile *file, const nsACString& unescapedUrl,
|
||||||
const char* messageUri, const char* contentType,
|
const nsACString& messageUri, const nsACString& contentType,
|
||||||
void *closure);
|
void *closure);
|
||||||
nsresult PromptIfFileExists(nsILocalFile *file);
|
nsresult PromptIfFileExists(nsILocalFile *file);
|
||||||
nsresult DetachAttachments(PRUint32 aCount,
|
nsresult DetachAttachments(PRUint32 aCount,
|
||||||
const char ** aContentTypeArray,
|
const char ** aContentTypeArray,
|
||||||
|
@ -89,7 +89,7 @@ protected:
|
||||||
nsresult InitStringBundle();
|
nsresult InitStringBundle();
|
||||||
nsresult PromptIfDeleteAttachments(PRBool saveFirst, PRUint32 count, const char **displayNameArray);
|
nsresult PromptIfDeleteAttachments(PRBool saveFirst, PRUint32 count, const char **displayNameArray);
|
||||||
|
|
||||||
void AddMsgUrlToNavigateHistory(const char *aURL);
|
void AddMsgUrlToNavigateHistory(const nsACString& aURL);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
nsresult GetLastSaveDirectory(nsILocalFile **aLastSaveAsDir);
|
nsresult GetLastSaveDirectory(nsILocalFile **aLastSaveAsDir);
|
||||||
|
@ -122,9 +122,8 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NS_MESSENGER_CID \
|
#define NS_MESSENGER_CID \
|
||||||
{ /* 3f181950-c14d-11d2-b7f2-00805f05ffa5 */ \
|
{ /* f436a174-e2c0-4955-9afe-e3feb68aee56 */ \
|
||||||
0x3f181950, 0xc14d, 0x11d2, \
|
0xf436a174, 0xe2c0, 0x4955, \
|
||||||
{0xb7, 0xf2, 0x0, 0x80, 0x5f, 0x05, 0xff, 0xa5}}
|
{0x9af, 0xe3, 0xe, 0xfe, 0xb6, 0x8a, 0xee, 0x56}}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -897,7 +897,7 @@ NS_IMETHODIMP nsMsgDBView::ReloadMessageWithAllParts()
|
||||||
nsCAutoString forceAllParts(m_currentlyDisplayedMsgUri);
|
nsCAutoString forceAllParts(m_currentlyDisplayedMsgUri);
|
||||||
forceAllParts += (forceAllParts.FindChar('?') == kNotFound) ? "?" : "&";
|
forceAllParts += (forceAllParts.FindChar('?') == kNotFound) ? "?" : "&";
|
||||||
forceAllParts.AppendLiteral("fetchCompleteMessage=true");
|
forceAllParts.AppendLiteral("fetchCompleteMessage=true");
|
||||||
return mMessengerInstance->OpenURL(forceAllParts.get());
|
return mMessengerInstance->OpenURL(forceAllParts);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsMsgDBView::ReloadMessage()
|
NS_IMETHODIMP nsMsgDBView::ReloadMessage()
|
||||||
|
@ -905,7 +905,7 @@ NS_IMETHODIMP nsMsgDBView::ReloadMessage()
|
||||||
if (m_currentlyDisplayedMsgUri.IsEmpty() || mSuppressMsgDisplay)
|
if (m_currentlyDisplayedMsgUri.IsEmpty() || mSuppressMsgDisplay)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return mMessengerInstance->OpenURL(m_currentlyDisplayedMsgUri.get());
|
return mMessengerInstance->OpenURL(m_currentlyDisplayedMsgUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult nsMsgDBView::UpdateDisplayMessage(nsMsgViewIndex viewPosition)
|
nsresult nsMsgDBView::UpdateDisplayMessage(nsMsgViewIndex viewPosition)
|
||||||
|
@ -959,7 +959,7 @@ NS_IMETHODIMP nsMsgDBView::LoadMessageByViewIndex(nsMsgViewIndex aViewIndex)
|
||||||
{
|
{
|
||||||
NS_ENSURE_SUCCESS(rv,rv);
|
NS_ENSURE_SUCCESS(rv,rv);
|
||||||
|
|
||||||
mMessengerInstance->OpenURL(uri.get());
|
mMessengerInstance->OpenURL(uri);
|
||||||
m_currentlyDisplayedMsgKey = m_keys[aViewIndex];
|
m_currentlyDisplayedMsgKey = m_keys[aViewIndex];
|
||||||
m_currentlyDisplayedMsgUri = uri;
|
m_currentlyDisplayedMsgUri = uri;
|
||||||
m_currentlyDisplayedViewIndex = aViewIndex;
|
m_currentlyDisplayedViewIndex = aViewIndex;
|
||||||
|
@ -973,7 +973,7 @@ NS_IMETHODIMP nsMsgDBView::LoadMessageByUrl(const char *aUrl)
|
||||||
NS_ASSERTION(aUrl, "trying to load a null url");
|
NS_ASSERTION(aUrl, "trying to load a null url");
|
||||||
if (!mSuppressMsgDisplay)
|
if (!mSuppressMsgDisplay)
|
||||||
{
|
{
|
||||||
mMessengerInstance->LoadURL(NULL, aUrl);
|
mMessengerInstance->LoadURL(NULL, nsDependentCString(aUrl));
|
||||||
m_currentlyDisplayedMsgKey = nsMsgKey_None;
|
m_currentlyDisplayedMsgKey = nsMsgKey_None;
|
||||||
m_currentlyDisplayedMsgUri.Truncate();
|
m_currentlyDisplayedMsgUri.Truncate();
|
||||||
m_currentlyDisplayedViewIndex = nsMsgViewIndex_None;
|
m_currentlyDisplayedViewIndex = nsMsgViewIndex_None;
|
||||||
|
@ -5324,14 +5324,14 @@ nsresult nsMsgDBView::NavigateFromPos(nsMsgNavigationTypeValue motion, nsMsgView
|
||||||
PRInt32 relPos = (motion == nsMsgNavigationType::forward)
|
PRInt32 relPos = (motion == nsMsgNavigationType::forward)
|
||||||
? 1 : (m_currentlyDisplayedMsgKey != nsMsgKey_None) ? -1 : 0;
|
? 1 : (m_currentlyDisplayedMsgKey != nsMsgKey_None) ? -1 : 0;
|
||||||
PRInt32 curPos;
|
PRInt32 curPos;
|
||||||
nsresult rv = mMessengerInstance->GetFolderUriAtNavigatePos(relPos, getter_Copies(folderUri));
|
nsresult rv = mMessengerInstance->GetFolderUriAtNavigatePos(relPos, folderUri);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
if (folderUri.Equals(viewFolderUri))
|
if (folderUri.Equals(viewFolderUri))
|
||||||
{
|
{
|
||||||
nsCOMPtr <nsIMsgDBHdr> msgHdr;
|
nsCOMPtr <nsIMsgDBHdr> msgHdr;
|
||||||
nsresult rv = mMessengerInstance->GetMsgUriAtNavigatePos(relPos, getter_Copies(msgUri));
|
nsresult rv = mMessengerInstance->GetMsgUriAtNavigatePos(relPos, msgUri);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
mMessengerInstance->MsgHdrFromURI(msgUri.get(), getter_AddRefs(msgHdr));
|
mMessengerInstance->MsgHdrFromURI(msgUri, getter_AddRefs(msgHdr));
|
||||||
if (msgHdr)
|
if (msgHdr)
|
||||||
{
|
{
|
||||||
mMessengerInstance->GetNavigatePos(&curPos);
|
mMessengerInstance->GetNavigatePos(&curPos);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче