diff options
author | Beat Gaetzi <beat@FreeBSD.org> | 2014-12-03 14:55:25 +0000 |
---|---|---|
committer | Beat Gaetzi <beat@FreeBSD.org> | 2014-12-03 14:55:25 +0000 |
commit | 0ccec1792b8fba8fc60c7a879953c57f10fbfc9c (patch) | |
tree | 1a32479f5df7c300e66e4b2c4ca0ed5c4bfe2463 /mail/thunderbird | |
parent | ae7b0cca208a020120e93f7eac51cf818734fbe4 (diff) | |
download | ports-0ccec1792b8fba8fc60c7a879953c57f10fbfc9c.tar.gz ports-0ccec1792b8fba8fc60c7a879953c57f10fbfc9c.zip |
Notes
Diffstat (limited to 'mail/thunderbird')
-rw-r--r-- | mail/thunderbird/Makefile | 34 | ||||
-rw-r--r-- | mail/thunderbird/distinfo | 4 | ||||
-rw-r--r-- | mail/thunderbird/files/patch-bug1076983 | 45 | ||||
-rw-r--r-- | mail/thunderbird/files/patch-bug1082199 | 26 | ||||
-rw-r--r-- | mail/thunderbird/files/patch-bug1103858 | 42 | ||||
-rw-r--r-- | mail/thunderbird/files/patch-bug858919 | 391 |
6 files changed, 468 insertions, 74 deletions
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile index 92c5dc57d83d..f4b813e1f284 100644 --- a/mail/thunderbird/Makefile +++ b/mail/thunderbird/Makefile @@ -2,10 +2,10 @@ # $FreeBSD$ PORTNAME= thunderbird -DISTVERSION= 31.2.0 +DISTVERSION= 31.3.0 CATEGORIES= mail news net-im ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ - https://ftp.mozilla.org/pub/mozilla.org/${PORTNAME}/candidates/${DISTVERSION}-candidates/build2/source/ + https://ftp.mozilla.org/pub/mozilla.org/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source/ DISTFILES= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX} EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX} @@ -32,17 +32,14 @@ BUILD_DEPENDS= nspr>=4.10.6:${PORTSDIR}/devel/nspr \ LIB_DEPENDS= libv4l2.so:${PORTSDIR}/multimedia/libv4l EM_VERSION= 1.7.2 -L_VERSION= 3.3.2 +L_VERSION= 3.3.3 SSP_UNSAFE= yes -OBJDIR_BUILD= # in-tree build broken after bug 789837 USE_GECKO= gecko USE_MOZILLA= # empty -WANT_GNOME= yes USE_QT5= # empty QT_NONSTANDARD= yes -ALL_TARGET= default USE_GL= gl USES= dos2unix tar:bzip2 DOS2UNIX_FILES= mozilla/media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp @@ -63,11 +60,6 @@ MOZ_PIS_SCRIPTS=moz_pis_S50cleanhome OPTIONS_DEFINE= ENIGMAIL LIGHTNING OPTIONS_DEFAULT=ENIGMAIL LIGHTNING -# non-client.mk objdir build broken after bug 846540 -.undef GNU_CONFIGURE -ALL_TARGET= build -MAKEFILE= ${WRKSRC}/client.mk - .include "${.CURDIR}/../../www/firefox/Makefile.options" OPTIONS_DEFAULT:=${OPTIONS_DEFAULT:S/GSTREAMER//} @@ -79,21 +71,9 @@ MOZSRC:= ${WRKSRC}/mozilla XPI_LIBDIR= ${PREFIX}/lib/xpi -# avoid clang 3.2/3.3 crash in js/src/jsgc.cpp on refillFreeList<(js::AllowGC)1> -# To be removed when 9.2R goes EOL. http://llvm.org/PR15840 -.if ${ARCH} == i386 && ${CHOSEN_COMPILER_TYPE} == clang && ${COMPILER_VERSION:M3[23]} -. if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} -BROKEN= Cannot build with OPTIMIZED_CFLAGS option due to \ - a ${CHOSEN_COMPILER_TYPE} bug: unset the option or \ - use FAVORITE_COMPILER=gcc in Makefile.local/make.conf -# apply workaround only for -O2 or greater -. elif ${CXXFLAGS:M-O*} && ! ${CXXFLAGS:M-O[01]} -. if ${MACHINE_CPU:Msse2} -CXXFLAGS+= -msse2 -. else -CXXFLAGS+= -O1 -. endif -. endif +.if ${PORTVERSION:R:R} < 33 +CONFIGURE_TARGET:=${CONFIGURE_TARGET:S/portbld/unknown/} +MOZ_OPTIONS:= ${MOZ_OPTIONS:S/${CONFIGURE_TARGET}//} .endif .if ${PORT_OPTIONS:MALSA} @@ -163,7 +143,7 @@ pre-configure: .if ${PORT_OPTIONS:MENIGMAIL} post-configure: cd ${WRKSRC}/mailnews/extensions/enigmail/ && \ - ${SETENV} ${MAKE_ENV} ./configure + ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ./configure post-build: ${DO_MAKE_BUILD:S/${MAKEFILE}/Makefile/} all xpi \ diff --git a/mail/thunderbird/distinfo b/mail/thunderbird/distinfo index 18cb22c174eb..08fa8fde9536 100644 --- a/mail/thunderbird/distinfo +++ b/mail/thunderbird/distinfo @@ -1,4 +1,4 @@ -SHA256 (thunderbird-31.2.0.source.tar.bz2) = 48130bbd9102303167aa832ea80970201777ee65b91fbab515332527850749b4 -SIZE (thunderbird-31.2.0.source.tar.bz2) = 171047372 +SHA256 (thunderbird-31.3.0.source.tar.bz2) = b742782965ce9c65b69c1dc470497ea456f11caeb8fda3ea593ee31ad496f556 +SIZE (thunderbird-31.3.0.source.tar.bz2) = 171213377 SHA256 (enigmail-1.7.2.tar.gz) = 7b3a62e83961bafec1cdac60075aa6c317c8f655a837e31a7d1f3ce6a49fc7d6 SIZE (enigmail-1.7.2.tar.gz) = 1420346 diff --git a/mail/thunderbird/files/patch-bug1076983 b/mail/thunderbird/files/patch-bug1076983 deleted file mode 100644 index ff764be7398f..000000000000 --- a/mail/thunderbird/files/patch-bug1076983 +++ /dev/null @@ -1,45 +0,0 @@ -commit e10ee74 -Author: Martin Thomson <martin.thomson@gmail.com> -Date: Tue Oct 14 17:17:35 2014 -0700 - - Bug 1076983 - Disabling SSL 3.0 with pref ---- - netwerk/base/public/security-prefs.js | 2 +- - security/manager/ssl/src/nsNSSComponent.cpp | 7 +++---- - 2 files changed, 4 insertions(+), 5 deletions(-) - -diff --git netwerk/base/public/security-prefs.js netwerk/base/public/security-prefs.js -index 352552e..c12731b 100644 ---- mozilla/netwerk/base/public/security-prefs.js -+++ mozilla/netwerk/base/public/security-prefs.js -@@ -2,7 +2,7 @@ - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - --pref("security.tls.version.min", 0); -+pref("security.tls.version.min", 1); - pref("security.tls.version.max", 3); - - pref("security.ssl.allow_unrestricted_renego_everywhere__temporarily_available_pref", false); -diff --git security/manager/ssl/src/nsNSSComponent.cpp security/manager/ssl/src/nsNSSComponent.cpp -index 8cab67b..772959d 100644 ---- mozilla/security/manager/ssl/src/nsNSSComponent.cpp -+++ mozilla/security/manager/ssl/src/nsNSSComponent.cpp -@@ -829,14 +829,13 @@ void nsNSSComponent::setValidationOptions(bool isInitialSetting, - mDefaultCertVerifier = new SharedCertVerifier(odc, osc, ogc, pinningMode); - } - --// Enable the TLS versions given in the prefs, defaulting to SSL 3.0 (min --// version) and TLS 1.2 (max version) when the prefs aren't set or set to --// invalid values. -+// Enable the TLS versions given in the prefs, defaulting to TLS 1.0 (min) and -+// TLS 1.2 (max) when the prefs aren't set or set to invalid values. - nsresult - nsNSSComponent::setEnabledTLSVersions() - { - // keep these values in sync with security-prefs.js -- static const int32_t PSM_DEFAULT_MIN_TLS_VERSION = 0; -+ static const int32_t PSM_DEFAULT_MIN_TLS_VERSION = 1; - static const int32_t PSM_DEFAULT_MAX_TLS_VERSION = 3; - - int32_t minVersion = Preferences::GetInt("security.tls.version.min", diff --git a/mail/thunderbird/files/patch-bug1082199 b/mail/thunderbird/files/patch-bug1082199 new file mode 100644 index 000000000000..e24fe4726c2c --- /dev/null +++ b/mail/thunderbird/files/patch-bug1082199 @@ -0,0 +1,26 @@ +commit 258ec90 +Author: Guilherme Goncalves <guilherme.p.gonc@gmail.com> +Date: Fri Oct 17 15:55:00 2014 +0200 + + Bug 1082199 - Recompute stats in jemalloc_stats when using jemalloc3. r=glandium +--- + memory/build/mozjemalloc_compat.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c +index 78bb13a..70265a7 100644 +--- mozilla/memory/build/mozjemalloc_compat.c ++++ mozilla/memory/build/mozjemalloc_compat.c +@@ -68,6 +68,12 @@ jemalloc_stats_impl(jemalloc_stats_t *stats) + size_t active, allocated, mapped, page, pdirty; + size_t lg_chunk; + ++ // Refresh jemalloc's stats by updating its epoch, see ctl_refresh in ++ // src/ctl.c ++ uint64_t epoch = 0; ++ size_t esz = sizeof(epoch); ++ int ret = je_(mallctl)("epoch", &epoch, &esz, &epoch, esz); ++ + CTL_GET("arenas.narenas", narenas); + CTL_GET("arenas.page", page); + CTL_GET("stats.active", active); diff --git a/mail/thunderbird/files/patch-bug1103858 b/mail/thunderbird/files/patch-bug1103858 new file mode 100644 index 000000000000..71ce13eb116e --- /dev/null +++ b/mail/thunderbird/files/patch-bug1103858 @@ -0,0 +1,42 @@ +diff --git configure.in configure.in +index b2b45e7..dcfdfb7 100644 +--- mozilla/configure.in ++++ mozilla/configure.in +@@ -8346,7 +8346,7 @@ case "$OS_TARGET" in + NECKO_WIFI=1 + fi + ;; +- Darwin|FreeBSD|SunOS|WINNT) ++ Darwin|DragonFly|FreeBSD|SunOS|WINNT) + NECKO_WIFI=1 + ;; + Linux) +diff --git netwerk/wifi/moz.build netwerk/wifi/moz.build +index d4de063..3949380 100644 +--- mozilla/netwerk/wifi/moz.build ++++ mozilla/netwerk/wifi/moz.build +@@ -35,7 +35,7 @@ if CONFIG['OS_ARCH'] == 'Darwin': + UNIFIED_SOURCES += [ + 'osx_corewlan.mm', + ] +-elif CONFIG['OS_ARCH'] == 'FreeBSD': ++elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD'): + UNIFIED_SOURCES += [ + 'nsWifiScannerFreeBSD.cpp', + ] +diff --git netwerk/wifi/nsWifiScannerFreeBSD.cpp netwerk/wifi/nsWifiScannerFreeBSD.cpp +index bdf171e..4185d69 100644 +--- mozilla/netwerk/wifi/nsWifiScannerFreeBSD.cpp ++++ mozilla/netwerk/wifi/nsWifiScannerFreeBSD.cpp +@@ -13,7 +13,11 @@ + #include <sys/socket.h> + #include <net/if.h> + #include <net/if_media.h> ++#ifdef __DragonFly__ ++#include <netproto/802_11/ieee80211_ioctl.h> ++#else + #include <net80211/ieee80211_ioctl.h> ++#endif + + #include <ifaddrs.h> + #include <string.h> diff --git a/mail/thunderbird/files/patch-bug858919 b/mail/thunderbird/files/patch-bug858919 new file mode 100644 index 000000000000..04dd48deee22 --- /dev/null +++ b/mail/thunderbird/files/patch-bug858919 @@ -0,0 +1,391 @@ +commit a33d4f7 +Author: Martin Stransky <stransky@redhat.com> +Date: Fri Nov 14 04:04:00 2014 +0100 + + Bug 858919 - Add support for libnotify calls which was removed for new notification API. r=karlt +--- + toolkit/components/alerts/nsAlertsService.cpp | 10 +-- + toolkit/system/gnome/moz.build | 2 + + toolkit/system/gnome/nsAlertsIconListener.cpp | 64 ++++++++++++------ + toolkit/system/gnome/nsAlertsIconListener.h | 89 ++++++++++++++++++++++++++ + toolkit/system/gnome/nsGnomeModule.cpp | 5 ++ + toolkit/system/gnome/nsSystemAlertsService.cpp | 54 ++++++++++++++++ + toolkit/system/gnome/nsSystemAlertsService.h | 27 ++++++++ + 7 files changed, 226 insertions(+), 25 deletions(-) + +diff --git toolkit/components/alerts/nsAlertsService.cpp toolkit/components/alerts/nsAlertsService.cpp +index 93f4536..f8b5e07 100644 +--- mozilla/toolkit/components/alerts/nsAlertsService.cpp ++++ mozilla/toolkit/components/alerts/nsAlertsService.cpp +@@ -100,9 +100,11 @@ NS_IMETHODIMP nsAlertsService::ShowAlertNotification(const nsAString & aImageUrl + nsCOMPtr<nsIAlertsService> sysAlerts(do_GetService(NS_SYSTEMALERTSERVICE_CONTRACTID)); + nsresult rv; + if (sysAlerts) { +- return sysAlerts->ShowAlertNotification(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable, +- aAlertCookie, aAlertListener, aAlertName, +- aBidi, aLang, IPC::Principal(aPrincipal)); ++ rv = sysAlerts->ShowAlertNotification(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable, ++ aAlertCookie, aAlertListener, aAlertName, ++ aBidi, aLang, IPC::Principal(aPrincipal)); ++ if (NS_SUCCEEDED(rv)) ++ return NS_OK; + } + + if (!ShouldShowAlert()) { +diff --git toolkit/system/gnome/moz.build toolkit/system/gnome/moz.build +index c033f8b..9242209 100644 +--- mozilla/toolkit/system/gnome/moz.build ++++ mozilla/toolkit/system/gnome/moz.build +@@ -5,7 +5,9 @@ + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + + SOURCES += [ ++ 'nsAlertsIconListener.cpp', + 'nsGnomeModule.cpp', ++ 'nsSystemAlertsService.cpp', + ] + + if CONFIG['MOZ_ENABLE_GCONF']: +diff --git toolkit/system/gnome/nsAlertsIconListener.cpp toolkit/system/gnome/nsAlertsIconListener.cpp +index f39335e..55f4356 100644 +--- mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp ++++ mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp +@@ -51,6 +51,21 @@ static void notify_closed_marshal(GClosure* closure, + NS_RELEASE(alert); + } + ++static GdkPixbuf* ++GetPixbufFromImgRequest(imgIRequest* aRequest) ++{ ++ nsCOMPtr<imgIContainer> image; ++ nsresult rv = aRequest->GetImage(getter_AddRefs(image)); ++ if (NS_FAILED(rv)) { ++ return nullptr; ++ } ++ ++ nsCOMPtr<nsIImageToPixbuf> imgToPixbuf = ++ do_GetService("@mozilla.org/widget/image-to-gdk-pixbuf;1"); ++ ++ return imgToPixbuf->ConvertImageToPixbuf(image); ++} ++ + NS_IMPL_ISUPPORTS(nsAlertsIconListener, imgINotificationObserver, + nsIObserver, nsISupportsWeakReference) + +@@ -106,47 +121,45 @@ nsAlertsIconListener::Notify(imgIRequest *aRequest, int32_t aType, const nsIntRe + nsresult + nsAlertsIconListener::OnStopRequest(imgIRequest* aRequest) + { ++ NS_ASSERTION(mIconRequest == aRequest, "aRequest does not match!"); ++ + uint32_t imgStatus = imgIRequest::STATUS_ERROR; + nsresult rv = aRequest->GetImageStatus(&imgStatus); + NS_ENSURE_SUCCESS(rv, rv); + if (imgStatus == imgIRequest::STATUS_ERROR && !mLoadedFrame) { + // We have an error getting the image. Display the notification with no icon. + ShowAlert(nullptr); +- } + +- if (mIconRequest) { ++ // Cancel any pending request + mIconRequest->Cancel(NS_BINDING_ABORTED); + mIconRequest = nullptr; + } ++ + return NS_OK; + } + + nsresult + nsAlertsIconListener::OnStopFrame(imgIRequest* aRequest) + { +- if (aRequest != mIconRequest) +- return NS_ERROR_FAILURE; ++ NS_ASSERTION(mIconRequest == aRequest, "aRequest does not match!"); + + if (mLoadedFrame) + return NS_OK; // only use one frame + +- nsCOMPtr<imgIContainer> image; +- nsresult rv = aRequest->GetImage(getter_AddRefs(image)); +- if (NS_FAILED(rv)) +- return rv; +- +- nsCOMPtr<nsIImageToPixbuf> imgToPixbuf = +- do_GetService("@mozilla.org/widget/image-to-gdk-pixbuf;1"); +- +- GdkPixbuf* imagePixbuf = imgToPixbuf->ConvertImageToPixbuf(image); +- if (!imagePixbuf) +- return NS_ERROR_FAILURE; ++ GdkPixbuf* imagePixbuf = GetPixbufFromImgRequest(aRequest); ++ if (!imagePixbuf) { ++ ShowAlert(nullptr); ++ } else { ++ ShowAlert(imagePixbuf); ++ g_object_unref(imagePixbuf); ++ } + +- ShowAlert(imagePixbuf); ++ mLoadedFrame = true; + +- g_object_unref(imagePixbuf); ++ // Cancel any pending request (multipart image loading/decoding for instance) ++ mIconRequest->Cancel(NS_BINDING_ABORTED); ++ mIconRequest = nullptr; + +- mLoadedFrame = true; + return NS_OK; + } + +@@ -180,6 +193,9 @@ nsAlertsIconListener::ShowAlert(GdkPixbuf* aPixbuf) + mClosureHandler = g_signal_connect_closure(mNotification, "closed", closure, FALSE); + gboolean result = notify_notification_show(mNotification, nullptr); + ++ if (result && mAlertListener) ++ mAlertListener->Observe(nullptr, "alertshow", mAlertCookie.get()); ++ + return result ? NS_OK : NS_ERROR_FAILURE; + } + +@@ -201,9 +217,15 @@ nsAlertsIconListener::StartRequest(const nsAString & aImageUrl) + if (!il) + return ShowAlert(nullptr); + +- return il->LoadImageXPCOM(imageUri, nullptr, nullptr, nullptr, nullptr, +- this, nullptr, nsIRequest::LOAD_NORMAL, nullptr, +- nullptr, getter_AddRefs(mIconRequest)); ++ nsresult rv = il->LoadImageXPCOM(imageUri, nullptr, nullptr, nullptr, nullptr, ++ this, nullptr, nsIRequest::LOAD_NORMAL, nullptr, ++ 0 /* use default */, getter_AddRefs(mIconRequest)); ++ if (NS_FAILED(rv)) ++ return rv; ++ ++ mIconRequest->StartDecoding(); ++ ++ return NS_OK; + } + + void +diff --git toolkit/system/gnome/nsAlertsIconListener.h toolkit/system/gnome/nsAlertsIconListener.h +new file mode 100644 +index 0000000..ac96db9 +--- /dev/null ++++ mozilla/toolkit/system/gnome/nsAlertsIconListener.h +@@ -0,0 +1,89 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef nsAlertsIconListener_h__ ++#define nsAlertsIconListener_h__ ++ ++#include "nsCOMPtr.h" ++#include "imgINotificationObserver.h" ++#include "nsStringAPI.h" ++#include "nsIObserver.h" ++#include "nsWeakReference.h" ++ ++#include <gdk-pixbuf/gdk-pixbuf.h> ++ ++class imgIRequest; ++ ++struct NotifyNotification; ++ ++class nsAlertsIconListener : public imgINotificationObserver, ++ public nsIObserver, ++ public nsSupportsWeakReference ++{ ++public: ++ NS_DECL_ISUPPORTS ++ NS_DECL_IMGINOTIFICATIONOBSERVER ++ NS_DECL_NSIOBSERVER ++ ++ nsAlertsIconListener(); ++ ++ nsresult InitAlertAsync(const nsAString & aImageUrl, ++ const nsAString & aAlertTitle, ++ const nsAString & aAlertText, ++ bool aAlertTextClickable, ++ const nsAString & aAlertCookie, ++ nsIObserver * aAlertListener); ++ ++ void SendCallback(); ++ void SendClosed(); ++ ++protected: ++ virtual ~nsAlertsIconListener(); ++ ++ nsresult OnStopRequest(imgIRequest* aRequest); ++ nsresult OnStopFrame(imgIRequest* aRequest); ++ ++ /** ++ * The only difference between libnotify.so.4 and libnotify.so.1 for these symbols ++ * is that notify_notification_new takes three arguments in libnotify.so.4 and ++ * four in libnotify.so.1. ++ * Passing the fourth argument as NULL is binary compatible. ++ */ ++ typedef void (*NotifyActionCallback)(NotifyNotification*, char*, gpointer); ++ typedef bool (*notify_is_initted_t)(void); ++ typedef bool (*notify_init_t)(const char*); ++ typedef GList* (*notify_get_server_caps_t)(void); ++ typedef NotifyNotification* (*notify_notification_new_t)(const char*, const char*, const char*, const char*); ++ typedef bool (*notify_notification_show_t)(void*, char*); ++ typedef void (*notify_notification_set_icon_from_pixbuf_t)(void*, GdkPixbuf*); ++ typedef void (*notify_notification_add_action_t)(void*, const char*, const char*, NotifyActionCallback, gpointer, GFreeFunc); ++ ++ nsCOMPtr<imgIRequest> mIconRequest; ++ nsCString mAlertTitle; ++ nsCString mAlertText; ++ ++ nsCOMPtr<nsIObserver> mAlertListener; ++ nsString mAlertCookie; ++ ++ bool mLoadedFrame; ++ bool mAlertHasAction; ++ ++ static void* libNotifyHandle; ++ static bool libNotifyNotAvail; ++ static notify_is_initted_t notify_is_initted; ++ static notify_init_t notify_init; ++ static notify_get_server_caps_t notify_get_server_caps; ++ static notify_notification_new_t notify_notification_new; ++ static notify_notification_show_t notify_notification_show; ++ static notify_notification_set_icon_from_pixbuf_t notify_notification_set_icon_from_pixbuf; ++ static notify_notification_add_action_t notify_notification_add_action; ++ NotifyNotification* mNotification; ++ gulong mClosureHandler; ++ ++ nsresult StartRequest(const nsAString & aImageUrl); ++ nsresult ShowAlert(GdkPixbuf* aPixbuf); ++}; ++ ++#endif +diff --git toolkit/system/gnome/nsGnomeModule.cpp toolkit/system/gnome/nsGnomeModule.cpp +index 5ccc8e5..f893893 100644 +--- mozilla/toolkit/system/gnome/nsGnomeModule.cpp ++++ mozilla/toolkit/system/gnome/nsGnomeModule.cpp +@@ -22,6 +22,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGnomeVFSService, Init) + NS_GENERIC_FACTORY_CONSTRUCTOR(nsGIOService) + NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init) + #endif ++#include "nsSystemAlertsService.h" ++NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSystemAlertsService, Init) + + #ifdef MOZ_ENABLE_GCONF + NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID); +@@ -33,6 +35,7 @@ NS_DEFINE_NAMED_CID(NS_GNOMEVFSSERVICE_CID); + NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID); + NS_DEFINE_NAMED_CID(NS_GSETTINGSSERVICE_CID); + #endif ++NS_DEFINE_NAMED_CID(NS_SYSTEMALERTSSERVICE_CID); + + static const mozilla::Module::CIDEntry kGnomeCIDs[] = { + #ifdef MOZ_ENABLE_GCONF +@@ -45,6 +48,7 @@ static const mozilla::Module::CIDEntry kGnomeCIDs[] = { + { &kNS_GIOSERVICE_CID, false, nullptr, nsGIOServiceConstructor }, + { &kNS_GSETTINGSSERVICE_CID, false, nullptr, nsGSettingsServiceConstructor }, + #endif ++ { &kNS_SYSTEMALERTSSERVICE_CID, false, nullptr, nsSystemAlertsServiceConstructor }, + { nullptr } + }; + +@@ -59,6 +63,7 @@ static const mozilla::Module::ContractIDEntry kGnomeContracts[] = { + { NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID }, + { NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID }, + #endif ++ { NS_SYSTEMALERTSERVICE_CONTRACTID, &kNS_SYSTEMALERTSSERVICE_CID }, + { nullptr } + }; + +diff --git toolkit/system/gnome/nsSystemAlertsService.cpp toolkit/system/gnome/nsSystemAlertsService.cpp +new file mode 100644 +index 0000000..b91b402 +--- /dev/null ++++ mozilla/toolkit/system/gnome/nsSystemAlertsService.cpp +@@ -0,0 +1,53 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "nsXULAppAPI.h" ++#include "nsSystemAlertsService.h" ++#include "nsAlertsIconListener.h" ++#include "nsAutoPtr.h" ++ ++NS_IMPL_ADDREF(nsSystemAlertsService) ++NS_IMPL_RELEASE(nsSystemAlertsService) ++ ++NS_INTERFACE_MAP_BEGIN(nsSystemAlertsService) ++ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAlertsService) ++ NS_INTERFACE_MAP_ENTRY(nsIAlertsService) ++NS_INTERFACE_MAP_END_THREADSAFE ++ ++nsSystemAlertsService::nsSystemAlertsService() ++{ ++} ++ ++nsSystemAlertsService::~nsSystemAlertsService() ++{} ++ ++nsresult ++nsSystemAlertsService::Init() ++{ ++ return NS_OK; ++} ++ ++NS_IMETHODIMP nsSystemAlertsService::ShowAlertNotification(const nsAString & aImageUrl, const nsAString & aAlertTitle, ++ const nsAString & aAlertText, bool aAlertTextClickable, ++ const nsAString & aAlertCookie, ++ nsIObserver * aAlertListener, ++ const nsAString & aAlertName, ++ const nsAString & aBidi, ++ const nsAString & aLang, ++ nsIPrincipal * aPrincipal) ++{ ++ nsRefPtr<nsAlertsIconListener> alertListener = new nsAlertsIconListener(); ++ if (!alertListener) ++ return NS_ERROR_OUT_OF_MEMORY; ++ ++ return alertListener->InitAlertAsync(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable, ++ aAlertCookie, aAlertListener); ++} ++ ++NS_IMETHODIMP nsSystemAlertsService::CloseAlert(const nsAString& aAlertName, ++ nsIPrincipal* aPrincipal) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} +diff --git toolkit/system/gnome/nsSystemAlertsService.h toolkit/system/gnome/nsSystemAlertsService.h +new file mode 100644 +index 0000000..b0bd625 +--- /dev/null ++++ mozilla/toolkit/system/gnome/nsSystemAlertsService.h +@@ -0,0 +1,27 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef nsSystemAlertsService_h__ ++#define nsSystemAlertsService_h__ ++ ++#include "nsIAlertsService.h" ++#include "nsCOMPtr.h" ++ ++class nsSystemAlertsService : public nsIAlertsService ++{ ++public: ++ NS_DECL_NSIALERTSSERVICE ++ NS_DECL_ISUPPORTS ++ ++ nsSystemAlertsService(); ++ ++ nsresult Init(); ++ ++protected: ++ virtual ~nsSystemAlertsService(); ++ ++}; ++ ++#endif /* nsSystemAlertsService_h__ */ |