Bug #286282 --> Thunderbird should be building toolkit\components\alerts instead of xpfe\components\alerts.

Will work on converting the download manager next so we an remove the alerts service ifdef in xpfe\download-manager.

Also, port xpfe's API change to nsIAlertsService to use AString's to toolkit
This commit is contained in:
scott%scott-macgregor.org 2005-03-15 22:44:59 +00:00
parent 6e3bd24ced
commit fd991b113f
2 changed files with 4 additions and 1 deletions

View File

@ -63,7 +63,9 @@
#include "nsISound.h"
#include "nsIPrefService.h"
#include "nsIFileURL.h"
#ifndef MOZ_THUNDERBIRD
#include "nsIAlertsService.h"
#endif
#include "nsEmbedCID.h"
/* Outstanding issues/todo:
@ -1158,6 +1160,7 @@ nsDownload::OnStatusChange(nsIWebProgress *aWebProgress,
void nsDownload::DisplayDownloadFinishedAlert()
{
nsresult rv;
#ifndef MOZ_THUNDERBIRD
nsCOMPtr<nsIAlertsService> alertsService(do_GetService(NS_ALERTSERVICE_CONTRACTID, &rv));
if (NS_FAILED(rv))
return;
@ -1188,6 +1191,7 @@ void nsDownload::DisplayDownloadFinishedAlert()
alertsService->ShowAlertNotification(NS_LITERAL_STRING("moz-icon://") + NS_ConvertUTF8toUTF16(url),
finishedTitle, finishedText, PR_TRUE,
NS_LITERAL_STRING("download"), this);
#endif
}
NS_IMETHODIMP

View File

@ -59,7 +59,6 @@
#include "nsIStringBundle.h"
#include "nsIProgressDialog.h"
#include "nsIMIMEInfo.h"
#include "nsIAlertsService.h"
enum DownloadState { NOTSTARTED = -1, DOWNLOADING, FINISHED, FAILED, CANCELED };