Auto sync2gitlab import of gnome-tweaks-3.28.1-7.el8.src.rpm

This commit is contained in:
James Antill 2022-05-26 07:49:55 -04:00
parent 943a8376ae
commit 5dc246c7b3
9 changed files with 335 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/gnome-tweaks-3.28.1.tar.xz

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

1
EMPTY
View File

@ -1 +0,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,13 @@
diff -up gnome-tweaks-3.28.1/gtweak/gshellwrapper.py.orig gnome-tweaks-3.28.1/gtweak/gshellwrapper.py
--- gnome-tweaks-3.28.1/gtweak/gshellwrapper.py.orig 2020-02-18 11:52:27.943003986 +0100
+++ gnome-tweaks-3.28.1/gtweak/gshellwrapper.py 2020-02-18 11:53:13.572003355 +0100
@@ -123,8 +123,7 @@ class GnomeShell32(GnomeShell):
return self._proxy.proxy.ListExtensions()
def extension_is_active(self, state, uuid):
- return state == GnomeShell.EXTENSION_STATE["ENABLED"] and \
- self._settings.setting_is_in_list(self.EXTENSION_ENABLED_KEY, uuid)
+ return self._settings.setting_is_in_list(self.EXTENSION_ENABLED_KEY, uuid)
def enable_extension(self, uuid):
self._settings.setting_add_to_list(self.EXTENSION_ENABLED_KEY, uuid)

121
gnome-tweaks.spec Normal file
View File

@ -0,0 +1,121 @@
%global majorversion %(cut -d "." -f 1-2 <<<%{version})
Name: gnome-tweaks
Version: 3.28.1
Release: 7%{?dist}
Summary: Customize advanced GNOME 3 options
# Software is GPLv3, Appdata file is CC0-1.0
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
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
Patch4: extension-enable-state.patch
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: libappstream-glib
BuildRequires: meson
BuildRequires: python3-devel
Requires: gnome-desktop3
Requires: gnome-settings-daemon
Requires: gnome-shell >= 3.24
Requires: gnome-shell-extension-user-theme
Requires: gobject-introspection
Requires: gsettings-desktop-schemas >= 3.27.90
Requires: gtk3 >= 3.12
Requires: libnotify
Requires: libsoup
Requires: mutter
Requires: pango
Requires: python3dist(pygobject)
Provides: gnome-tweak-tool = %{version}.%{release}
Obsoletes: gnome-tweak-tool < 3.27.3-4
BuildArch: noarch
%description
GNOME Tweaks allows adjusting advanced configuration settings in GNOME 3. This
includes things like the fonts used in user interface elements, alternative user
interface themes, changes in window management behavior, GNOME Shell appearance
and extension, etc.
%prep
%autosetup -p1
%build
%meson
%meson_build
%install
%meson_install
# Update the screenshot shown in the software center
#
# NOTE: It would be *awesome* if this file was pushed upstream.
#
# See http://people.freedesktop.org/~hughsient/appdata/#screenshots for more details.
#
appstream-util replace-screenshots $RPM_BUILD_ROOT%{_datadir}/metainfo/org.gnome.tweaks.appdata.xml \
https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/gnome-tweak-tool/a.png \
https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/gnome-tweak-tool/b.png
%find_lang %{name}
%check
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
appstream-util validate-relax --nonet $RPM_BUILD_ROOT/%{_datadir}/metainfo/*.appdata.xml
%files -f %{name}.lang
%doc AUTHORS NEWS README.md
%license LICENSES/
%{_bindir}/%{name}
%{_libexecdir}/gnome-tweak-tool-lid-inhibitor
%{python3_sitelib}/gtweak/
%{_datadir}/metainfo/*.appdata.xml
%{_datadir}/applications/*.desktop
%{_datadir}/%{name}/
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/icons/hicolor/scalable/apps/*.svg
%changelog
* Tue Feb 18 2020 Milan Crha <mcrha@redhat.com> - 3.28.1-7
- extensions: Incorrectly shows enabled extensions as disabled after enable-all
- Resolves: #1804123
* 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
- Update to 3.28.1
* Mon Mar 12 2018 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.28.0-1
- Update to 3.28.0
* Fri Mar 09 2018 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.27.92-1
- Initial RPM release, based on gnome-tweak-tool.spec

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

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (gnome-tweaks-3.28.1.tar.xz) = c3d1f65012b465b428809bcd734df4de37f1530611d1bce6363067683184acfbc736b432b12834882b10aa7d0f03d4242cc51319b6f49de95eea7b7c43db90dc