зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 54091, r=sspitzer, sr=alecf
This commit is contained in:
Родитель
241ed2889c
Коммит
52440cbb6c
|
@ -395,7 +395,7 @@ NS_IMETHODIMP ImportMailImpl::FindMailboxes( nsIFileSpec *pLoc, nsISupportsArray
|
|||
void ImportMailImpl::AddLinebreak( nsString *pStream)
|
||||
{
|
||||
if (pStream)
|
||||
pStream->AppendWithConversion( NS_LINEBREAK);
|
||||
pStream->AppendWithConversion( LF);
|
||||
}
|
||||
|
||||
void ImportMailImpl::ReportSuccess( nsString& name, PRInt32 count, nsString *pStream)
|
||||
|
|
|
@ -373,7 +373,7 @@ NS_IMETHODIMP ImportMailImpl::FindMailboxes( nsIFileSpec *pLoc, nsISupportsArray
|
|||
void ImportMailImpl::AddLinebreak( nsString *pStream)
|
||||
{
|
||||
if (pStream)
|
||||
pStream->AppendWithConversion( NS_LINEBREAK);
|
||||
pStream->AppendWithConversion( LF);
|
||||
}
|
||||
|
||||
void ImportMailImpl::ReportSuccess( nsString& name, PRInt32 count, nsString *pStream)
|
||||
|
|
|
@ -378,7 +378,7 @@ NS_IMETHODIMP ImportMailImpl::FindMailboxes( nsIFileSpec *pLoc, nsISupportsArray
|
|||
void ImportMailImpl::AddLinebreak( nsString *pStream)
|
||||
{
|
||||
if (pStream)
|
||||
pStream->AppendWithConversion(NS_LINEBREAK);
|
||||
pStream->AppendWithConversion( LF);
|
||||
}
|
||||
|
||||
void ImportMailImpl::ReportSuccess( nsString& name, PRInt32 count, nsString *pStream)
|
||||
|
|
|
@ -401,6 +401,8 @@ function attachStrings(aNode, aString)
|
|||
if (strings[i]) {
|
||||
var currNode = document.createTextNode(strings[i]);
|
||||
attachNode.appendChild(currNode);
|
||||
var br = document.createElementNS("http://www.w3.org/1999/xhtml", 'br');
|
||||
attachNode.appendChild( br);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -306,4 +306,4 @@ AddrProgressMeterText=Converting address books from %S
|
|||
ImportSelectSettings=Select settings file
|
||||
ImportSelectMailDir=Select mail directory
|
||||
ImportSelectAddrDir=Select address book directory
|
||||
ImportSelectAddrFile=Select address book directory
|
||||
ImportSelectAddrFile=Select address book file
|
||||
|
|
|
@ -678,6 +678,11 @@ NS_IMETHODIMP nsImportGenericAddressBooks::GetProgress(PRInt32 *_retval)
|
|||
if (*_retval < 5)
|
||||
*_retval = 5;
|
||||
|
||||
// as long as the thread is alive don't return completely
|
||||
// done.
|
||||
if (*_retval > 99)
|
||||
*_retval = 99;
|
||||
|
||||
return( NS_OK);
|
||||
}
|
||||
|
||||
|
|
|
@ -620,6 +620,10 @@ NS_IMETHODIMP nsImportGenericMail::GetProgress(PRInt32 *_retval)
|
|||
else
|
||||
*_retval = 0;
|
||||
|
||||
// never return 100% while the thread is still alive
|
||||
if (*_retval > 99)
|
||||
*_retval = 99;
|
||||
|
||||
return( NS_OK);
|
||||
}
|
||||
|
||||
|
|
|
@ -402,7 +402,7 @@ void ImportAddressImpl::ReportSuccess( nsString& name, nsString *pStream)
|
|||
pStream->Append( pText);
|
||||
nsTextFormatter::smprintf_free( pText);
|
||||
nsTextStringBundle::FreeString( pFmt);
|
||||
pStream->AppendWithConversion( NS_LINEBREAK);
|
||||
pStream->AppendWithConversion( LF);
|
||||
NS_IF_RELEASE( pBundle);
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,7 @@ void ImportAddressImpl::ReportError( PRInt32 errorNum, nsString& name, nsString
|
|||
pStream->Append( pText);
|
||||
nsTextFormatter::smprintf_free( pText);
|
||||
nsTextStringBundle::FreeString( pFmt);
|
||||
pStream->AppendWithConversion( NS_LINEBREAK);
|
||||
pStream->AppendWithConversion( LF);
|
||||
NS_IF_RELEASE( pBundle);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче