1 |
commit: a8ed912e69534cfc85801b6188bfecbb2ad29f4a |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 16 08:01:21 2021 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 16 08:01:21 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8ed912e |
7 |
|
8 |
gnome-extra/gnome-shell-extensions: Fix drive-menu hiding |
9 |
|
10 |
Apply upstream fixes to properly hide remote filesystems |
11 |
|
12 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
13 |
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org> |
14 |
|
15 |
.../files/40.3-drive-menu-hide-items.patch | 43 +++++++++++++ |
16 |
.../40.3-drive-menu-indicator-visibility.patch | 32 ++++++++++ |
17 |
.../gnome-shell-extensions-40.3-r1.ebuild | 72 ++++++++++++++++++++++ |
18 |
3 files changed, 147 insertions(+) |
19 |
|
20 |
diff --git a/gnome-extra/gnome-shell-extensions/files/40.3-drive-menu-hide-items.patch b/gnome-extra/gnome-shell-extensions/files/40.3-drive-menu-hide-items.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..c69dd5fd357 |
23 |
--- /dev/null |
24 |
+++ b/gnome-extra/gnome-shell-extensions/files/40.3-drive-menu-hide-items.patch |
25 |
@@ -0,0 +1,43 @@ |
26 |
+From d421bbfa609426032f07f27934eefb214d59012f Mon Sep 17 00:00:00 2001 |
27 |
+From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@×××××.org> |
28 |
+Date: Tue, 13 Jul 2021 11:54:21 +0200 |
29 |
+Subject: [PATCH] drive-menu: Hide items initially |
30 |
+ |
31 |
+Now that the check for network mounts is non-blocking, the initial |
32 |
+sync doesn't take effect immediately. We don't want hidden items |
33 |
+to briefly flash the indicator, so create them initially hidden. |
34 |
+ |
35 |
+Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/176> |
36 |
+--- |
37 |
+ extensions/drive-menu/extension.js | 8 ++++---- |
38 |
+ 1 file changed, 4 insertions(+), 4 deletions(-) |
39 |
+ |
40 |
+diff --git a/extensions/drive-menu/extension.js b/extensions/drive-menu/extension.js |
41 |
+index 6c6fd76..f60dab7 100644 |
42 |
+--- a/extensions/drive-menu/extension.js |
43 |
++++ b/extensions/drive-menu/extension.js |
44 |
+@@ -41,6 +41,8 @@ class MountMenuItem extends PopupMenu.PopupBaseMenuItem { |
45 |
+ ejectButton.connect('clicked', this._eject.bind(this)); |
46 |
+ this.add(ejectButton); |
47 |
+ |
48 |
++ this.hide(); |
49 |
++ |
50 |
+ this._changedId = mount.connect('changed', this._syncVisibility.bind(this)); |
51 |
+ this._syncVisibility(); |
52 |
+ } |
53 |
+@@ -155,10 +157,8 @@ class DriveMenu extends PanelMenu.Button { |
54 |
+ this.add_child(icon); |
55 |
+ |
56 |
+ this._monitor = Gio.VolumeMonitor.get(); |
57 |
+- this._addedId = this._monitor.connect('mount-added', (monitor, mount) => { |
58 |
+- this._addMount(mount); |
59 |
+- this._updateMenuVisibility(); |
60 |
+- }); |
61 |
++ this._addedId = this._monitor.connect('mount-added', |
62 |
++ (monitor, mount) => this._addMount(mount)); |
63 |
+ this._removedId = this._monitor.connect('mount-removed', (monitor, mount) => { |
64 |
+ this._removeMount(mount); |
65 |
+ this._updateMenuVisibility(); |
66 |
+-- |
67 |
+GitLab |
68 |
+ |
69 |
|
70 |
diff --git a/gnome-extra/gnome-shell-extensions/files/40.3-drive-menu-indicator-visibility.patch b/gnome-extra/gnome-shell-extensions/files/40.3-drive-menu-indicator-visibility.patch |
71 |
new file mode 100644 |
72 |
index 00000000000..f76335d4596 |
73 |
--- /dev/null |
74 |
+++ b/gnome-extra/gnome-shell-extensions/files/40.3-drive-menu-indicator-visibility.patch |
75 |
@@ -0,0 +1,32 @@ |
76 |
+From 3539ce113907ffda813e1a990891b0911c9702ef Mon Sep 17 00:00:00 2001 |
77 |
+From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@×××××.org> |
78 |
+Date: Tue, 13 Jul 2021 11:40:31 +0200 |
79 |
+Subject: [PATCH] drive-menu: Fix indicator visibility |
80 |
+ |
81 |
+Commit 519269be9d made the check for network mounts non-blocking, and |
82 |
+we now update the indicator's visibility before a newly-added network |
83 |
+mount is hidden. |
84 |
+ |
85 |
+Address this by monitoring the item itself for visibility changes. |
86 |
+ |
87 |
+Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/176> |
88 |
+--- |
89 |
+ extensions/drive-menu/extension.js | 2 ++ |
90 |
+ 1 file changed, 2 insertions(+) |
91 |
+ |
92 |
+diff --git a/extensions/drive-menu/extension.js b/extensions/drive-menu/extension.js |
93 |
+index 3fac236..6c6fd76 100644 |
94 |
+--- a/extensions/drive-menu/extension.js |
95 |
++++ b/extensions/drive-menu/extension.js |
96 |
+@@ -189,6 +189,8 @@ class DriveMenu extends PanelMenu.Button { |
97 |
+ let item = new MountMenuItem(mount); |
98 |
+ this._mounts.unshift(item); |
99 |
+ this.menu.addMenuItem(item, 0); |
100 |
++ |
101 |
++ item.connect('notify::visible', () => this._updateMenuVisibility()); |
102 |
+ } |
103 |
+ |
104 |
+ _removeMount(mount) { |
105 |
+-- |
106 |
+GitLab |
107 |
+ |
108 |
|
109 |
diff --git a/gnome-extra/gnome-shell-extensions/gnome-shell-extensions-40.3-r1.ebuild b/gnome-extra/gnome-shell-extensions/gnome-shell-extensions-40.3-r1.ebuild |
110 |
new file mode 100644 |
111 |
index 00000000000..f879892a324 |
112 |
--- /dev/null |
113 |
+++ b/gnome-extra/gnome-shell-extensions/gnome-shell-extensions-40.3-r1.ebuild |
114 |
@@ -0,0 +1,72 @@ |
115 |
+# Copyright 1999-2021 Gentoo Authors |
116 |
+# Distributed under the terms of the GNU General Public License v2 |
117 |
+ |
118 |
+EAPI=7 |
119 |
+inherit gnome.org readme.gentoo-r1 meson xdg |
120 |
+ |
121 |
+DESCRIPTION="JavaScript extensions for GNOME Shell" |
122 |
+HOMEPAGE="https://wiki.gnome.org/Projects/GnomeShell/Extensions" |
123 |
+ |
124 |
+LICENSE="GPL-2+" |
125 |
+SLOT="0" |
126 |
+KEYWORDS="~amd64 ~ppc64 ~x86" |
127 |
+ |
128 |
+DEPEND=" |
129 |
+ >=dev-libs/glib-2.26:2 |
130 |
+ >=gnome-base/libgtop-2.28.3[introspection] |
131 |
+ >=app-eselect/eselect-gnome-shell-extensions-20111211 |
132 |
+" |
133 |
+RDEPEND="${DEPEND} |
134 |
+ >=dev-libs/gjs-1.29 |
135 |
+ dev-libs/gobject-introspection:= |
136 |
+ dev-libs/atk[introspection] |
137 |
+ gnome-base/gnome-menus:3[introspection] |
138 |
+ =gnome-base/gnome-shell-$(ver_cut 1-2)* |
139 |
+ media-libs/clutter:1.0[introspection] |
140 |
+ net-libs/telepathy-glib[introspection] |
141 |
+ x11-libs/gdk-pixbuf:2[introspection] |
142 |
+ x11-libs/gtk+:3[introspection] |
143 |
+ x11-libs/pango[introspection] |
144 |
+ x11-themes/adwaita-icon-theme |
145 |
+ >=x11-wm/mutter-3.32[introspection] |
146 |
+" |
147 |
+BDEPEND=" |
148 |
+ >=sys-devel/gettext-0.19.8 |
149 |
+ virtual/pkgconfig |
150 |
+" |
151 |
+ |
152 |
+DISABLE_AUTOFORMATTING="yes" |
153 |
+DOC_CONTENTS="Installed extensions installed are initially disabled by default. |
154 |
+To change the system default and enable some extensions, you can use |
155 |
+# eselect gnome-shell-extensions |
156 |
+ |
157 |
+Alternatively, to enable/disable extensions on a per-user basis, |
158 |
+you can use the https://extensions.gnome.org/ web interface, the |
159 |
+gnome-extra/gnome-tweaks GUI, or modify the org.gnome.shell |
160 |
+enabled-extensions gsettings key from the command line or a script." |
161 |
+ |
162 |
+PATCHES=( |
163 |
+ "${FILESDIR}/${PV}-drive-menu-indicator-visibility.patch" |
164 |
+ "${FILESDIR}/${PV}-drive-menu-hide-items.patch" |
165 |
+) |
166 |
+ |
167 |
+src_configure() { |
168 |
+ meson_src_configure \ |
169 |
+ -Dextension_set=all \ |
170 |
+ -Dclassic_mode=true |
171 |
+} |
172 |
+ |
173 |
+src_install() { |
174 |
+ meson_src_install |
175 |
+ readme.gentoo_create_doc |
176 |
+} |
177 |
+ |
178 |
+pkg_postinst() { |
179 |
+ xdg_pkg_postinst |
180 |
+ |
181 |
+ ebegin "Updating list of installed extensions" |
182 |
+ eselect gnome-shell-extensions update |
183 |
+ eend $? |
184 |
+ |
185 |
+ readme.gentoo_print_elog |
186 |
+} |