Bug 592235 - Alert on active folder should identify Mail Account or Folder for "This folder is being processed... to get messages.". r=mkmelin, ui-r=bwinton, a=RyanVM

CLOSED TREE
This commit is contained in:
Suyash Agarwal 2013-08-22 10:08:09 -04:00
Родитель 23b3484994
Коммит 7168cc495f
4 изменённых файлов: 27 добавлений и 11 удалений

Просмотреть файл

@ -97,7 +97,9 @@ copyingMessagesStatus=Copying %S of %S messages to %S
movingMessagesStatus=Moving %S of %S messages to %S
# Status - write error occurred
pop3MessageFolderBusy=This folder is being processed. Please wait until processing is complete to get messages.
# LOCALIZATION NOTE (pop3ServerBusy): Do not translate the word "%S" below.
# Place %S where the account name should appear.
pop3ServerBusy=The account %S is being processed. Please wait until processing is complete to get messages.
movemailCantOpenSpoolFile=Unable to open mail spool file %S.

Просмотреть файл

@ -2365,7 +2365,7 @@ nsPop3Protocol::GetStat()
if (NS_FAILED(rv))
{
m_nsIPop3Sink->AbortMailDelivery(this);
return Error(rv == NS_MSG_FOLDER_BUSY ? "pop3MessageFolderBusy" :
return Error(rv == NS_MSG_FOLDER_BUSY ? "pop3ServerBusy" :
"pop3MessageWriteError");
}

Просмотреть файл

@ -252,7 +252,7 @@ nsresult nsPop3Service::RunPopUrl(nsIMsgIncomingServer *aServer, nsIURI *aUrlToR
// *NOT* going to run the url
bool serverBusy = false;
rv = aServer->GetServerBusy(&serverBusy);
NS_ENSURE_SUCCESS(rv, rv);
if (!serverBusy)
{
nsRefPtr<nsPop3Protocol> protocol = new nsPop3Protocol(aUrlToRun);
@ -441,10 +441,10 @@ void nsPop3Service::AlertServerBusy(nsIMsgMailNewsUrl *url)
nsCOMPtr<nsIStringBundleService> bundleService =
mozilla::services::GetStringBundleService();
if (!bundleService)
return void(0);
return;
nsCOMPtr<nsIStringBundle> bundle;
rv = bundleService->CreateBundle("chrome://messenger/locale/localMsgs.properties", getter_AddRefs(bundle));
NS_ENSURE_SUCCESS(rv, void(0));
NS_ENSURE_SUCCESS_VOID(rv);
nsCOMPtr<nsIMsgWindow> msgWindow;
nsCOMPtr<nsIPrompt> dialog;
@ -453,14 +453,26 @@ void nsPop3Service::AlertServerBusy(nsIMsgMailNewsUrl *url)
return;
rv = msgWindow->GetPromptDialog(getter_AddRefs(dialog));
NS_ENSURE_SUCCESS(rv, void(0));
NS_ENSURE_SUCCESS_VOID(rv);
nsString accountName;
nsCOMPtr<nsIMsgIncomingServer> server;
rv = url->GetServer(getter_AddRefs(server));
NS_ENSURE_SUCCESS_VOID(rv);
rv = server->GetPrettyName(accountName);
NS_ENSURE_SUCCESS_VOID(rv);
const PRUnichar *params[] = { accountName.get() };
nsString alertString;
bundle->GetStringFromName(
NS_LITERAL_STRING("pop3MessageFolderBusy").get(),
getter_Copies(alertString));
nsString dialogTitle;
bundle->FormatStringFromName(
NS_LITERAL_STRING("pop3ServerBusy").get(),
params, 1, getter_Copies(alertString));
bundle->FormatStringFromName(
NS_LITERAL_STRING("pop3ErrorDialogTitle").get(),
params, 1, getter_Copies(dialogTitle));
if (!alertString.IsEmpty())
dialog->Alert(nullptr, alertString.get());
dialog->Alert(dialogTitle.get(), alertString.get());
}
NS_IMETHODIMP nsPop3Service::NewChannel(nsIURI *aURI, nsIChannel **_retval)

Просмотреть файл

@ -72,7 +72,9 @@ pop3PasswordFailed=Sending of password for user %1$S did not succeed.
pop3MessageWriteError=Unable to write the email to the mailbox. Make sure the file system allows you write privileges, and you have enough disk space to copy the mailbox.
# Status - write error occurred
pop3MessageFolderBusy=This folder is being processed. Please wait until processing is complete to get messages.
# LOCALIZATION NOTE (pop3ServerBusy): Do not translate the word "%S" below.
# Place %S where the account name should appear.
pop3ServerBusy=The account %S is being processed. Please wait until processing is complete to get messages.
# Status - retr failure from the server
pop3RetrFailure=The RETR command did not succeed. Error retrieving a message.