diff options
-rw-r--r-- | revert-removal-of-native-notifications.patch | 273 | ||||
-rw-r--r-- | thunderbird.spec | 23 |
2 files changed, 292 insertions, 4 deletions
diff --git a/revert-removal-of-native-notifications.patch b/revert-removal-of-native-notifications.patch new file mode 100644 index 0000000..b7e1a1b --- /dev/null +++ b/revert-removal-of-native-notifications.patch @@ -0,0 +1,273 @@ +# HG changeset patch +# Parent 36da3cb921935478b6a37936b18b5c85a33d5617 +# User Chris Coulson <chris.coulson@canonical.com> + +diff --git a/mozilla/toolkit/system/gnome/moz.build b/mozilla/toolkit/system/gnome/moz.build +--- a/mozilla/toolkit/system/gnome/moz.build ++++ b/mozilla/toolkit/system/gnome/moz.build +@@ -3,16 +3,18 @@ + # 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/. + + MODULE = 'mozgnome' + + CPP_SOURCES += [ + 'nsGnomeModule.cpp', ++ 'nsSystemAlertsService.cpp', ++ 'nsAlertsIconListener.cpp' + ] + + if CONFIG['MOZ_ENABLE_GCONF']: + CPP_SOURCES += [ + 'nsGConfService.cpp', + ] + + if CONFIG['MOZ_ENABLE_GNOMEVFS']: +diff --git a/mozilla/toolkit/system/gnome/nsAlertsIconListener.h b/mozilla/toolkit/system/gnome/nsAlertsIconListener.h +new file mode 100644 +--- /dev/null ++++ b/mozilla/toolkit/system/gnome/nsAlertsIconListener.h +@@ -0,0 +1,88 @@ ++/* -*- 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(); ++ virtual ~nsAlertsIconListener(); ++ ++ nsresult InitAlertAsync(const nsAString & aImageUrl, ++ const nsAString & aAlertTitle, ++ const nsAString & aAlertText, ++ bool aAlertTextClickable, ++ const nsAString & aAlertCookie, ++ nsIObserver * aAlertListener); ++ ++ void SendCallback(); ++ void SendClosed(); ++ ++protected: ++ 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 a/mozilla/toolkit/system/gnome/nsGnomeModule.cpp b/mozilla/toolkit/system/gnome/nsGnomeModule.cpp +--- a/mozilla/toolkit/system/gnome/nsGnomeModule.cpp ++++ b/mozilla/toolkit/system/gnome/nsGnomeModule.cpp +@@ -17,53 +17,59 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGC + NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGnomeVFSService, Init) + #endif + #ifdef MOZ_ENABLE_GIO + #include "nsGIOService.h" + #include "nsGSettingsService.h" + 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); + #endif + #ifdef MOZ_ENABLE_GNOMEVFS + NS_DEFINE_NAMED_CID(NS_GNOMEVFSSERVICE_CID); + #endif + #ifdef MOZ_ENABLE_GIO + 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 + { &kNS_GCONFSERVICE_CID, false, NULL, nsGConfServiceConstructor }, + #endif + #ifdef MOZ_ENABLE_GNOMEVFS + { &kNS_GNOMEVFSSERVICE_CID, false, NULL, nsGnomeVFSServiceConstructor }, + #endif + #ifdef MOZ_ENABLE_GIO + { &kNS_GIOSERVICE_CID, false, NULL, nsGIOServiceConstructor }, + { &kNS_GSETTINGSSERVICE_CID, false, NULL, nsGSettingsServiceConstructor }, + #endif ++ { &kNS_SYSTEMALERTSSERVICE_CID, false, NULL, nsSystemAlertsServiceConstructor }, + { NULL } + }; + + static const mozilla::Module::ContractIDEntry kGnomeContracts[] = { + #ifdef MOZ_ENABLE_GCONF + { NS_GCONFSERVICE_CONTRACTID, &kNS_GCONFSERVICE_CID }, + #endif + #ifdef MOZ_ENABLE_GNOMEVFS + { NS_GNOMEVFSSERVICE_CONTRACTID, &kNS_GNOMEVFSSERVICE_CID }, + #endif + #ifdef MOZ_ENABLE_GIO + { NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID }, + { NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID }, + #endif ++ { NS_SYSTEMALERTSERVICE_CONTRACTID, &kNS_SYSTEMALERTSSERVICE_CID }, + { NULL } + }; + + static nsresult + InitGType () + { + g_type_init(); + return NS_OK; +diff --git a/mozilla/toolkit/system/gnome/nsSystemAlertsService.cpp b/mozilla/toolkit/system/gnome/nsSystemAlertsService.cpp +new file mode 100644 +--- /dev/null ++++ b/mozilla/toolkit/system/gnome/nsSystemAlertsService.cpp +@@ -0,0 +1,54 @@ ++/* -*- 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 "nsSystemAlertsService.h" ++#include "nsAlertsIconListener.h" ++#include "nsAutoPtr.h" ++ ++NS_IMPL_THREADSAFE_ADDREF(nsSystemAlertsService) ++NS_IMPL_THREADSAFE_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) ++{ ++ 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) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ +diff --git a/mozilla/toolkit/system/gnome/nsSystemAlertsService.h b/mozilla/toolkit/system/gnome/nsSystemAlertsService.h +new file mode 100644 +--- /dev/null ++++ b/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(); ++ virtual ~nsSystemAlertsService(); ++ ++ nsresult Init(); ++ ++protected: ++ ++}; ++ ++#endif /* nsSystemAlertsService_h__ */ diff --git a/thunderbird.spec b/thunderbird.spec index b7656ae..9e50928 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -33,9 +33,9 @@ %if %{?system_nss} # grep 'min_ns.*=[0-9]' configure -%global nspr_version 4.9.6 +%global nspr_version 4.10.2 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.15 +%global nss_version 3.15.2 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif %define cairo_version 1.10.0 @@ -68,14 +68,14 @@ Summary: Mozilla Thunderbird mail/newsgroup client Name: thunderbird -Version: 24.1.0 +Version: 24.2.0 Release: 1%{?dist} URL: http://www.mozilla.org/projects/thunderbird/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet Source0: ftp://ftp.mozilla.org/pub/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2 %if %{build_langpacks} -Source1: thunderbird-langpacks-%{version}-20131030.tar.xz +Source1: thunderbird-langpacks-%{version}-20131209.tar.xz %endif Source10: thunderbird-mozconfig Source11: thunderbird-mozconfig-branded @@ -100,6 +100,7 @@ Patch300: xulrunner-24.0-jemalloc-ppc.patch # Fedora specific patches Patch400: rhbz-966424.patch +Patch401: revert-removal-of-native-notifications.patch %if %{official_branding} # Required by Mozilla Corporation @@ -219,6 +220,11 @@ cd mozilla %patch104 -p1 -b .gcc47 %patch300 -p2 -b .852698 %patch400 -p1 -b .966424 + +%if 0%{?fedora} > 14 +# For Gnome Shell +%patch401 -p2 -b .notifications +%endif cd .. %patch200 -p1 -b .addons @@ -538,6 +544,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #=============================================================================== %changelog +* Wed Dec 11 2013 Remi Collet <RPMS@FamilleCollet.com> - 24.2.0-1 +- sync with rawhide, update to 24.2.0 + +* Wed Dec 11 2013 Martin Stransky <stransky@redhat.com> - 24.2.0-2 +- rhbz#1001998 - added a workaround for system notifications + +* Mon Dec 9 2013 Jan Horak <jhorak@redhat.com> - 24.2.0-1 +- Update to 24.2.0 + * Wed Oct 30 2013 Remi Collet <RPMS@FamilleCollet.com> - 24.1.0-1 - sync with rawhide, update to 24.1.0 - enable python27 and devtoolset-2 (gcc 4.8) for EL-6 |