Bug 852461 - Remove growl support from comm-central again now that bug 782211 has landed, r=irving, a=bustage-fix on CLOSED TREE.
This commit is contained in:
Родитель
6f85838080
Коммит
3dab175ef2
|
@ -475,9 +475,6 @@ mdnBarMessageNormal=%1$S has asked to be notified when you read this message.
|
|||
#LOCALIZATION NOTE(mdnBarMessageAddressDiffers) %1$S is the name of the sender, %2$S is the address(es) to send return receipt to
|
||||
mdnBarMessageAddressDiffers=%1$S has asked to be notified (on %2$S) when you read this message.
|
||||
|
||||
# Strings for growl notifications on Mac OS X
|
||||
growlNotification=New Mail
|
||||
|
||||
# mailCommands.js
|
||||
emptyJunkTitle=Confirm
|
||||
emptyJunkMessage=Are you sure you want to permanently delete all messages and subfolders in the Junk folder?
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "nsIAlertsService.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsToolkitCompsCID.h"
|
||||
#include "nsINotificationsList.h"
|
||||
#include "nsIMsgDatabase.h"
|
||||
#include "nsIMsgHdr.h"
|
||||
#include "nsIMsgHeaderParser.h"
|
||||
|
@ -184,11 +183,9 @@ NS_INTERFACE_MAP_END
|
|||
nsresult
|
||||
nsMessengerOSXIntegration::Init()
|
||||
{
|
||||
// need to register a named Growl notification
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
observerService->AddObserver(this, "before-growl-registration", false);
|
||||
return observerService->AddObserver(this, "mail-startup-done", false);
|
||||
}
|
||||
|
||||
|
@ -254,28 +251,6 @@ nsMessengerOSXIntegration::Observe(nsISupports* aSubject, const char* aTopic, co
|
|||
return mailSession->AddFolderListener(this, nsIFolderListener::boolPropertyChanged | nsIFolderListener::intPropertyChanged);
|
||||
}
|
||||
|
||||
// register named Growl notification for new mail alerts.
|
||||
if (!strcmp(aTopic, "before-growl-registration"))
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
observerService->RemoveObserver(this, "before-growl-registration");
|
||||
|
||||
nsCOMPtr<nsINotificationsList> notifications = do_QueryInterface(aSubject, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
GetStringBundle(getter_AddRefs(bundle));
|
||||
if (bundle)
|
||||
{
|
||||
nsString growlNotification;
|
||||
bundle->GetStringFromName(NS_LITERAL_STRING("growlNotification").get(), getter_Copies(growlNotification));
|
||||
notifications->AddNotification(growlNotification, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!strcmp(aTopic, kNewChatMessageTopic)) {
|
||||
// We don't have to bother about checking if the window is already focused
|
||||
// before attempting to bounce the dock icon, as BounceDockIcon is
|
||||
|
@ -408,25 +383,14 @@ nsMessengerOSXIntegration::ShowAlertMessage(const nsAString& aAlertTitle,
|
|||
|
||||
if (showAlert)
|
||||
{
|
||||
// Use growl if installed
|
||||
nsCOMPtr<nsIAlertsService> alertsService (do_GetService(NS_ALERTSERVICE_CONTRACTID, &rv));
|
||||
// If we have an nsIAlertsService implementation, use it:
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
GetStringBundle(getter_AddRefs(bundle));
|
||||
if (bundle)
|
||||
{
|
||||
nsString growlNotification;
|
||||
bundle->GetStringFromName(NS_LITERAL_STRING("growlNotification").get(),
|
||||
getter_Copies(growlNotification));
|
||||
rv = alertsService->ShowAlertNotification(NS_LITERAL_STRING(kNewMailAlertIcon),
|
||||
aAlertTitle,
|
||||
aAlertText,
|
||||
true,
|
||||
NS_ConvertASCIItoUTF16(aFolderURI),
|
||||
this,
|
||||
growlNotification);
|
||||
}
|
||||
alertsService->ShowAlertNotification(NS_LITERAL_STRING(kNewMailAlertIcon),
|
||||
aAlertTitle, aAlertText, true,
|
||||
NS_ConvertASCIItoUTF16(aFolderURI),
|
||||
this, EmptyString());
|
||||
}
|
||||
|
||||
BounceDockIcon();
|
||||
|
|
|
@ -396,9 +396,6 @@ mdnBarMessageNormal=%1$S has asked to be notified when you read this message.
|
|||
#LOCALIZATION NOTE(mdnBarMessageAddressDiffers) %1$S is the name of the sender, %2$S is the address(es) to send return receipt to
|
||||
mdnBarMessageAddressDiffers=%1$S has asked to be notified at %2$S when you read this message.
|
||||
|
||||
# Strings for growl notifications on Mac OS X
|
||||
growlNotification=New Mail
|
||||
|
||||
# mailCommands.js
|
||||
emptyJunkTitle=Confirm
|
||||
emptyJunkMessage=Are you sure you want to permanently delete all messages and subfolders in the Junk folder?
|
||||
|
|
Загрузка…
Ссылка в новой задаче