summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2021-02-14 16:36:58 +0100
committerPacho Ramos <pacho@gentoo.org>2021-02-14 17:23:03 +0100
commit4fb0ccd7d7d614374aa022000a076795839def4b (patch)
treecea3cf1eeca9dd5f67706f43160b8b77c704ac4c /gnome-extra
parentx11-misc/primus: Update libglvnd USEdep on nvidia (diff)
downloadgentoo-4fb0ccd7d7d614374aa022000a076795839def4b.tar.gz
gentoo-4fb0ccd7d7d614374aa022000a076795839def4b.tar.bz2
gentoo-4fb0ccd7d7d614374aa022000a076795839def4b.zip
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@gentoo.org>
Diffstat (limited to 'gnome-extra')
-rw-r--r--gnome-extra/gnome-shell-extension-applications-overview-tooltip/files/gnome-shell-extension-applications-overview-tooltip-10-search-tooltip.patch57
-rw-r--r--gnome-extra/gnome-shell-extension-applications-overview-tooltip/gnome-shell-extension-applications-overview-tooltip-10-r1.ebuild54
2 files changed, 111 insertions, 0 deletions
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 000000000000..293a710aa2fb
--- /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?= <raphael@rri.fr>
+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 000000000000..752839d2b804
--- /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
+}