mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
fix for #61857. better status text when downloading the list of newsgroups
from the server. sr=bienvenu.
This commit is contained in:
parent
9cdea2ca96
commit
c6c1da1db7
@ -38,7 +38,7 @@ enterPassword=Please enter a password for news server access
|
||||
enterPasswordTitle=News Server Password Required
|
||||
okButtonText=Download
|
||||
|
||||
bytesReceived=%SK read (at %SK/sec)
|
||||
bytesReceived=Downloading newsgroups: %S received (%SK read at %SK/sec)
|
||||
checkingForNewNews=Checking newsgroup %S of %S for new messages
|
||||
|
||||
# LOCALIZATION NOTE (Error -304): In the following item, don't translate "NNTP"
|
||||
|
@ -2880,6 +2880,7 @@ PRInt32 nsNNTPProtocol::ProcessNewsgroups(nsIInputStream * inputStream, PRUint32
|
||||
PRInt32 nsNNTPProtocol::BeginReadNewsList()
|
||||
{
|
||||
m_readNewsListCount = 0;
|
||||
mNumGroupsListed = 0;
|
||||
m_nextState = NNTP_READ_LIST;
|
||||
|
||||
mBytesReceived = 0;
|
||||
@ -3001,11 +3002,14 @@ PRInt32 nsNNTPProtocol::ReadNewsList(nsIInputStream * inputStream, PRUint32 leng
|
||||
nsString rateStr;
|
||||
rateStr.AppendWithConversion(rate_buf);
|
||||
|
||||
const PRUnichar *formatStrings[2] = { bytesStr.GetUnicode(), rateStr.GetUnicode() };
|
||||
nsString numGroupsStr;
|
||||
numGroupsStr.AppendInt(mNumGroupsListed);
|
||||
|
||||
const PRUnichar *formatStrings[3] = { numGroupsStr.GetUnicode(), bytesStr.GetUnicode(), rateStr.GetUnicode() };
|
||||
NS_NAMED_LITERAL_STRING(literalPropertyTag, "bytesReceived");
|
||||
const PRUnichar *propertyTag = literalPropertyTag.get();
|
||||
rv = bundle->FormatStringFromName(propertyTag,
|
||||
formatStrings, 2,
|
||||
formatStrings, 3,
|
||||
getter_Copies(statusString));
|
||||
|
||||
rv = msgStatusFeedback->ShowStatusString(statusString);
|
||||
@ -3032,6 +3036,7 @@ PRInt32 nsNNTPProtocol::ReadNewsList(nsIInputStream * inputStream, PRUint32 leng
|
||||
NS_ASSERTION(m_nntpServer, "no nntp incoming server");
|
||||
if (m_nntpServer) {
|
||||
m_readNewsListCount++;
|
||||
mNumGroupsListed++;
|
||||
rv = m_nntpServer->AddNewsgroupToList(line);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),"failed to add to subscribe ds");
|
||||
}
|
||||
|
@ -406,6 +406,7 @@ private:
|
||||
PRInt32 mBytesReceived;
|
||||
PRInt32 mBytesReceivedSinceLastStatusUpdate;
|
||||
PRTime m_startTime;
|
||||
PRInt32 mNumGroupsListed;
|
||||
};
|
||||
|
||||
NS_BEGIN_EXTERN_C
|
||||
|
Loading…
Reference in New Issue
Block a user