From dcc4bcc103c967d8e84411aeac589d4a47e5e033 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 19 Dec 2018 09:26:30 +0100 Subject: [PATCH] Fix opening system installed extensions in gnome-software https://gitlab.gnome.org/GNOME/gnome-tweaks/merge_requests/25 --- ...pening-system-installed-extensions-i.patch | 30 +++++++++++++++++++ gnome-tweaks.spec | 7 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0001-extensions-Fix-opening-system-installed-extensions-i.patch diff --git a/0001-extensions-Fix-opening-system-installed-extensions-i.patch b/0001-extensions-Fix-opening-system-installed-extensions-i.patch new file mode 100644 index 0000000..72938dd --- /dev/null +++ b/0001-extensions-Fix-opening-system-installed-extensions-i.patch @@ -0,0 +1,30 @@ +From ca3581fe34030438c323b7da6b6d08abcd4d391d Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Mon, 19 Nov 2018 11:06:30 +0100 +Subject: [PATCH] extensions: Fix opening system installed extensions in + gnome-software + +When generating the app id that's passed to gnome-software, avoid +hardcoding the 'user' scope and use 'system' scope for system-wide +installed shell extensions. +--- + gtweak/tweaks/tweak_group_shell_extensions.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py +index 47854a7..284e6e0 100644 +--- a/gtweak/tweaks/tweak_group_shell_extensions.py ++++ b/gtweak/tweaks/tweak_group_shell_extensions.py +@@ -88,7 +88,8 @@ class _ShellExtensionTweak(Gtk.ListBoxRow, Tweak): + self._shell = shell + state = ext.get("state") + uuid = ext["uuid"] +- self._app_id = "user/*/extensions-web/shell-extension/" + uuid.replace('@', '_') + "/*" ++ scope = "user" if ext.get("type") == GnomeShell.EXTENSION_TYPE["PER_USER"] else "system" ++ self._app_id = scope + "/*/*/shell-extension/" + uuid.replace('@', '_') + "/*" + + shell._settings.bind("disable-user-extensions", self, + "sensitive", Gio.SettingsBindFlags.INVERT_BOOLEAN) +-- +2.19.1 + diff --git a/gnome-tweaks.spec b/gnome-tweaks.spec index 717f81c..52d4b86 100644 --- a/gnome-tweaks.spec +++ b/gnome-tweaks.spec @@ -10,6 +10,10 @@ License: GPLv3 and CC0 URL: https://wiki.gnome.org/action/show/Apps/Tweaks Source0: https://download.gnome.org/sources/%{name}/%{majorversion}/%{name}-%{version}.tar.xz +# Fix opening system installed extensions in gnome-software +# https://gitlab.gnome.org/GNOME/gnome-tweaks/merge_requests/25 +Patch0: 0001-extensions-Fix-opening-system-installed-extensions-i.patch + BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: libappstream-glib @@ -39,7 +43,7 @@ and extension, etc. %prep -%autosetup +%autosetup -p1 %build @@ -84,6 +88,7 @@ appstream-util validate-relax --nonet $RPM_BUILD_ROOT/%{_datadir}/metainfo/*.app %changelog * Wed Dec 19 2018 Kalev Lember - 3.30.2-1 - Update to 3.30.2 +- Fix opening system installed extensions in gnome-software * Fri Sep 28 2018 Kalev Lember - 3.30.1-1 - Update to 3.30.1