import gnome-tweaks-3.28.1-6.el8
This commit is contained in:
parent
4cadebd529
commit
6dd7d44a3d
53
SOURCES/0002-settings-Drop-override-settings-support.patch
Normal file
53
SOURCES/0002-settings-Drop-override-settings-support.patch
Normal 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
|
||||
|
65
SOURCES/drop-app-menu-option.patch
Normal file
65
SOURCES/drop-app-menu-option.patch
Normal 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),
|
@ -2,7 +2,7 @@
|
||||
|
||||
Name: gnome-tweaks
|
||||
Version: 3.28.1
|
||||
Release: 4%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: Customize advanced GNOME 3 options
|
||||
|
||||
# Software is GPLv3, Appdata file is CC0-1.0
|
||||
@ -11,6 +11,8 @@ 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
|
||||
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: gettext
|
||||
@ -84,6 +86,14 @@ appstream-util validate-relax --nonet $RPM_BUILD_ROOT/%{_datadir}/metainfo/*.app
|
||||
|
||||
|
||||
%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
|
||||
|
Loading…
Reference in New Issue
Block a user