mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
Fix for bug 76215. Need to start progressmeters even when we don't show the progress dialog. R=varada, SR=sspitzer
This commit is contained in:
parent
dc5c742ecc
commit
d52a020758
@ -686,10 +686,11 @@ nsresult nsMsgCompose::SendMsg(MSG_DeliverMode deliverMode, nsIMsgIdentity *ide
|
||||
{
|
||||
mProgress->OpenProgress(m_window, (const PRUnichar*)msgSubject, deliverMode != nsIMsgSend::nsMsgDeliverNow);
|
||||
mProgress->GetPrompter(getter_AddRefs(prompt));
|
||||
}
|
||||
}
|
||||
|
||||
mProgress->OnStateChange(nsnull, nsnull, nsIWebProgressListener::STATE_START, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// i'm assuming the compose window is still up at this point...
|
||||
if (!prompt && m_window)
|
||||
@ -2023,6 +2024,7 @@ nsMsgDocumentStateListener::NotifyDocumentCreated(void)
|
||||
return compose->BuildBodyMessageAndSignature();
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -36,6 +36,8 @@ nsMsgComposeProgress::nsMsgComposeProgress()
|
||||
NS_INIT_ISUPPORTS();
|
||||
m_closeProgress = PR_FALSE;
|
||||
m_processCanceled = PR_FALSE;
|
||||
m_pendingStateFlags = -1;
|
||||
m_pendingStateValue = 0;
|
||||
}
|
||||
|
||||
nsMsgComposeProgress::~nsMsgComposeProgress()
|
||||
@ -142,7 +144,11 @@ NS_IMETHODIMP nsMsgComposeProgress::RegisterListener(nsIWebProgressListener * li
|
||||
if (m_closeProgress || m_processCanceled)
|
||||
listener->OnStateChange(nsnull, nsnull, nsIWebProgressListener::STATE_STOP, 0);
|
||||
else
|
||||
{
|
||||
listener->OnStatusChange(nsnull, nsnull, 0, m_pendingStatus.GetUnicode());
|
||||
if (m_pendingStateFlags != -1)
|
||||
listener->OnStateChange(nsnull, nsnull, m_pendingStateFlags, m_pendingStateValue);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -162,6 +168,9 @@ NS_IMETHODIMP nsMsgComposeProgress::OnStateChange(nsIWebProgress *aWebProgress,
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
m_pendingStateFlags = aStateFlags;
|
||||
m_pendingStateValue = aStatus;
|
||||
|
||||
if (m_listenerList)
|
||||
{
|
||||
PRUint32 count;
|
||||
|
@ -42,6 +42,8 @@ private:
|
||||
PRBool m_closeProgress;
|
||||
PRBool m_processCanceled;
|
||||
nsString m_pendingStatus;
|
||||
PRInt32 m_pendingStateFlags;
|
||||
PRInt32 m_pendingStateValue;
|
||||
nsCOMPtr<nsIDOMWindowInternal> m_dialog;
|
||||
nsCOMPtr<nsISupportsArray> m_listenerList;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user