Resolves: #1973391 (Remove the patch, not applicable due to Nautilus changes)

This commit is contained in:
Milan Crha 2021-07-19 15:02:12 +02:00
parent 7f048a25d5
commit bae4fe580f
2 changed files with 4 additions and 38 deletions

View File

@ -1,35 +0,0 @@
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

View File

@ -3,7 +3,7 @@
Name: gnome-tweaks
Version: 40.0
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Customize advanced GNOME 3 options
# Software is GPLv3, Appdata file is CC0-1.0
@ -11,8 +11,6 @@ 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
@ -77,6 +75,9 @@ appstream-util validate-relax --nonet $RPM_BUILD_ROOT/%{_datadir}/metainfo/*.app
%changelog
* Mon Jul 19 2021 Milan Crha <mcrha@redhat.com> - 40.0-5
- Resolves: #1973391 (Remove the patch, not applicable due to Nautilus changes)
* Fri Jun 18 2021 Milan Crha <mcrha@redhat.com> - 40.0-4
- Resolves: #1973391 (Backport downstream patch from older RHEL)