Bug #296422 --> difficulty reverting to classic 3 pane view. Reload shouldn't throw an error just because we don't have a message to reload. Remove some dead code in the front end which no one seems to be using: LoadMessageByUri, OpenURL and gCurrentDisplayedMessage. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@195390 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
27ebaf73fd
commit
800a77f6b1
@ -66,12 +66,6 @@ var MSG_FOLDER_FLAG_TEMPLATES = 0x400000;
|
||||
var MSG_FOLDER_FLAG_JUNK = 0x40000000;
|
||||
var MSG_FOLDER_FLAG_FAVORITE = 0x80000000;
|
||||
|
||||
function OpenURL(url)
|
||||
{
|
||||
messenger.SetWindow(window, msgWindow);
|
||||
messenger.OpenURL(url);
|
||||
}
|
||||
|
||||
function GetMsgFolderFromResource(folderResource)
|
||||
{
|
||||
if (!folderResource)
|
||||
@ -97,30 +91,6 @@ function GetServer(uri)
|
||||
return null;
|
||||
}
|
||||
|
||||
function LoadMessageByUri(uri)
|
||||
{
|
||||
//dump("XXX LoadMessageByUri " + uri + " vs " + gCurrentDisplayedMessage + "\n");
|
||||
if(uri != gCurrentDisplayedMessage)
|
||||
{
|
||||
dump("fix this, get the nsIMsgDBHdr and the nsIMsgFolder from the uri...\n");
|
||||
/*
|
||||
var resource = RDF.GetResource(uri);
|
||||
var message = resource.QueryInterface(Components.interfaces.nsIMessage);
|
||||
if (message)
|
||||
setTitleFromFolder(message.msgFolder, message.mimef2DecodedSubject);
|
||||
|
||||
var nsIMsgFolder = Components.interfaces.nsIMsgFolder;
|
||||
if (message.msgFolder.server.downloadOnBiff)
|
||||
message.msgFolder.biffState = nsIMsgFolder.nsMsgBiffState_NoMail;
|
||||
*/
|
||||
|
||||
gCurrentDisplayedMessage = uri;
|
||||
gHaveLoadedMessage = true;
|
||||
OpenURL(uri);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function setTitleFromFolder(msgfolder, subject)
|
||||
{
|
||||
var wintype = document.documentElement.getAttribute('windowtype');
|
||||
|
||||
@ -74,7 +74,6 @@ var gCurrentLoadingFolderSortOrder = 0;
|
||||
var gCurrentLoadingFolderViewType = 0;
|
||||
var gCurrentLoadingFolderViewFlags = 0;
|
||||
var gRerootOnFolderLoad = false;
|
||||
var gCurrentDisplayedMessage = null;
|
||||
var gNextMessageAfterDelete = null;
|
||||
var gNextMessageAfterLoad = null;
|
||||
var gNextMessageViewIndexAfterDelete = -2;
|
||||
@ -1314,7 +1313,6 @@ function ClearMessagePane()
|
||||
if(gHaveLoadedMessage)
|
||||
{
|
||||
gHaveLoadedMessage = false;
|
||||
gCurrentDisplayedMessage = null;
|
||||
if (GetMessagePaneFrame().location.href != "about:blank")
|
||||
GetMessagePaneFrame().location.href = "about:blank";
|
||||
|
||||
|
||||
@ -972,10 +972,7 @@ NS_IMETHODIMP nsMsgDBView::SetSelection(nsITreeSelection * aSelection)
|
||||
|
||||
NS_IMETHODIMP nsMsgDBView::ReloadMessageWithAllParts()
|
||||
{
|
||||
if (m_currentlyDisplayedMsgUri.IsEmpty())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (mSuppressMsgDisplay)
|
||||
if (m_currentlyDisplayedMsgUri.IsEmpty() || mSuppressMsgDisplay)
|
||||
return NS_OK;
|
||||
|
||||
nsCAutoString forceAllParts(m_currentlyDisplayedMsgUri);
|
||||
@ -986,10 +983,7 @@ NS_IMETHODIMP nsMsgDBView::ReloadMessageWithAllParts()
|
||||
|
||||
NS_IMETHODIMP nsMsgDBView::ReloadMessage()
|
||||
{
|
||||
if (m_currentlyDisplayedMsgUri.IsEmpty())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (mSuppressMsgDisplay)
|
||||
if (m_currentlyDisplayedMsgUri.IsEmpty() || mSuppressMsgDisplay)
|
||||
return NS_OK;
|
||||
|
||||
return mMessengerInstance->OpenURL(m_currentlyDisplayedMsgUri.get());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user