Bug 322923 Need better OSX integration for Mailnews

p=me r=mnyromyr sr=neil (OSX code) r=stefanh (help)
This commit is contained in:
bugzilla%arlen.demon.co.uk 2006-03-02 15:51:03 +00:00
parent 0323fde248
commit 9df6dfcb52
8 changed files with 29 additions and 8 deletions

View File

@ -4463,6 +4463,9 @@ to filter unwanted mail.</p>
continue to work even after you close the Mail window (as long as another
&brandShortName; application is running).</p>
</li>
<li class="mac"><strong>Animate the Dock icon</strong>: Select this if you want
Mail &amp; Newsgroups to bounce the &brandShortName; Dock icon when new
messages arrive.</li>
<li><strong>Play a sound</strong>: Select this if you want &brandShortName;
Mail &amp; Newsgroups to play a sound when new messages arrive. You can
choose between the default system sound and a custom sound in WAV format.

View File

@ -124,3 +124,6 @@ ifeq ($(OS_ARCH),WINNT)
OS_LIBS += $(call EXPAND_LIBNAME,shell32)
endif
ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT)))
OS_LIBS += -framework Carbon
endif

View File

@ -114,6 +114,9 @@
#ifdef XP_OS2
#include "nsMessengerOS2Integration.h"
#endif
#ifdef XP_MACOSX
#include "nsMessengerOSXIntegration.h"
#endif
#include "nsCURILoader.h"
#include "nsMessengerContentHandler.h"
@ -170,6 +173,9 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessengerWinIntegration, Init)
#ifdef XP_OS2
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessengerOS2Integration, Init)
#endif
#ifdef XP_MACOSX
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessengerOSXIntegration, Init)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMessengerContentHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgContentPolicy, Init)
@ -419,6 +425,12 @@ static const nsModuleComponentInfo gComponents[] = {
NS_MESSENGEROSINTEGRATION_CONTRACTID,
nsMessengerOS2IntegrationConstructor,
},
#endif
#ifdef XP_MACOSX
{ "OSX OS Integration", NS_MESSENGEROSXINTEGRATION_CID,
NS_MESSENGEROSINTEGRATION_CONTRACTID,
nsMessengerOSXIntegrationConstructor,
},
#endif
{ "application/x-message-display content handler",
NS_MESSENGERCONTENTHANDLER_CID,

View File

@ -6,6 +6,8 @@ function Startup()
// see bug #158711
var newMailNotificationAlertUI = document.getElementById("newMailNotificationAlert");
newMailNotificationAlertUI.hidden = !("@mozilla.org/alerts-service;1" in Components.classes);
if (!/Mac/.test(navigator.platform))
document.getElementById('newMailNotificationBounce').setAttribute("hidden", true);
}
function PlaySoundCheck()

View File

@ -54,7 +54,7 @@
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["mailnewsSoundFileUrl", "newMailNotification",
"newMailNotificationType",
"newMailNotificationType", "newMailNotificationBounce",
"newMailNotificationAlert"];
]]>
</script>
@ -67,6 +67,9 @@
<checkbox id="newMailNotificationAlert" label="&showAnimatedAlert.label;"
prefstring="mail.biff.show_alert"
accesskey="&showAnimatedAlert.accesskey;" />
<checkbox id="newMailNotificationBounce" label="&bounceSystemDockIcon.label;"
prefstring="mail.biff.animate_dock_icon"
accesskey="&bounceSystemDockIcon.accesskey;"/>
<checkbox id="newMailNotification" accesskey="&playSound.accesskey;"
prefstring="mail.biff.play_sound" label="&playSound.label;"
oncommand="PlaySoundCheck()"/>

View File

@ -42,6 +42,8 @@
<!ENTITY playSound.accesskey "P">
<!ENTITY showAnimatedAlert.label "Show an alert">
<!ENTITY showAnimatedAlert.accesskey "S">
<!ENTITY bounceSystemDockIcon.label "Animate the Dock icon">
<!ENTITY bounceSystemDockIcon.accesskey "A">
<!ENTITY preview.label "Preview">
<!ENTITY preview.accesskey "v">
<!ENTITY systemsound.label "System New Mail Sound">

View File

@ -131,7 +131,8 @@ CPPSRCS = \
# MacOSX requires the MoreFiles module
ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT)))
REQUIRES += macmorefiles
REQUIRES += macmorefiles
CPPSRCS += nsMessengerOSXIntegration.cpp
endif
ifeq ($(OS_ARCH),WINNT)
@ -158,12 +159,6 @@ DEFINES += -DMOZ_LDAP_XPCOM
endif
ifdef MOZ_THUNDERBIRD
ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT)))
CPPSRCS += nsMessengerOSXIntegration.cpp
endif
endif
EXPORTS = \
nsMsgRDFDataSource.h \
nsMsgRDFUtils.h \

View File

@ -562,6 +562,7 @@ pref("mail.biff.play_sound.type",0);
// otherwise, this needs to be a file url
pref("mail.biff.play_sound.url","");
pref("mail.biff.show_alert", true);
pref("mail.biff.animate_dock_icon", false);
pref("mail.content_disposition_type", 0);