diff options
author | Pacho Ramos <pacho@gentoo.org> | 2021-07-16 10:01:21 +0200 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2021-07-16 10:01:21 +0200 |
commit | a8ed912e69534cfc85801b6188bfecbb2ad29f4a (patch) | |
tree | d05eff808efee811bd3e8c8e4a10af171eea6499 | |
parent | dev-python/python-podman: Add test-dep on requests-mock (diff) | |
download | gentoo-a8ed912e69534cfc85801b6188bfecbb2ad29f4a.tar.gz gentoo-a8ed912e69534cfc85801b6188bfecbb2ad29f4a.tar.bz2 gentoo-a8ed912e69534cfc85801b6188bfecbb2ad29f4a.zip |
gnome-extra/gnome-shell-extensions: Fix drive-menu hiding
Apply upstream fixes to properly hide remote filesystems
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
3 files changed, 147 insertions, 0 deletions
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 new file mode 100644 index 000000000000..c69dd5fd3577 --- /dev/null +++ b/gnome-extra/gnome-shell-extensions/files/40.3-drive-menu-hide-items.patch @@ -0,0 +1,43 @@ +From d421bbfa609426032f07f27934eefb214d59012f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> +Date: Tue, 13 Jul 2021 11:54:21 +0200 +Subject: [PATCH] drive-menu: Hide items initially + +Now that the check for network mounts is non-blocking, the initial +sync doesn't take effect immediately. We don't want hidden items +to briefly flash the indicator, so create them initially hidden. + +Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/176> +--- + extensions/drive-menu/extension.js | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/extensions/drive-menu/extension.js b/extensions/drive-menu/extension.js +index 6c6fd76..f60dab7 100644 +--- a/extensions/drive-menu/extension.js ++++ b/extensions/drive-menu/extension.js +@@ -41,6 +41,8 @@ class MountMenuItem extends PopupMenu.PopupBaseMenuItem { + ejectButton.connect('clicked', this._eject.bind(this)); + this.add(ejectButton); + ++ this.hide(); ++ + this._changedId = mount.connect('changed', this._syncVisibility.bind(this)); + this._syncVisibility(); + } +@@ -155,10 +157,8 @@ class DriveMenu extends PanelMenu.Button { + this.add_child(icon); + + this._monitor = Gio.VolumeMonitor.get(); +- this._addedId = this._monitor.connect('mount-added', (monitor, mount) => { +- this._addMount(mount); +- this._updateMenuVisibility(); +- }); ++ this._addedId = this._monitor.connect('mount-added', ++ (monitor, mount) => this._addMount(mount)); + this._removedId = this._monitor.connect('mount-removed', (monitor, mount) => { + this._removeMount(mount); + this._updateMenuVisibility(); +-- +GitLab + 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 new file mode 100644 index 000000000000..f76335d4596e --- /dev/null +++ b/gnome-extra/gnome-shell-extensions/files/40.3-drive-menu-indicator-visibility.patch @@ -0,0 +1,32 @@ +From 3539ce113907ffda813e1a990891b0911c9702ef Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> +Date: Tue, 13 Jul 2021 11:40:31 +0200 +Subject: [PATCH] drive-menu: Fix indicator visibility + +Commit 519269be9d made the check for network mounts non-blocking, and +we now update the indicator's visibility before a newly-added network +mount is hidden. + +Address this by monitoring the item itself for visibility changes. + +Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/176> +--- + extensions/drive-menu/extension.js | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/extensions/drive-menu/extension.js b/extensions/drive-menu/extension.js +index 3fac236..6c6fd76 100644 +--- a/extensions/drive-menu/extension.js ++++ b/extensions/drive-menu/extension.js +@@ -189,6 +189,8 @@ class DriveMenu extends PanelMenu.Button { + let item = new MountMenuItem(mount); + this._mounts.unshift(item); + this.menu.addMenuItem(item, 0); ++ ++ item.connect('notify::visible', () => this._updateMenuVisibility()); + } + + _removeMount(mount) { +-- +GitLab + 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 new file mode 100644 index 000000000000..f879892a324f --- /dev/null +++ b/gnome-extra/gnome-shell-extensions/gnome-shell-extensions-40.3-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit gnome.org readme.gentoo-r1 meson xdg + +DESCRIPTION="JavaScript extensions for GNOME Shell" +HOMEPAGE="https://wiki.gnome.org/Projects/GnomeShell/Extensions" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86" + +DEPEND=" + >=dev-libs/glib-2.26:2 + >=gnome-base/libgtop-2.28.3[introspection] + >=app-eselect/eselect-gnome-shell-extensions-20111211 +" +RDEPEND="${DEPEND} + >=dev-libs/gjs-1.29 + dev-libs/gobject-introspection:= + dev-libs/atk[introspection] + gnome-base/gnome-menus:3[introspection] + =gnome-base/gnome-shell-$(ver_cut 1-2)* + media-libs/clutter:1.0[introspection] + net-libs/telepathy-glib[introspection] + x11-libs/gdk-pixbuf:2[introspection] + x11-libs/gtk+:3[introspection] + x11-libs/pango[introspection] + x11-themes/adwaita-icon-theme + >=x11-wm/mutter-3.32[introspection] +" +BDEPEND=" + >=sys-devel/gettext-0.19.8 + virtual/pkgconfig +" + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS="Installed extensions installed are initially disabled by default. +To change the system default and enable some extensions, you can use +# eselect gnome-shell-extensions + +Alternatively, to enable/disable extensions on a per-user basis, +you can use the https://extensions.gnome.org/ web interface, the +gnome-extra/gnome-tweaks GUI, or modify the org.gnome.shell +enabled-extensions gsettings key from the command line or a script." + +PATCHES=( + "${FILESDIR}/${PV}-drive-menu-indicator-visibility.patch" + "${FILESDIR}/${PV}-drive-menu-hide-items.patch" +) + +src_configure() { + meson_src_configure \ + -Dextension_set=all \ + -Dclassic_mode=true +} + +src_install() { + meson_src_install + readme.gentoo_create_doc +} + +pkg_postinst() { + xdg_pkg_postinst + + ebegin "Updating list of installed extensions" + eselect gnome-shell-extensions update + eend $? + + readme.gentoo_print_elog +} |