Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-base/nautilus/files/, gnome-base/nautilus/
Date: Mon, 02 Jan 2023 10:09:26
Message-Id: 1672654098.da225ddca5968b2eda74b4f5609a75904dd8a8bd.pacho@gentoo
1 commit: da225ddca5968b2eda74b4f5609a75904dd8a8bd
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 2 10:08:18 2023 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 10:08:18 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da225ddc
7
8 gnome-base/nautilus: Apply some upstream fixes
9
10 One to drop shotcuts for a functionality not available on 43.x and the other to
11 fix maximized state not being remembered.
12
13 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
14
15 .../nautilus/files/43.1-maximized-signal.patch | 34 ++++++
16 .../nautilus/files/43.1-treeview-shortcuts.patch | 41 +++++++
17 gnome-base/nautilus/nautilus-43.1-r1.ebuild | 122 +++++++++++++++++++++
18 3 files changed, 197 insertions(+)
19
20 diff --git a/gnome-base/nautilus/files/43.1-maximized-signal.patch b/gnome-base/nautilus/files/43.1-maximized-signal.patch
21 new file mode 100644
22 index 000000000000..2a333bd86687
23 --- /dev/null
24 +++ b/gnome-base/nautilus/files/43.1-maximized-signal.patch
25 @@ -0,0 +1,34 @@
26 +From d4061be4c72b952f1c20ec770f910ee311850478 Mon Sep 17 00:00:00 2001
27 +From: Gary Li <gary.li1@×××××××××.ca>
28 +Date: Wed, 28 Dec 2022 22:19:57 +0000
29 +Subject: [PATCH] nautilus-window: Fix window maximized notify signal
30 +
31 +Nautilus does not persist the window maximized state.
32 +
33 +This is because we are listening to the property is-maximized for
34 +change, which is now maximized in GTK4.
35 +https://docs.gtk.org/gtk4/property.Window.maximized.html
36 +
37 +Use notify::maximized instead of notify::is-maximized.
38 +
39 +Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2682
40 +---
41 + src/nautilus-window.c | 2 +-
42 + 1 file changed, 1 insertion(+), 1 deletion(-)
43 +
44 +diff --git a/src/nautilus-window.c b/src/nautilus-window.c
45 +index 7cd980d987..092afcbbd2 100644
46 +--- a/src/nautilus-window.c
47 ++++ b/src/nautilus-window.c
48 +@@ -2084,7 +2084,7 @@ nautilus_window_init (NautilusWindow *window)
49 + window,
50 + G_CONNECT_SWAPPED);
51 +
52 +- g_signal_connect (window, "notify::is-maximized",
53 ++ g_signal_connect (window, "notify::maximized",
54 + G_CALLBACK (on_is_maximized_changed), NULL);
55 +
56 + window->slots = NULL;
57 +--
58 +GitLab
59 +
60
61 diff --git a/gnome-base/nautilus/files/43.1-treeview-shortcuts.patch b/gnome-base/nautilus/files/43.1-treeview-shortcuts.patch
62 new file mode 100644
63 index 000000000000..206c1c6d9b81
64 --- /dev/null
65 +++ b/gnome-base/nautilus/files/43.1-treeview-shortcuts.patch
66 @@ -0,0 +1,41 @@
67 +From 98e34a4215f24a2414ca34a65804c86b8e4405c8 Mon Sep 17 00:00:00 2001
68 +From: Peter Eisenmann <p3732@××××××××××××.me>
69 +Date: Wed, 30 Nov 2022 02:40:17 +0100
70 +Subject: [PATCH] help-overlay: drop tree view shortcuts
71 +
72 +Expanding folders in list view is not implemented in version 43. This
73 +removes the shortcuts from the keyboard shortcut help view.
74 +
75 +Fixes #2674
76 +---
77 + src/resources/gtk/help-overlay.ui | 14 --------------
78 + 1 file changed, 14 deletions(-)
79 +
80 +diff --git a/src/resources/gtk/help-overlay.ui b/src/resources/gtk/help-overlay.ui
81 +index 27e5906b6e..42bad9ffd1 100644
82 +--- a/src/resources/gtk/help-overlay.ui
83 ++++ b/src/resources/gtk/help-overlay.ui
84 +@@ -301,20 +301,6 @@
85 + <property name="accelerator">&lt;Primary&gt;2</property>
86 + </object>
87 + </child>
88 +- <child>
89 +- <object class="GtkShortcutsShortcut">
90 +- <property name="visible">True</property>
91 +- <property name="title" translatable="yes" context="shortcut window">Expand folder</property>
92 +- <property name="accelerator">Right</property>
93 +- </object>
94 +- </child>
95 +- <child>
96 +- <object class="GtkShortcutsShortcut">
97 +- <property name="visible">True</property>
98 +- <property name="title" translatable="yes" context="shortcut window">Collapse folder</property>
99 +- <property name="accelerator">Left</property>
100 +- </object>
101 +- </child>
102 + </object>
103 + </child>
104 + <child>
105 +--
106 +GitLab
107 +
108
109 diff --git a/gnome-base/nautilus/nautilus-43.1-r1.ebuild b/gnome-base/nautilus/nautilus-43.1-r1.ebuild
110 new file mode 100644
111 index 000000000000..3a4480054434
112 --- /dev/null
113 +++ b/gnome-base/nautilus/nautilus-43.1-r1.ebuild
114 @@ -0,0 +1,122 @@
115 +# Copyright 1999-2023 Gentoo Authors
116 +# Distributed under the terms of the GNU General Public License v2
117 +
118 +EAPI=8
119 +
120 +inherit gnome.org gnome2-utils meson readme.gentoo-r1 virtualx xdg
121 +
122 +DESCRIPTION="Default file manager for the GNOME desktop"
123 +HOMEPAGE="https://wiki.gnome.org/Apps/Nautilus"
124 +
125 +LICENSE="GPL-3+ LGPL-2.1+"
126 +SLOT="0"
127 +IUSE="gnome +gstreamer gtk-doc +introspection +previewer selinux sendto"
128 +REQUIRED_USE="gtk-doc? ( introspection )"
129 +
130 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
131 +
132 +DEPEND="
133 + >=dev-libs/glib-2.72.0:2
134 + >=media-libs/gexiv2-0.14.0
135 + >=x11-libs/gdk-pixbuf-2.30.0:2
136 + gstreamer? ( media-libs/gstreamer:1.0
137 + media-libs/gst-plugins-base:1.0 )
138 + >=app-arch/gnome-autoar-0.4.0
139 + >=gnome-base/gnome-desktop-43:4=
140 + >=gnome-base/gsettings-desktop-schemas-42
141 + >=gui-libs/gtk-4.7.2:4[introspection?]
142 + >=gui-libs/libadwaita-1.2:1
143 + >=dev-libs/libportal-0.5:=[gtk]
144 + >=x11-libs/pango-1.28.3
145 + selinux? ( >=sys-libs/libselinux-2.0 )
146 + >=app-misc/tracker-3.0:3
147 + >=dev-libs/libxml2-2.7.8:2
148 + >=net-libs/libcloudproviders-0.3.1
149 + introspection? ( >=dev-libs/gobject-introspection-1.54:= )
150 +"
151 +RDEPEND="${DEPEND}
152 + >=app-misc/tracker-miners-3.0:3=
153 +" # uses org.freedesktop.Tracker.Miner.Files gsettings schema from tracker-miners
154 +BDEPEND="
155 + >=dev-util/gdbus-codegen-2.51.2
156 + dev-util/glib-utils
157 + gtk-doc? (
158 + app-text/docbook-xml-dtd:4.1.2
159 + dev-util/gi-docgen
160 + )
161 + >=sys-devel/gettext-0.19.8
162 + virtual/pkgconfig
163 +"
164 +PDEPEND="
165 + gnome? ( x11-themes/adwaita-icon-theme )
166 + previewer? ( >=gnome-extra/sushi-0.1.9 )
167 + sendto? ( >=gnome-extra/nautilus-sendto-3.0.1 )
168 + >=gnome-base/gvfs-1.14[gtk(+)]
169 +" # Need gvfs[gtk] for recent:/// support; always built (without USE=gtk) since gvfs-1.34
170 +
171 +PATCHES=(
172 + "${FILESDIR}"/43.0-docs-build.patch # Always install pregenerated manpage, keeping docs option for gtk-doc
173 + "${FILESDIR}"/43.0-optional-gstreamer.patch # Allow controlling audio-video-properties build
174 +
175 + # help-overlay: drop tree view shortcuts as they are not implemented
176 + # in 43.x
177 + "${FILESDIR}"/${PV}-treeview-shortcuts.patch
178 +
179 + # nautilus-window: Fix window maximized notify signal
180 + "${FILESDIR}"/43.1-maximized-signal.patch
181 +)
182 +
183 +src_prepare() {
184 + default
185 + xdg_environment_reset
186 +
187 + if use previewer; then
188 + DOC_CONTENTS="nautilus uses gnome-extra/sushi to preview media files.
189 + To activate the previewer, select a file and press space; to
190 + close the previewer, press space again."
191 + fi
192 +
193 + # Disable test-nautilus-search-engine-tracker; bug #831170
194 + sed -e '/^tracker_tests = /{n;N;N;d}' -i test/automated/displayless/meson.build || die
195 +}
196 +
197 +src_configure() {
198 + local emesonargs=(
199 + $(meson_use gtk-doc docs)
200 + -Dextensions=true # image file properties, sendto support; also required for -Dgstreamer=true
201 + $(meson_use gstreamer) # gstreamer audio-video-properties extension
202 + $(meson_use introspection)
203 + -Dpackagekit=false
204 + $(meson_use selinux)
205 + -Dprofiling=false
206 + -Dtests=$(usex test all none)
207 + )
208 + meson_src_configure
209 +}
210 +
211 +src_install() {
212 + use previewer && readme.gentoo_create_doc
213 + meson_src_install
214 +}
215 +
216 +src_test() {
217 + gnome2_environment_reset # Avoid dconf that looks at XDG_DATA_DIRS, which can sandbox fail if flatpak is installed
218 + # TODO: Tests require tracker testutils (e.g. tracker-sandbox), which may need some sorting out with tracker use flag deps
219 + virtx meson_src_test
220 +}
221 +
222 +pkg_postinst() {
223 + xdg_pkg_postinst
224 + gnome2_schemas_update
225 +
226 + if use previewer; then
227 + readme.gentoo_print_elog
228 + else
229 + elog "To preview media files, emerge nautilus with USE=previewer"
230 + fi
231 +}
232 +
233 +pkg_postrm() {
234 + xdg_pkg_postrm
235 + gnome2_schemas_update
236 +}