Resolves: #1973391 (Backport downstream patch from older RHEL)
This commit is contained in:
parent
45a774bd9c
commit
7f048a25d5
35
desktop-icons-classic-mode.patch
Normal file
35
desktop-icons-classic-mode.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff -up gnome-tweaks-40.0/gtweak/tweaks/tweak_group_desktop.py.1 gnome-tweaks-40.0/gtweak/tweaks/tweak_group_desktop.py
|
||||
--- gnome-tweaks-40.0/gtweak/tweaks/tweak_group_desktop.py.1 2021-03-27 22:15:34.200934600 +0100
|
||||
+++ gnome-tweaks-40.0/gtweak/tweaks/tweak_group_desktop.py 2021-06-18 12:39:37.112857745 +0200
|
||||
@@ -3,8 +3,17 @@
|
||||
# License-Filename: LICENSES/GPL-3.0
|
||||
|
||||
from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, Title
|
||||
+from gtweak.gshellwrapper import GnomeShellFactory
|
||||
|
||||
-dicons = GSettingsSwitchTweak(_("Show Icons"),"org.gnome.desktop.background","show-desktop-icons")
|
||||
+_shell = GnomeShellFactory().get_shell()
|
||||
+_shell_is_classic = False
|
||||
+
|
||||
+if (not(_shell is None)):
|
||||
+ _shell_is_classic = _shell.mode == 'classic'
|
||||
+
|
||||
+dicons = None
|
||||
+if (not(_shell_is_classic)):
|
||||
+ dicons = GSettingsSwitchTweak(_("Show Icons"),"org.gnome.desktop.background","show-desktop-icons")
|
||||
|
||||
# show-desktop-icons is in gsettings-desktop-schemas, but it won't actually
|
||||
# *work* unless we have a version of Nautilus that still has the ability to
|
||||
diff -up gnome-tweaks-40.0/gtweak/widgets.py.1 gnome-tweaks-40.0/gtweak/widgets.py
|
||||
--- gnome-tweaks-40.0/gtweak/widgets.py.1 2021-06-18 12:39:37.112857745 +0200
|
||||
+++ gnome-tweaks-40.0/gtweak/widgets.py 2021-06-18 12:40:59.950824933 +0200
|
||||
@@ -207,6 +207,9 @@ class ListBoxTweakGroup(Gtk.ListBox, Twe
|
||||
# the search cache etc)
|
||||
|
||||
def add_tweak_row(self, t, activatable=False, position=None):
|
||||
+ if t == None:
|
||||
+ return None
|
||||
+
|
||||
if self.add_tweak(t):
|
||||
if isinstance(t, Gtk.ListBoxRow):
|
||||
row = t
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name: gnome-tweaks
|
||||
Version: 40.0
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Customize advanced GNOME 3 options
|
||||
|
||||
# Software is GPLv3, Appdata file is CC0-1.0
|
||||
@ -11,6 +11,8 @@ License: GPLv3 and CC0
|
||||
URL: https://wiki.gnome.org/Apps/Tweaks
|
||||
Source0: https://download.gnome.org/sources/%{name}/%{major_version}/%{name}-%{tarball_version}.tar.xz
|
||||
|
||||
Patch01: desktop-icons-classic-mode.patch
|
||||
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: gettext
|
||||
BuildRequires: libappstream-glib
|
||||
@ -41,7 +43,7 @@ and extension, etc.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{tarball_version}
|
||||
%autosetup -n %{name}-%{tarball_version} -p1 -S gendiff
|
||||
|
||||
|
||||
%build
|
||||
@ -75,6 +77,9 @@ appstream-util validate-relax --nonet $RPM_BUILD_ROOT/%{_datadir}/metainfo/*.app
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jun 18 2021 Milan Crha <mcrha@redhat.com> - 40.0-4
|
||||
- Resolves: #1973391 (Backport downstream patch from older RHEL)
|
||||
|
||||
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 40.0-3
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user