diff --git a/977.patch b/977.patch new file mode 100644 index 0000000..5e6b34c --- /dev/null +++ b/977.patch @@ -0,0 +1,56 @@ +From 57b1d9b523c57a9ebf662f6da08cd26a3a22401a Mon Sep 17 00:00:00 2001 +From: Qiu Wenbo +Date: Tue, 13 Sep 2022 17:03:37 +0800 +Subject: [PATCH] Revert "thumbnails: Create larger thumbnails for higher + density displays" + +This reverts commit 278435e3c20244b48986c6cd8b72c5317668c72d. + +glib2 do not handle x-large and xx-large case so G_FILE_ATTRIBUTE_THUMBNAIL_PATH +simply return nothing. That makes nautilus think the thumbnail should be +generated again which is a dead loop. +--- + src/nautilus-thumbnails.c | 27 +-------------------------- + 1 file changed, 1 insertion(+), 26 deletions(-) + +diff --git a/src/nautilus-thumbnails.c b/src/nautilus-thumbnails.c +index 790b4e36f..1bad311e1 100644 +--- a/src/nautilus-thumbnails.c ++++ b/src/nautilus-thumbnails.c +@@ -137,32 +137,7 @@ get_thumbnail_factory (void) + + if (thumbnail_factory == NULL) + { +- GdkDisplay *display = gdk_display_get_default (); +- GListModel *monitors = gdk_display_get_monitors (display); +- gint max_scale = 1; +- GnomeDesktopThumbnailSize size; +- +- for (guint i = 0; i < g_list_model_get_n_items (monitors); i++) +- { +- g_autoptr (GdkMonitor) monitor = g_list_model_get_item (monitors, i); +- +- max_scale = MAX (max_scale, gdk_monitor_get_scale_factor (monitor)); +- } +- +- if (max_scale <= 1) +- { +- size = GNOME_DESKTOP_THUMBNAIL_SIZE_LARGE; +- } +- else if (max_scale <= 2) +- { +- size = GNOME_DESKTOP_THUMBNAIL_SIZE_XLARGE; +- } +- else +- { +- size = GNOME_DESKTOP_THUMBNAIL_SIZE_XXLARGE; +- } +- +- thumbnail_factory = gnome_desktop_thumbnail_factory_new (size); ++ thumbnail_factory = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_LARGE); + } + + return thumbnail_factory; +-- +GitLab + diff --git a/nautilus.spec b/nautilus.spec index da0751b..d1227c7 100644 --- a/nautilus.spec +++ b/nautilus.spec @@ -7,12 +7,18 @@ Name: nautilus Version: 43.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: File manager for GNOME License: GPLv3+ URL: https://wiki.gnome.org/Apps/Nautilus Source0: https://download.gnome.org/sources/%{name}/43/%{name}-%{tarball_version}.tar.xz +# https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/977 +# https://bugzilla.redhat.com/show_bug.cgi?id=2127618 +# https://gitlab.gnome.org/GNOME/nautilus/-/issues/2487 +# Revert high-resolution thumbnail generation as it cannot work +# without fixes in glib +Patch0: 977.patch BuildRequires: desktop-file-utils BuildRequires: gcc @@ -138,6 +144,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop %doc %{_datadir}/doc/nautilus/ %changelog +* Fri Sep 30 2022 Adam Williamson - 43.0-2 +- Backport MR #977 to revert broken high-res thumbnails (#2127618) + * Tue Sep 20 2022 Kalev Lember - 43.0-1 - Update to 43.0