зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
dc5c742ecc
Коммит
d52a020758
|
@ -686,9 +686,10 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
mProgress->OnStateChange(nsnull, nsnull, nsIWebProgressListener::STATE_START, 0);
|
||||
}
|
||||
|
||||
// i'm assuming the compose window is still up at this point...
|
||||
|
@ -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;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче