Accepting request 128442 from home:badshah400:branches:GNOME:Factory
Add gnome-shell-chat-notifications-fix.patch to fix several issues with chat notifications in gnome-shell including a regression introduced in the 3.4.x series [bgo#677457, bgo#676175, bgo#675370]; all patches came from upstream git commits. Needed for openSUSE 12.2. OBS-URL: https://build.opensuse.org/request/show/128442 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=118
This commit is contained in:
parent
d8671fa7c7
commit
948aece1d5
178
gnome-shell-chat-notifications-fix.patch
Normal file
178
gnome-shell-chat-notifications-fix.patch
Normal file
@ -0,0 +1,178 @@
|
||||
From 406db1902c7d32da8b9bfb50dd7779071d571e4f Mon Sep 17 00:00:00 2001
|
||||
From: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
||||
Date: Thu, 31 May 2012 09:28:41 +0000
|
||||
Subject: notificationDaemon.js: convert the hints dict at the beginning of the function
|
||||
|
||||
It's used right away to discard some Empathy notifications.
|
||||
|
||||
This regression has been introduced during the 3.4 cycle when 'hints' has been
|
||||
turned to a GVariant.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=675370
|
||||
---
|
||||
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
|
||||
index f474fbe..c6a941f 100644
|
||||
--- a/js/ui/notificationDaemon.js
|
||||
+++ b/js/ui/notificationDaemon.js
|
||||
@@ -221,6 +221,13 @@ const NotificationDaemon = new Lang.Class({
|
||||
let [appName, replacesId, icon, summary, body, actions, hints, timeout] = params;
|
||||
let id;
|
||||
|
||||
+ for (let hint in hints) {
|
||||
+ // unpack the variants
|
||||
+ hints[hint] = hints[hint].deep_unpack();
|
||||
+ }
|
||||
+
|
||||
+ hints = Params.parse(hints, { urgency: Urgency.NORMAL }, true);
|
||||
+
|
||||
// Filter out chat, presence, calls and invitation notifications from
|
||||
// Empathy, since we handle that information from telepathyClient.js
|
||||
if (appName == 'Empathy' && (hints['category'] == 'im.received' ||
|
||||
@@ -249,13 +256,6 @@ const NotificationDaemon = new Lang.Class({
|
||||
}
|
||||
}
|
||||
|
||||
- for (let hint in hints) {
|
||||
- // unpack the variants
|
||||
- hints[hint] = hints[hint].deep_unpack();
|
||||
- }
|
||||
-
|
||||
- hints = Params.parse(hints, { urgency: Urgency.NORMAL }, true);
|
||||
-
|
||||
// Be compatible with the various hints for image data and image path
|
||||
// 'image-data' and 'image-path' are the latest name of these hints, introduced in 1.2
|
||||
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
|
||||
From 69a63f208e7070111d6436d4b2fa87053ae5ca8f Mon Sep 17 00:00:00 2001
|
||||
From: Jasper St. Pierre <jstpierre@mecheye.net>
|
||||
Date: Wed, 16 May 2012 15:28:05 +0000
|
||||
Subject: notificationDaemon: Fix copy-paste typo
|
||||
|
||||
Since this line was introduced in 7458d3e, "Approve file transfer channels",
|
||||
it's quite obvious that the line was meant to filter out transfer channel
|
||||
notifications.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=676175
|
||||
---
|
||||
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
|
||||
index c6a941f..4a413ce 100644
|
||||
--- a/js/ui/notificationDaemon.js
|
||||
+++ b/js/ui/notificationDaemon.js
|
||||
@@ -233,7 +233,7 @@ const NotificationDaemon = new Lang.Class({
|
||||
if (appName == 'Empathy' && (hints['category'] == 'im.received' ||
|
||||
hints['category'] == 'x-empathy.im.room-invitation' ||
|
||||
hints['category'] == 'x-empathy.call.incoming' ||
|
||||
- hints['category'] == 'x-empathy.call.incoming"' ||
|
||||
+ hints['category'] == 'x-empathy.transfer.incoming' ||
|
||||
hints['category'] == 'x-empathy.im.subscription-request' ||
|
||||
hints['category'] == 'presence.online' ||
|
||||
hints['category'] == 'presence.offline')) {
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
|
||||
From 42366ab02590d7a572b7366407a18386e7b8f7a0 Mon Sep 17 00:00:00 2001
|
||||
From: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
||||
Date: Tue, 05 Jun 2012 10:37:06 +0000
|
||||
Subject: telepathyClient: decline dispatch op when approving unsupported channel type
|
||||
|
||||
It shouldn't happen in theory but best to be safe than sorry.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=677457
|
||||
---
|
||||
diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js
|
||||
index b705c7a..45638c6 100644
|
||||
--- a/js/ui/telepathyClient.js
|
||||
+++ b/js/ui/telepathyClient.js
|
||||
@@ -237,6 +237,8 @@ const Client = new Lang.Class({
|
||||
this._approveCall(account, conn, channel, dispatchOp, context);
|
||||
else if (chanType == Tp.IFACE_CHANNEL_TYPE_FILE_TRANSFER)
|
||||
this._approveFileTransfer(account, conn, channel, dispatchOp, context);
|
||||
+ else
|
||||
+ Shell.decline_dispatch_op(context, 'Unsupported channel type');
|
||||
},
|
||||
|
||||
_approveTextChannel: function(account, conn, channel, dispatchOp, context) {
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
|
||||
From 7e73a52505a4859a8146d7940e77659b874a2f45 Mon Sep 17 00:00:00 2001
|
||||
From: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
||||
Date: Tue, 05 Jun 2012 10:39:30 +0000
|
||||
Subject: telepathyClient: ignore invalidated channels
|
||||
|
||||
There is a race if a channel is invalidated during its preparation: the
|
||||
'invalidated' signal is already emitted so the Shell will never notice.
|
||||
We fix this by simply checking if the channel is already invalidated when
|
||||
receiving it from telepathy-glib.
|
||||
|
||||
In the approving case, we reject the full ChannelDispatchOperation as we only
|
||||
support approving one channel at the time.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=677457
|
||||
---
|
||||
diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js
|
||||
index 45638c6..231c52c 100644
|
||||
--- a/js/ui/telepathyClient.js
|
||||
+++ b/js/ui/telepathyClient.js
|
||||
@@ -132,6 +132,9 @@ const Client = new Lang.Class({
|
||||
let channel = channels[i];
|
||||
let [targetHandle, targetHandleType] = channel.get_handle();
|
||||
|
||||
+ if (Shell.is_channel_invalidated(channel))
|
||||
+ continue;
|
||||
+
|
||||
/* Only observe contact text channels */
|
||||
if ((!(channel instanceof Tp.TextChannel)) ||
|
||||
targetHandleType != Tp.HandleType.CONTACT)
|
||||
@@ -181,6 +184,9 @@ const Client = new Lang.Class({
|
||||
continue;
|
||||
}
|
||||
|
||||
+ if (Shell.is_channel_invalidated(channel))
|
||||
+ continue;
|
||||
+
|
||||
// 'notify' will be true when coming from an actual HandleChannels
|
||||
// call, and not when from a successful Claim call. The point is
|
||||
// we don't want to notify for a channel we just claimed which
|
||||
@@ -231,6 +237,11 @@ const Client = new Lang.Class({
|
||||
let channel = channels[0];
|
||||
let chanType = channel.get_channel_type();
|
||||
|
||||
+ if (Shell.is_channel_invalidated(channel)) {
|
||||
+ Shell.decline_dispatch_op(context, 'Channel is invalidated');
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if (chanType == Tp.IFACE_CHANNEL_TYPE_TEXT)
|
||||
this._approveTextChannel(account, conn, channel, dispatchOp, context);
|
||||
else if (chanType == Tp.IFACE_CHANNEL_TYPE_CALL)
|
||||
diff --git a/src/shell-tp-client.c b/src/shell-tp-client.c
|
||||
index d64129e..8a20e68 100644
|
||||
--- a/src/shell-tp-client.c
|
||||
+++ b/src/shell-tp-client.c
|
||||
@@ -369,3 +369,9 @@ shell_decline_dispatch_op (TpAddDispatchOperationContext *context,
|
||||
tp_add_dispatch_operation_context_fail (context, error);
|
||||
g_error_free (error);
|
||||
}
|
||||
+
|
||||
+/* gjs doesn't cope with tp_proxy_get_invalidated() returning a GError */
|
||||
+gboolean shell_is_channel_invalidated (TpChannel *channel)
|
||||
+{
|
||||
+ return tp_proxy_get_invalidated (channel) != NULL;
|
||||
+}
|
||||
diff --git a/src/shell-tp-client.h b/src/shell-tp-client.h
|
||||
index 82094a0..e2045f3 100644
|
||||
--- a/src/shell-tp-client.h
|
||||
+++ b/src/shell-tp-client.h
|
||||
@@ -112,5 +112,7 @@ void shell_get_contact_events (TplLogManager *log_manager,
|
||||
void shell_decline_dispatch_op (TpAddDispatchOperationContext *context,
|
||||
const gchar *message);
|
||||
|
||||
+gboolean shell_is_channel_invalidated (TpChannel *channel);
|
||||
+
|
||||
G_END_DECLS
|
||||
#endif /* __SHELL_TP_CLIENT_H__ */
|
||||
--
|
||||
cgit v0.9.0.2
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 19 17:53:07 UTC 2012 - badshah400@gmail.com
|
||||
|
||||
- Add gnome-shell-chat-notifications-fix.patch to fix several
|
||||
issues with chat notifications in gnome-shell including a
|
||||
regression introduced in the 3.4.x series [bgo#677457,
|
||||
bgo#676175, bgo#675370]; all patches came from upstream git
|
||||
commits.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 14 07:44:17 UTC 2012 - badshah400@gmail.com
|
||||
|
||||
|
@ -30,6 +30,8 @@ Patch0: gnome-shell-load-ext.patch
|
||||
Patch1: gnome-shell-private-connection.patch
|
||||
# PATCH-FIX-UPSTREAM gnome-shell-fix-memory-leaks.patch bnc#771565 bgo#678079 bgo#678406 badshah400@gmail.com -- Fix several memory leaks in gnome-shell; all patches came from upstream git
|
||||
Patch2: gnome-shell-fix-memory-leaks.patch
|
||||
# PATCH-FIX-UPSTREAM gnome-shell-chat-notifications-fix.patch bgo#675370 bgo#676175 bgo#677457 badshah400@gmail.com -- Fix several problems with chat notifications in gnome-shell including a regression introduced in the 3.4.x series; all patches came from upstream git
|
||||
Patch3: gnome-shell-chat-notifications-fix.patch
|
||||
# Needed by patch0
|
||||
BuildRequires: gnome-common
|
||||
BuildRequires: intltool
|
||||
@ -135,6 +137,7 @@ to enable, disable and install them.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
translation-update-upstream
|
||||
|
||||
%build
|
||||
|
Loading…
x
Reference in New Issue
Block a user