import gnome-tweaks-3.28.1-6.el8

This commit is contained in:
CentOS Sources 2019-11-05 14:46:16 -05:00 committed by Andrew Lukoshko
parent 2dcaed238f
commit 3a69f884b3
5 changed files with 225 additions and 2 deletions

View File

@ -0,0 +1,30 @@
From ca3581fe34030438c323b7da6b6d08abcd4d391d Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
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

View File

@ -0,0 +1,53 @@
From 000396a7ac3f03b0cea1c7897819634edd9f2dd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Wed, 18 Jul 2018 17:09:05 +0200
Subject: [PATCH] settings: Drop override settings support
Now that session-specific overrides landed in GIO, it is no longer
necessary to explicitly handle different defaults in GNOME and Classic.
https://gitlab.gnome.org/GNOME/gnome-tweaks/merge_requests/9
---
gtweak/widgets.py | 23 -----------------------
1 file changed, 23 deletions(-)
diff --git a/gtweak/widgets.py b/gtweak/widgets.py
index 3d48a51..f1d607c 100644
--- a/gtweak/widgets.py
+++ b/gtweak/widgets.py
@@ -116,32 +116,9 @@ def build_tight_button(stock_id):
button.get_style_context().add_provider(provider, 600)
return button
-def adjust_schema_for_overrides(originalSchema, key, options):
- if (_shell is None):
- return originalSchema
-
- if (_shell.mode == 'user'):
- overridesSchema = "org.gnome.shell.overrides"
- overridesFile = "org.gnome.shell.gschema.xml"
- elif (_shell.mode == 'classic'):
- overridesSchema = "org.gnome.shell.extensions.classic-overrides"
- overridesFile = None
- else:
- return originalSchema
-
- try:
- if (key in GSettingsSetting(overridesSchema, schema_filename=overridesFile).list_keys()):
- options['schema_filename'] = overridesFile
- return overridesSchema
- except GSettingsMissingError as e:
- logging.info("GSetting missing %s", e)
-
- return originalSchema
-
class _GSettingsTweak(Tweak):
def __init__(self, name, schema_name, key_name, **options):
- schema_name = adjust_schema_for_overrides(schema_name, key_name, options)
self.schema_name = schema_name
self.key_name = key_name
self._extra_info = None
--
2.21.0

View File

@ -0,0 +1,65 @@
diff -up gnome-tweaks-3.28.1/gtweak/tweaks/tweak_group_top_bar.py.drop-app-menu-option gnome-tweaks-3.28.1/gtweak/tweaks/tweak_group_top_bar.py
--- gnome-tweaks-3.28.1/gtweak/tweaks/tweak_group_top_bar.py.drop-app-menu-option 2019-07-04 11:57:08.757232549 +0200
+++ gnome-tweaks-3.28.1/gtweak/tweaks/tweak_group_top_bar.py 2019-07-04 11:58:58.306231034 +0200
@@ -4,60 +4,13 @@
import gtweak
from gtweak.gshellwrapper import GnomeShellFactory
-from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, GetterSetterSwitchTweak, Title, _GSettingsTweak
-from gtweak.utils import XSettingsOverrides
+from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, Title
_shell = GnomeShellFactory().get_shell()
_shell_loaded = _shell is not None
-class ApplicationMenuTweak(GetterSetterSwitchTweak):
- def __init__(self, **options):
- self._xsettings = XSettingsOverrides()
- name = _("Application Menu")
- GetterSetterSwitchTweak.__init__(self, name, **options)
-
- _GSettingsTweak.__init__(self,
- name,
- "org.gnome.desktop.wm.preferences",
- "button-layout",
- loaded=_shell_loaded,
- **options)
-
- def get_active(self):
- return self._xsettings.get_shell_shows_app_menu()
-
- def set_active(self, v):
- self._xsettings.set_shell_shows_app_menu(v)
-
- if v:
- self.notify_logout()
- return
- val = self.settings.get_string(self.key_name)
- if "appmenu" in val:
- self.notify_logout()
- return
- else:
- (left, colon, right) = val.partition(":")
-
- if "close" in right:
- rsplit = right.split(",")
- rsplit = [x for x in rsplit if x in ["minimize", "maximize", "close"]]
- rsplit.append("appmenu")
- rsplit.sort(key=lambda x: ["appmenu", "minimize", "maximize", "close"].index(x))
- self.settings.set_string(self.key_name, left + colon + ",".join(rsplit))
-
- else:
- rsplit = left.split(",")
- rsplit = [x for x in rsplit if x in ["minimize", "maximize", "close"]]
- rsplit.append("appmenu")
- rsplit.sort(key=lambda x: ["close", "minimize", "maximize", "appmenu"].index(x))
- self.settings.set_string(self.key_name, ",".join(rsplit) + colon + right)
- self.notify_logout()
-
-
TWEAK_GROUPS = [
ListBoxTweakGroup(_("Top Bar"),
- ApplicationMenuTweak(),
GSettingsSwitchTweak(_("Battery Percentage"),"org.gnome.desktop.interface", "show-battery-percentage", loaded=_shell_loaded),
# Requires patch from https://bugzilla.gnome.org/688320
GSettingsSwitchTweak(_("Activities Overview Hot Corner"),"org.gnome.shell", "enable-hot-corners", loaded=_shell_loaded),

View File

@ -0,0 +1,51 @@
From 3efa6fff00f812a034180d3d980a50cfa9a3250b Mon Sep 17 00:00:00 2001
From: Carlos Soriano <csoriano@redhat.com>
Date: Tue, 23 Apr 2019 15:16:17 +0200
Subject: [PATCH] Reflect extension status in the UI
---
gtweak/gshellwrapper.py | 3 ++-
gtweak/tweaks/tweak_group_shell_extensions.py | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/gtweak/gshellwrapper.py b/gtweak/gshellwrapper.py
index d654f88..ef1873a 100644
--- a/gtweak/gshellwrapper.py
+++ b/gtweak/gshellwrapper.py
@@ -81,7 +81,8 @@ class GnomeShell:
EXTENSION_TYPE = {
"SYSTEM" : 1,
- "PER_USER" : 2
+ "PER_USER" : 2,
+ "SESSION_MODE" : 3
}
DATA_DIR = os.path.join(GLib.get_user_data_dir(), "gnome-shell")
diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py
index e295d0b..5769774 100644
--- a/gtweak/tweaks/tweak_group_shell_extensions.py
+++ b/gtweak/tweaks/tweak_group_shell_extensions.py
@@ -114,7 +114,8 @@ class _ShellExtensionTweak(Gtk.ListBoxRow, Tweak):
if state == GnomeShell.EXTENSION_STATE["ENABLED"] or \
state == GnomeShell.EXTENSION_STATE["DISABLED"] or \
state == GnomeShell.EXTENSION_STATE["INITIALIZED"]:
- sensitive = True
+ if ext.get("type") != GnomeShell.EXTENSION_TYPE["SESSION_MODE"]:
+ sensitive = True
elif state == GnomeShell.EXTENSION_STATE["DOWNLOADING"]:
info = _("Extension downloading")
elif state == GnomeShell.EXTENSION_STATE["ERROR"]:
@@ -145,7 +146,8 @@ class _ShellExtensionTweak(Gtk.ListBoxRow, Tweak):
sw = Gtk.Switch(sensitive=sensitive)
sw.props.vexpand = False
sw.props.valign = Gtk.Align.CENTER
- sw.set_active(self._shell.extension_is_active(state, uuid))
+ sw.set_active(self._shell.extension_is_active(state, uuid) or
+ ext.get("type") == GnomeShell.EXTENSION_TYPE["SESSION_MODE"])
sw.connect('notify::active', self._on_extension_toggled, uuid)
self.hbox.pack_start(sw, False, False, 0)
--
libgit2 0.26.0

View File

@ -2,13 +2,17 @@
Name: gnome-tweaks Name: gnome-tweaks
Version: 3.28.1 Version: 3.28.1
Release: 1%{?dist} Release: 6%{?dist}
Summary: Customize advanced GNOME 3 options Summary: Customize advanced GNOME 3 options
# Software is GPLv3, Appdata file is CC0-1.0 # Software is GPLv3, Appdata file is CC0-1.0
License: GPLv3 and CC0 License: GPLv3 and CC0
URL: https://wiki.gnome.org/action/show/Apps/Tweaks URL: https://wiki.gnome.org/action/show/Apps/Tweaks
Source0: https://download.gnome.org/sources/%{name}/%{majorversion}/%{name}-%{version}.tar.xz Source0: https://download.gnome.org/sources/%{name}/%{majorversion}/%{name}-%{version}.tar.xz
Patch0: reflect-extensions-status.patch
Patch1: 0001-extensions-Fix-opening-system-installed-extensions-i.patch
Patch2: 0002-settings-Drop-override-settings-support.patch
Patch3: drop-app-menu-option.patch
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: gettext BuildRequires: gettext
@ -39,7 +43,7 @@ and extension, etc.
%prep %prep
%autosetup %autosetup -p1
%build %build
@ -82,6 +86,26 @@ appstream-util validate-relax --nonet $RPM_BUILD_ROOT/%{_datadir}/metainfo/*.app
%changelog %changelog
* Thu Jul 04 2019 Milan Crha <mcrha@redhat.com> - 3.28.1-6
- top-bar: Drop ApplicationMenu tweak
- Resolves: #1726656
* Tue Jul 02 2019 Milan Crha <mcrha@redhat.com> - 3.28.1-5
- settings: Drop override settings support
- Resolves: #1725741
* Tue Jun 18 2019 Milan Crha <mcrha@redhat.com> - 3.28.1-4
- extensions: Fix opening system installed extensions in gnome-software
- Resolves: #1721575
* Fri Apr 26 2019 Carlos Soriano <csoriano@redhat.com> - 3.28.1-3
- Fix reflect extension status in the UI
- Resolves: #1679127
* Tue Apr 23 2019 Carlos Soriano <csoriano@redhat.com> - 3.28.1-2
- Reflect extension status in the UI
- Resolves: #1679127
* Sun Apr 08 2018 Kalev Lember <klember@redhat.com> - 3.28.1-1 * Sun Apr 08 2018 Kalev Lember <klember@redhat.com> - 3.28.1-1
- Update to 3.28.1 - Update to 3.28.1