Backport a patch to fix notification withdrawing in gnome-software

This commit is contained in:
Kalev Lember 2015-06-24 11:15:08 +02:00
parent 37425187a1
commit 33edb32972
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From c612fcab0fb2d3f0bdaf011d5b566dc949dbd18a Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
Date: Mon, 22 Jun 2015 19:56:38 +0200
Subject: [PATCH] gapplication: Initialize backend before withdrawing
notifications
Make sure to initialize the notification backend in
g_application_withdraw_notification() the same way as is done in
g_application_send_notification().
This makes it possible for an app to withdraw notifications it has sent
in a previous execution of the application.
https://bugzilla.gnome.org/show_bug.cgi?id=750625
---
gio/gapplication.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gio/gapplication.c b/gio/gapplication.c
index be7127a..37a8258 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -2715,8 +2715,10 @@ g_application_withdraw_notification (GApplication *application,
g_return_if_fail (G_IS_APPLICATION (application));
g_return_if_fail (id != NULL);
- if (application->priv->notifications)
- g_notification_backend_withdraw_notification (application->priv->notifications, id);
+ if (application->priv->notifications == NULL)
+ application->priv->notifications = g_notification_backend_new_default (application);
+
+ g_notification_backend_withdraw_notification (application->priv->notifications, id);
}
/* Busy binding {{{1 */
--
2.4.3

View File

@ -3,12 +3,14 @@
Summary: A library of handy utility functions
Name: glib2
Version: 2.45.3
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
#VCS: git:git://git.gnome.org/glib
Source: http://download.gnome.org/sources/glib/2.45/glib-%{version}.tar.xz
# Backported from upstream
Patch0: 0001-gapplication-Initialize-backend-before-withdrawing-n.patch
BuildRequires: pkgconfig
BuildRequires: gettext
@ -81,6 +83,7 @@ the functionality of the installed glib2 package.
%prep
%setup -q -n glib-%{version}
%patch0 -p1
%build
# Support builds of both git snapshots and tarballs packed with autogoo
@ -218,6 +221,9 @@ gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules
%{_datadir}/installed-tests
%changelog
* Wed Jun 24 2015 Kalev Lember <klember@redhat.com> - 2.45.3-2
- Backport a patch to fix notification withdrawing in gnome-software
* Wed Jun 24 2015 David King <amigadave@amigadave.com> - 2.45.3-1
- Update to 2.45.3