Skip to content
Snippets Groups Projects
Verified Commit 14c9cdac authored by Robin Candau's avatar Robin Candau
Browse files

upgpkg: 3.20.0-6: Add a patch to remove the default limit of 20 notifications...

upgpkg: 3.20.0-6: Add a patch to remove the default limit of 20 notifications at a time + Switch license to SPDX identifier
Patch taken from the Gnome Flashback project to remove the default limit of 20 notifications at a time:
https://gitlab.gnome.org/GNOME/gnome-flashback/-/commit/40c5db2e6b343c5afad78034a2fa93b9b000ef11
See the following issue for more details:
https://gitlab.gnome.org/GNOME/gnome-flashback/-/issues/75
parent d9745773
No related branches found
Tags 3.20.0-6
No related merge requests found
.SRCINFO 0 → 100644
pkgbase = notification-daemon
pkgdesc = Server implementation of the freedesktop.org desktop notification specification
pkgver = 3.20.0
pkgrel = 6
url = https://wiki.gnome.org/Attic/NotificationDaemon
arch = x86_64
license = GPL-2.0-or-later
makedepends = intltool
depends = gtk3
source = https://download.gnome.org/sources/notification-daemon/3.20/notification-daemon-3.20.0.tar.xz
source = remove-notifications-limit.patch
sha256sums = dd13768f35fd8bba9c4920b0f8269f39270e5a3cfed1a34c3b940a492286ece5
sha256sums = 9acb71933441e54b16ca9a69a10ab3c2edbeb75b94dc637e8039e3fb2fe513bd
pkgname = notification-daemon
......@@ -4,30 +4,41 @@
pkgname=notification-daemon
pkgver=3.20.0
pkgrel=5
pkgrel=6
pkgdesc="Server implementation of the freedesktop.org desktop notification specification"
arch=(x86_64)
license=(GPL2)
license=(GPL-2.0-or-later)
url="https://wiki.gnome.org/Attic/NotificationDaemon"
depends=(gtk3)
makedepends=(intltool)
source=("https://download.gnome.org/sources/${pkgname}/${pkgver:0:4}/${pkgname}-${pkgver}.tar.xz")
sha256sums=('dd13768f35fd8bba9c4920b0f8269f39270e5a3cfed1a34c3b940a492286ece5')
source=("https://download.gnome.org/sources/${pkgname}/${pkgver:0:4}/${pkgname}-${pkgver}.tar.xz"
remove-notifications-limit.patch)
sha256sums=('dd13768f35fd8bba9c4920b0f8269f39270e5a3cfed1a34c3b940a492286ece5'
'9acb71933441e54b16ca9a69a10ab3c2edbeb75b94dc637e8039e3fb2fe513bd')
prepare() {
cd "${pkgname}-${pkgver}"
# Patch taken from the Gnome Flashback project to remove the default limit of 20 notifications at a time:
# https://gitlab.gnome.org/GNOME/gnome-flashback/-/commit/40c5db2e6b343c5afad78034a2fa93b9b000ef11
# See the following issue for more details:
# https://gitlab.gnome.org/GNOME/gnome-flashback/-/issues/75
patch -Np1 <${srcdir}/remove-notifications-limit.patch
}
build() {
cd "${pkgname}-${pkgver}"
./configure --prefix=/usr --sysconfdir=/etc \
--libexecdir=/usr/lib/notification-daemon-1.0 \
--localstatedir=/var --disable-static
make
cd "${pkgname}-${pkgver}"
./configure --prefix=/usr --sysconfdir=/etc \
--libexecdir=/usr/lib/notification-daemon-1.0 \
--localstatedir=/var --disable-static
make
}
check() {
cd "${pkgname}-${pkgver}"
make check
cd "${pkgname}-${pkgver}"
make check
}
package() {
cd "${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
cd "${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
}
diff --git a/src/nd-daemon.c b/src/nd-daemon.c
index 943e48a..5724405 100644
--- a/src/nd-daemon.c
+++ b/src/nd-daemon.c
@@ -36,8 +36,6 @@
#define INFO_VERSION PACKAGE_VERSION
#define INFO_SPEC_VERSION "1.2"
-#define MAX_NOTIFICATIONS 20
-
struct _NdDaemon
{
GObject parent;
@@ -180,24 +178,11 @@ handle_notify_cb (NdFdNotifications *object,
gpointer user_data)
{
NdDaemon *daemon;
- const gchar *error_name;
- const gchar *error_message;
NdNotification *notification;
gint new_id;
daemon = ND_DAEMON (user_data);
- if (nd_queue_length (daemon->queue) > MAX_NOTIFICATIONS)
- {
- error_name = "org.freedesktop.Notifications.MaxNotificationsExceeded";
- error_message = _("Exceeded maximum number of notifications");
-
- g_dbus_method_invocation_return_dbus_error (invocation, error_name,
- error_message);
-
- return TRUE;
- }
-
if (replaces_id > 0)
{
notification = nd_queue_lookup (daemon->queue, replaces_id);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment