commit:     4fb0ccd7d7d614374aa022000a076795839def4b
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 14 15:36:58 2021 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Feb 14 16:23:03 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fb0ccd7

gnome-extra/gnome-shell-extension-applications-overview-tooltip: Fix tooltip in 
search

Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 ...ations-overview-tooltip-10-search-tooltip.patch | 57 ++++++++++++++++++++++
 ...sion-applications-overview-tooltip-10-r1.ebuild | 54 ++++++++++++++++++++
 2 files changed, 111 insertions(+)

diff --git 
a/gnome-extra/gnome-shell-extension-applications-overview-tooltip/files/gnome-shell-extension-applications-overview-tooltip-10-search-tooltip.patch
 
b/gnome-extra/gnome-shell-extension-applications-overview-tooltip/files/gnome-shell-extension-applications-overview-tooltip-10-search-tooltip.patch
new file mode 100644
index 00000000000..293a710aa2f
--- /dev/null
+++ 
b/gnome-extra/gnome-shell-extension-applications-overview-tooltip/files/gnome-shell-extension-applications-overview-tooltip-10-search-tooltip.patch
@@ -0,0 +1,57 @@
+From f90ddba2fbd2256e03b4f22f7ca29004bbdbe466 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rapha=C3=ABl=20Rochet?= <[email protected]>
+Date: Fri, 29 Jan 2021 11:11:58 +0100
+Subject: [PATCH] Brings back tooltips on search results
+
+---
+ extension.js | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/extension.js b/extension.js
+index 860daf0..1a5b2c0 100644
+--- a/extension.js
++++ b/extension.js
+@@ -24,6 +24,7 @@ let BORDERS                  = false;
+ 
+ // private variables
+ let _old_addItem = null;              // used to restore monkey patched 
function on disable
++let _old_searchAddItem = null;        // same but for search results
+ let _tooltips = null;                 // used to disconnect events on disable
+ let _labelTimeoutId = 0;              // id of timer waiting for start
+ let _resetHoverTimeoutId = 0; // id of last (cancellable) timer
+@@ -57,7 +58,7 @@ function enable() {
+       // Enabling tooltips for already loaded icons
+       _connectAll(Main.overview.viewSelector.appDisplay);
+ 
+-      // monkeypatching for future icons (includes search results app icons)
++      // monkeypatching for future app icons
+       _old_addItem = imports.ui.iconGrid.IconGrid.prototype.addItem;
+       imports.ui.iconGrid.IconGrid.prototype.addItem = function(item, index){
+               _connect(item);
+@@ -65,6 +66,13 @@ function enable() {
+               _old_addItem.apply(this, arguments);
+       };
+ 
++      // monkeypatching for future app icons in search results
++      _old_searchAddItem = 
imports.ui.search.GridSearchResults.prototype._addItem;
++      imports.ui.search.GridSearchResults.prototype._addItem = 
function(display){
++              _connect(display);
++              _old_searchAddItem.apply(this, arguments);
++      };
++
+       // apply new settings if changed
+       _settingsConnectionId = _settings.connect('changed', _applySettings);
+ 
+@@ -87,8 +95,11 @@ function disable() {
+       if (_settingsConnectionId > 0) 
_settings.disconnect(_settingsConnectionId);
+       _settings = null;
+ 
+-      // restore the original addItem function
++      // restore the original addItem functions and remove references to them
+       imports.ui.iconGrid.IconGrid.prototype.addItem = _old_addItem;
++      imports.ui.search.GridSearchResults.prototype._addItem = 
_old_searchAddItem;
++      _old_addItem = null;
++      _old_searchAddItem = null;
+ 
+       // disconnects from all loaded icons
+       for (let i = 0; i < _tooltips.length; i++) {

diff --git 
a/gnome-extra/gnome-shell-extension-applications-overview-tooltip/gnome-shell-extension-applications-overview-tooltip-10-r1.ebuild
 
b/gnome-extra/gnome-shell-extension-applications-overview-tooltip/gnome-shell-extension-applications-overview-tooltip-10-r1.ebuild
new file mode 100644
index 00000000000..752839d2b80
--- /dev/null
+++ 
b/gnome-extra/gnome-shell-extension-applications-overview-tooltip/gnome-shell-extension-applications-overview-tooltip-10-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit gnome2-utils
+
+# Workaround until https://bugzilla.gnome.org/show_bug.cgi?id=663725 is fixed
+DESCRIPTION="Show tooltip with full name and description"
+HOMEPAGE="https://github.com/RaphaelRochet/applications-overview-tooltip";
+SRC_URI="https://github.com/RaphaelRochet/applications-overview-tooltip/archive/v${PV}.tar.gz
 -> ${P}.tar.gz"
+
+# https://github.com/RaphaelRochet/applications-overview-tooltip/issues/7
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+       app-eselect/eselect-gnome-shell-extensions
+       >=gnome-base/gnome-shell-3.38
+"
+DEPEND=""
+BDEPEND=""
+
+S="${WORKDIR}/${P/gnome-shell-extension-}"
+
+PATCHES=(
+       # Fix tooltip in search results, from 'master'
+       "${FILESDIR}/${P}-search-tooltip.patch"
+)
+
+src_install() {
+       einstalldocs
+       insinto /usr/share/glib-2.0/schemas
+       doins schemas/*.xml
+       rm -rf README.md schemas || die
+       insinto 
/usr/share/gnome-shell/extensions/applications-overview-tooltip@RaphaelRochet
+       doins -r *
+}
+
+pkg_preinst() {
+       gnome2_schemas_savelist
+}
+
+pkg_postinst() {
+       gnome2_schemas_update
+       ebegin "Updating list of installed extensions"
+       eselect gnome-shell-extensions update
+       eend $?
+}
+
+pkg_postrm() {
+       gnome2_schemas_update
+}

Reply via email to