Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-extra/gnome-shell-extension-gsconnect/, ...
Date: Sat, 14 Dec 2019 23:05:24
Message-Id: 1576364712.ae88f9598d5c2932409b258dbfed50ac6d82a7d5.pacho@gentoo
1 commit: ae88f9598d5c2932409b258dbfed50ac6d82a7d5
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 14 22:30:37 2019 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 14 23:05:12 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae88f959
7
8 gnome-extra/gnome-shell-extension-gsconnect: Fix some notifications (like WhatsApp ones)
9
10 Package-Manager: Portage-2.3.80, Repoman-2.3.19
11 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
12
13 ...-shell-extension-gsconnect-28-silent-flag.patch | 39 ++++++++++++
14 .../gnome-shell-extension-gsconnect-28-r1.ebuild | 70 ++++++++++++++++++++++
15 2 files changed, 109 insertions(+)
16
17 diff --git a/gnome-extra/gnome-shell-extension-gsconnect/files/gnome-shell-extension-gsconnect-28-silent-flag.patch b/gnome-extra/gnome-shell-extension-gsconnect/files/gnome-shell-extension-gsconnect-28-silent-flag.patch
18 new file mode 100644
19 index 00000000000..444642ee3c7
20 --- /dev/null
21 +++ b/gnome-extra/gnome-shell-extension-gsconnect/files/gnome-shell-extension-gsconnect-28-silent-flag.patch
22 @@ -0,0 +1,39 @@
23 +From 1811528ca72a2b83924bc717c424f1301bf17c30 Mon Sep 17 00:00:00 2001
24 +From: Andy Holmes <andrew.g.r.holmes@×××××.com>
25 +Date: Sun, 1 Dec 2019 16:39:41 -0800
26 +Subject: [PATCH] Notification Plugin: ignore the `silent` flag entirely
27 +
28 +Upstream kdeconnect-android is tagging many notifications as `silent`,
29 +causing them to never be shown. Since we already handle duplicates in
30 +the Shell, we ignore that flag for now.
31 +
32 +closes #720
33 +---
34 + src/service/plugins/notification.js | 8 ++++----
35 + 1 file changed, 4 insertions(+), 4 deletions(-)
36 +
37 +diff --git a/src/service/plugins/notification.js b/src/service/plugins/notification.js
38 +index b31a828ba..45ed2050c 100644
39 +--- a/src/service/plugins/notification.js
40 ++++ b/src/service/plugins/notification.js
41 +@@ -135,16 +135,16 @@ var Plugin = GObject.registerClass({
42 +
43 + /**
44 + * Handle an incoming notification or closed report.
45 ++ *
46 ++ * FIXME: upstream kdeconnect-android is tagging many notifications as
47 ++ * `silent`, causing them to never be shown. Since we already handle
48 ++ * duplicates in the Shell, we ignore that flag for now.
49 + */
50 + _handleNotification(packet) {
51 + // A report that a remote notification has been dismissed
52 + if (packet.body.hasOwnProperty('isCancel')) {
53 + this.device.hideNotification(packet.body.id);
54 +
55 +- // A silent notification; silence it by aborting the icon transfer
56 +- } else if (packet.body.hasOwnProperty('silent') && packet.body.silent) {
57 +- this.device.rejectTransfer(packet);
58 +-
59 + // A normal, remote notification
60 + } else {
61 + this.receiveNotification(packet);
62
63 diff --git a/gnome-extra/gnome-shell-extension-gsconnect/gnome-shell-extension-gsconnect-28-r1.ebuild b/gnome-extra/gnome-shell-extension-gsconnect/gnome-shell-extension-gsconnect-28-r1.ebuild
64 new file mode 100644
65 index 00000000000..6b7eee3c579
66 --- /dev/null
67 +++ b/gnome-extra/gnome-shell-extension-gsconnect/gnome-shell-extension-gsconnect-28-r1.ebuild
68 @@ -0,0 +1,70 @@
69 +# Copyright 1999-2019 Gentoo Authors
70 +# Distributed under the terms of the GNU General Public License v2
71 +
72 +EAPI=7
73 +inherit gnome2-utils meson readme.gentoo-r1
74 +
75 +DESCRIPTION="KDE Connect implementation for Gnome Shell"
76 +HOMEPAGE="https://github.com/andyholmes/gnome-shell-extension-gsconnect"
77 +SRC_URI="https://github.com/andyholmes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
78 +
79 +LICENSE="GPL-2+"
80 +SLOT="0"
81 +KEYWORDS="~amd64 ~x86"
82 +IUSE="nautilus"
83 +
84 +COMMON_DEPEND="dev-libs/glib:2"
85 +RDEPEND="${COMMON_DEPEND}
86 + app-eselect/eselect-gnome-shell-extensions
87 + >=dev-libs/gjs-1.48
88 + >=gnome-base/gnome-shell-3.28
89 + gnome-base/gvfs
90 + || ( ( net-libs/gnome-online-accounts dev-libs/libgdata ) dev-libs/folks )
91 + || ( media-libs/libcanberra media-libs/gsound )
92 + nautilus? (
93 + dev-python/nautilus-python
94 + gnome-base/nautilus[introspection] )
95 +"
96 +DEPEND="${COMMON_DEPEND}"
97 +BDEPEND="
98 + >=dev-util/meson-0.49.0
99 + virtual/pkgconfig
100 +"
101 +
102 +DISABLE_AUTOFORMATTING="yes"
103 +DOC_CONTENTS="For knowing more about how to do the setup, please visit:
104 +https://github.com/andyholmes/gnome-shell-extension-gsconnect/wiki/Installation"
105 +
106 +PATCHES=(
107 + # Fix WhastApp notifications, https://github.com/andyholmes/gnome-shell-extension-gsconnect/issues/720
108 + "${FILESDIR}/${P}-silent-flag.patch"
109 +)
110 +
111 +src_configure() {
112 + # nemo support relies on nemo-python from https://github.com/linuxmint/nemo-extensions
113 + # https://bugs.gentoo.org/694388
114 + meson_src_configure \
115 + -Dnemo=false \
116 + $(meson_use nautilus)
117 +}
118 +
119 +src_install() {
120 + meson_src_install
121 + readme.gentoo_create_doc
122 +}
123 +
124 +pkg_preinst() {
125 + gnome2_schemas_savelist
126 +}
127 +
128 +pkg_postinst() {
129 + gnome2_schemas_update
130 + ebegin "Updating list of installed extensions"
131 + eselect gnome-shell-extensions update
132 + eend $?
133 + readme.gentoo_print_elog
134 +}
135 +
136 +pkg_postrm() {
137 + gnome2_schemas_update
138 +}