Merge ~3v1n0/ubuntu/+source/nautilus:ubuntu/bionic-3-26-4 into ~ubuntu-desktop/ubuntu/+source/nautilus:ubuntu/bionic

Proposed by Marco Trevisan (Treviño)
Status: Merged
Merged at revision: 66302124e15dc5667680531598700a8764f43ccb
Proposed branch: ~3v1n0/ubuntu/+source/nautilus:ubuntu/bionic-3-26-4
Merge into: ~ubuntu-desktop/ubuntu/+source/nautilus:ubuntu/bionic
Diff against target: 4605 lines (+2048/-491)
49 files modified
NEWS (+16/-0)
build-aux/flatpak/org.gnome.Nautilus.json (+138/-0)
debian/changelog (+25/-0)
debian/control.in (+4/-1)
debian/patches/0001-Respect-gtk-dialogs-use-header-for-all-dialogs.patch (+29/-9)
debian/patches/0015-tracker-search-engine-don-t-start-it-if-not-availabl.patch (+7/-7)
debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch (+99/-62)
debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch (+28/-22)
debian/patches/0018-search-engine-add-locate-based-search-engine.patch (+27/-23)
debian/patches/03_translations_list_update.patch (+8/-2)
debian/patches/04_suppress_umount_in_ltsp.patch (+3/-4)
debian/patches/06_never_exec_nonexec_launchers.patch (+2/-3)
debian/patches/12_unity_launcher_support.patch (+2/-2)
debian/patches/18_unity_icon_color.patch (+8/-3)
debian/patches/19_unity_open_location_xid.patch (+37/-26)
debian/patches/20_add_timestamp_to_operations.patch (+43/-37)
debian/patches/Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch (+53/-0)
debian/patches/Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch (+25/-0)
debian/patches/appstream-compulsory.patch (+1/-1)
debian/patches/file-view-Always-unset-pending_selection-after-freeing-it.patch (+80/-0)
debian/patches/multiarch_fallback.patch (+3/-2)
debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mo.patch (+45/-0)
debian/patches/query-add-recursive-flags-and-use-it-in-search-engines.patch (+1022/-0)
debian/patches/series (+5/-2)
debian/patches/ubuntu_backspace_behaviour.patch (+8/-8)
debian/patches/ubuntu_infobars_color.patch (+17/-8)
debian/patches/ubuntu_revert_no_wallpaper.patch (+22/-11)
debian/patches/ubuntu_sync_background_to_accountsservice.patch (+10/-5)
debian/patches/zg_activity_logging.patch (+33/-20)
dev/null (+0/-108)
meson.build (+1/-1)
po/zh_TW.po (+45/-46)
src/gtk/gtk-code-generator.sh (+2/-2)
src/gtk/nautilusgtkplacesview.c (+56/-5)
src/nautilus-application.c (+1/-1)
src/nautilus-canvas-container.c (+6/-0)
src/nautilus-canvas-item.c (+4/-1)
src/nautilus-canvas-private.h (+1/-0)
src/nautilus-directory.c (+45/-26)
src/nautilus-file-private.h (+2/-0)
src/nautilus-file-utilities.c (+1/-1)
src/nautilus-file.c (+40/-4)
src/nautilus-file.h (+2/-0)
src/nautilus-files-view.c (+7/-8)
src/nautilus-list-view.c (+15/-9)
src/nautilus-notebook.c (+8/-14)
src/nautilus-trash-monitor.c (+1/-1)
src/nautilus-window-slot.c (+3/-5)
src/nautilus-window.c (+8/-1)
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+350174@code.launchpad.net

This proposal supersedes a proposal from 2018-07-18.

Commit message

  * New upstream release: 3.26.4 (LP: #1782681, LP: #1765776)
  * debian/patches/query-add-recursive-flags-and-use-it-in-search-engines.patch,
    debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch,
    debian/patches/0018-search-engine-add-locate-based-search-engine.patch:
    - Follow nautilus settings to search only in current folder (LP: #1767027).
      This doesn't apply to gnome-shell search provider for indexed searches.
  * debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch:
    - Updated to respect upstream requested changes
  * debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mounted.patch:
    - don't crash if selecting a volume that is not mounted (LP: #1764779)
  * debian/patches/Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch,
    debian/patches/Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch:
    - Reverts the reverts introduced in 2.26.3.1 as they are in ubuntu already
  * debian/patches/clear_pending_selection.patch,
    debian/patches/git_middle_tab.patch,
    debian/patches/server_list_segfault.patch,
    debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mounted.patch:
    - Patches removed as they are already applied upstream

To post a comment you must log in.
Revision history for this message
Amr Ibrahim (amribrahim1987) wrote : Posted in a previous version of this proposal

I just have a comment on what upstream did for 3.26.3.1. They reverted two commits, which they see as behavioural changes in a stable release, and that makes sense upstream.

Revert "files-view: Remove new empty folder name suggestion"
https://gitlab.gnome.org/GNOME/nautilus/commit/945c32dec747855047aa9b380d53588c5fcfb57a

Revert "nautilus-file: Don't show thumbnails for the first 2 zoom levels"
https://gitlab.gnome.org/GNOME/nautilus/commit/d62c0899f34665bdc4752ce8b6844328889f4638

But downstream here in Ubuntu, those behaviours were released as part of 18.04 in nautilus 3.26.3 and removing them might be considered a regression in Ubuntu itself. The changes had been introduced in 3.26.3 during the development cycle of Bionic, so technically that counts as an improvement, not as a behavioural change in stable Ubuntu.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote : Posted in a previous version of this proposal

Right Amr, I had the same feeling... So pushed a fix for both this and ubuntu/master

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Pushed few more fixes, this should be now good for being sponsored (unless we don't also want the fix for LP: #1756826, which is on its way).

Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/NEWS b/NEWS
2index 94f1bf4..2084b54 100644
3--- a/NEWS
4+++ b/NEWS
5@@ -1,3 +1,19 @@
6+Major changes in 3.26.4
7+* Fix tab lookup by coordinates in notebook (Ernestas Kulik)
8+* Fix renaming of desktop files (Michael Murphy)
9+* Fix crash on changes on recursive links (Ernestas Kulik, Ernestas Kulik)
10+* Fix crash for non disconnected keybinding (Marco Trevisan)
11+* Update Gtk-placesview code to fix crash (Marco Trevisan)
12+* Avoid a11y related signals flooding on startup (Joanmarie Diggs)
13+* Update flatpak generation for 3.26 (Carlos Soriano)
14+* Fix Memory leaks (Rahul Verma, Wong Heung Sang)
15+* Support dead_tilde key for location entry change (António Fernandes)
16+* Fix middle-click for double-double-click mode (George Mocanu)
17+* Updated Translations
18+
19+Major changes in 3.26.3.1:
20+* Revert accidental backports of behavioral and visual changes
21+
22 Major changes in 3.26.3:
23 * Don’t strip extension from folders in compress dialog (Rahul Verma)
24 * Fix items not being focused when selected in list view (António Fernandes)
25diff --git a/build-aux/flatpak/org.gnome.Nautilus-v3.26.json b/build-aux/flatpak/org.gnome.Nautilus-v3.26.json
26deleted file mode 100644
27index 9cc8cef..0000000
28--- a/build-aux/flatpak/org.gnome.Nautilus-v3.26.json
29+++ /dev/null
30@@ -1,113 +0,0 @@
31-{
32- "app-id": "org.gnome.Nautilus",
33- "runtime": "org.gnome.Platform",
34- "runtime-version": "3.26",
35- "sdk": "org.gnome.Sdk",
36- "command": "nautilus",
37- "finish-args": [
38- "--share=ipc", "--socket=x11",
39- "--socket=wayland",
40- "--talk-name=org.gnome.OnlineAccounts",
41- "--talk-name=org.freedesktop.Tracker1",
42- "--filesystem=home",
43- "--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*",
44- "--filesystem=xdg-run/dconf", "--filesystem=~/.config/dconf:ro",
45- "--talk-name=ca.desrt.dconf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
46- ],
47- "build-options" : {
48- "cflags": "-Wno-deprecated-declarations -Og",
49- "cxxflags": "-Wno-deprecated-declarations -Og"
50- },
51- "cleanup": [ "/include", "/share/bash-completion" ],
52- "modules": [
53- {
54- "name": "libexif",
55- "sources": [
56- {
57- "type": "archive",
58- "url": "https://downloads.sourceforge.net/libexif/libexif-0.6.21.tar.bz2",
59- "sha256": "16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a"
60- },
61- {
62- "type": "shell",
63- "commands": [
64- "cp -f /usr/share/gnu-config/config.sub .",
65- "cp -f /usr/share/gnu-config/config.guess ."
66- ]
67- }
68- ]
69- },
70- {
71- "name": "exempi",
72- "config-opts": [
73- "--disable-unittest"
74- ],
75- "sources": [
76- {
77- "type": "git",
78- "branch": "tags/2.4.2",
79- "commit": "bee83d2636bc875286c22ea092b7f7efb8c222d8",
80- "url": "https://anongit.freedesktop.org/git/exempi.git"
81- }
82- ]
83-
84- },
85- {
86- "name": "tracker",
87- "cleanup": [ "/bin", "/etc", "/libexec" ],
88- "config-opts": [ "--disable-miner-apps", "--disable-static",
89- "--disable-tracker-extract", "--disable-tracker-needle",
90- "--disable-tracker-preferences", "--disable-artwork",
91- "--disable-tracker-writeback", "--disable-miner-user-guides",
92- "--with-bash-completion-dir=no" ],
93- "sources": [
94- {
95- "type": "git",
96- "branch": "tracker-1.12",
97- "url": "https://git.gnome.org/browse/tracker"
98- }
99- ]
100- },
101- {
102- "name": "gnome-desktop",
103- "config-opts": ["--disable-debug-tools", "--disable-udev"],
104- "sources": [
105- {
106- "type": "git",
107- "branch": "gnome-3-26",
108- "url": "https://git.gnome.org/browse/gnome-desktop"
109- }
110- ]
111- },
112- {
113- "name": "gnome-autoar",
114- "sources": [
115- {
116- "type": "git",
117- "branch": "tags/0.2.2",
118- "commit": "6d21fd1b90afb468423b78696f4f0f432033dba5",
119- "url": "https://git.gnome.org/browse/gnome-autoar"
120- }
121- ]
122- },
123- {
124- "buildsystem": "meson",
125- "builddir": true,
126- "name": "nautilus",
127- "config-opts": [
128- "-Denable-desktop=false",
129- "-Denable-selinux=false",
130- "-Denable-xmp=true",
131- "-Denable-exif=true",
132- "--libdir=/app/lib"
133- ],
134- "sources": [
135- {
136- "type": "git",
137- "branch": "gnome-3-26",
138- "url": "https://gitlab.gnome.org/GNOME/nautilus.git"
139- }
140- ]
141- }
142- ]
143-}
144diff --git a/build-aux/flatpak/org.gnome.Nautilus.json b/build-aux/flatpak/org.gnome.Nautilus.json
145new file mode 100644
146index 0000000..3f44aeb
147--- /dev/null
148+++ b/build-aux/flatpak/org.gnome.Nautilus.json
149@@ -0,0 +1,138 @@
150+{
151+ "app-id" : "org.gnome.Nautilus",
152+ "runtime" : "org.gnome.Platform",
153+ "runtime-version" : "3.26",
154+ "sdk" : "org.gnome.Sdk",
155+ "command" : "nautilus",
156+ "tags" : [
157+ "devel",
158+ "development",
159+ "nightly"
160+ ],
161+ "desktop-file-name-prefix" : "(Development) ",
162+ "finish-args" : [
163+ "--share=ipc",
164+ "--socket=x11",
165+ "--socket=wayland",
166+ "--talk-name=org.gnome.OnlineAccounts",
167+ "--talk-name=org.freedesktop.Tracker1",
168+ "--filesystem=home",
169+ "--talk-name=org.gtk.vfs",
170+ "--talk-name=org.gtk.vfs.*",
171+ "--filesystem=xdg-run/dconf",
172+ "--filesystem=~/.config/dconf:ro",
173+ "--talk-name=ca.desrt.dconf",
174+ "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
175+ ],
176+ "build-options" : {
177+ "cflags" : "-Wno-deprecated-declarations -Og",
178+ "cxxflags" : "-Wno-deprecated-declarations -Og",
179+ "env" : {
180+ }
181+ },
182+ "cleanup" : [
183+ "/include",
184+ "/share/bash-completion"
185+ ],
186+ "modules" : [
187+ {
188+ "name" : "libexif",
189+ "sources" : [
190+ {
191+ "type" : "archive",
192+ "url" : "https://downloads.sourceforge.net/libexif/libexif-0.6.21.tar.bz2",
193+ "sha256" : "16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a"
194+ },
195+ {
196+ "type" : "shell",
197+ "commands" : [
198+ "cp -f /usr/share/gnu-config/config.sub .",
199+ "cp -f /usr/share/gnu-config/config.guess ."
200+ ]
201+ }
202+ ]
203+ },
204+ {
205+ "name" : "exempi",
206+ "config-opts" : [
207+ "--disable-unittest"
208+ ],
209+ "sources" : [
210+ {
211+ "type" : "git",
212+ "url" : "https://anongit.freedesktop.org/git/exempi.git",
213+ "tag" : "2.4.5"
214+ }
215+ ]
216+ },
217+ {
218+ "name" : "tracker",
219+ "cleanup" : [
220+ "/bin",
221+ "/etc",
222+ "/libexec"
223+ ],
224+ "config-opts" : [
225+ "--disable-miner-apps",
226+ "--disable-static",
227+ "--disable-tracker-extract",
228+ "--disable-tracker-needle",
229+ "--disable-tracker-preferences",
230+ "--disable-artwork",
231+ "--disable-tracker-writeback",
232+ "--disable-miner-user-guides",
233+ "--with-bash-completion-dir=no"
234+ ],
235+ "sources" : [
236+ {
237+ "type" : "git",
238+ "url" : "https://gitlab.gnome.org/GNOME/tracker.git",
239+ "tag" : "2.0.3"
240+ }
241+ ]
242+ },
243+ {
244+ "name" : "gnome-desktop",
245+ "config-opts" : [
246+ "--disable-debug-tools",
247+ "--disable-udev"
248+ ],
249+ "sources" : [
250+ {
251+ "type" : "git",
252+ "url" : "https://gitlab.gnome.org/GNOME/gnome-desktop.git",
253+ "tag" : "3.26.2"
254+ }
255+ ]
256+ },
257+ {
258+ "name" : "gnome-autoar",
259+ "sources" : [
260+ {
261+ "type" : "git",
262+ "url" : "https://gitlab.gnome.org/GNOME/gnome-autoar.git",
263+ "tag" : "0.2.3"
264+ }
265+ ]
266+ },
267+ {
268+ "buildsystem" : "meson",
269+ "builddir" : true,
270+ "name" : "nautilus",
271+ "config-opts" : [
272+ "-Denable-desktop=false",
273+ "-Denable-selinux=false",
274+ "-Denable-xmp=true",
275+ "-Denable-exif=true",
276+ "--libdir=/app/lib"
277+ ],
278+ "sources" : [
279+ {
280+ "type" : "git",
281+ "url" : "https://gitlab.gnome.org/GNOME/nautilus.git",
282+ "branch" : "gnome-3-26"
283+ }
284+ ]
285+ }
286+ ]
287+}
288\ No newline at end of file
289diff --git a/debian/changelog b/debian/changelog
290index 30d5e5b..935ba5d 100644
291--- a/debian/changelog
292+++ b/debian/changelog
293@@ -1,3 +1,28 @@
294+nautilus (1:3.26.4-0~ubuntu18.04.1) UNRELEASED; urgency=medium
295+
296+ * New upstream release: 3.26.4 (LP: #1782681, LP: #1765776)
297+ * debian/patches/query-add-recursive-flags-and-use-it-in-search-engines.patch,
298+ debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch,
299+ debian/patches/0018-search-engine-add-locate-based-search-engine.patch:
300+ - Follow nautilus settings to search only in current folder (LP: #1767027).
301+ This doesn't apply to gnome-shell search provider for indexed searches.
302+ * debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch:
303+ - Updated to respect upstream requested changes
304+ * debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mounted.patch:
305+ - don't crash if selecting a volume that is not mounted (LP: #1764779)
306+ * debian/patches/file-view-Always-unset-pending_selection-after-freeing-it.patch:
307+ - don't crash when try to select a file multiple times in a single run
308+ (LP: #1713581)
309+ * debian/patches/Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch,
310+ debian/patches/Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch:
311+ - Reverts the reverts introduced in 2.26.3.1 as they are in ubuntu already
312+ * debian/patches/clear_pending_selection.patch,
313+ debian/patches/git_middle_tab.patch,
314+ debian/patches/server_list_segfault.patch:
315+ - Patches removed as they are already applied upstream
316+
317+ -- Marco Trevisan (Treviño) <marco@ubuntu.com> Fri, 20 Jul 2018 04:52:45 +0200
318+
319 nautilus (1:3.26.3-0ubuntu4) bionic; urgency=medium
320
321 * debian/patches/server_list_segfault.patch,
322diff --git a/debian/control.in b/debian/control.in
323index 0d5ed26..19b2ec4 100644
324--- a/debian/control.in
325+++ b/debian/control.in
326@@ -33,7 +33,10 @@ Build-Depends: debhelper (>= 10.3),
327 libunity-dev (>= 5.0.0),
328 libzeitgeist-2.0-dev,
329 Homepage: https://wiki.gnome.org/action/show/Apps/Nautilus
330-Vcs-Bzr: http://code.launchpad.net/~ubuntu-desktop/nautilus/ubuntu
331+XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/nautilus
332+XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/nautilus.git
333+Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/nautilus
334+Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/nautilus -b ubuntu/bionic
335 Standards-Version: 3.9.8
336
337 Package: nautilus
338diff --git a/debian/patches/0001-Respect-gtk-dialogs-use-header-for-all-dialogs.patch b/debian/patches/0001-Respect-gtk-dialogs-use-header-for-all-dialogs.patch
339index 0eda334..35706df 100644
340--- a/debian/patches/0001-Respect-gtk-dialogs-use-header-for-all-dialogs.patch
341+++ b/debian/patches/0001-Respect-gtk-dialogs-use-header-for-all-dialogs.patch
342@@ -1,4 +1,3 @@
343-From d4cd0806f62422fd54e6a77f9c8767388bcb4200 Mon Sep 17 00:00:00 2001
344 From: Iain Lane <iain.lane@canonical.com>
345 Date: Mon, 24 Nov 2014 10:43:18 +0000
346 Subject: [PATCH 1/2] Respect gtk-dialogs-use-header for all dialogs
347@@ -11,6 +10,17 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
348 src/nautilus-properties-window.c | 28 ++++++++++++++++++++++++--
349 src/nautilus-search-popover.c | 18 ++++++++++++++++-
350 6 files changed, 106 insertions(+), 9 deletions(-)
351+---
352+ src/meson.build | 1 +
353+ src/nautilus-file-conflict-dialog.c | 10 +++++++++-
354+ src/nautilus-files-view.c | 38 +++++++++++++++++++++++++++++++++----
355+ src/nautilus-list-view.c | 20 ++++++++++++++++++-
356+ src/nautilus-properties-window.c | 28 +++++++++++++++++++++++++--
357+ src/nautilus-search-popover.c | 18 +++++++++++++++++-
358+ 6 files changed, 106 insertions(+), 9 deletions(-)
359+
360+diff --git a/src/meson.build b/src/meson.build
361+index 59703df..a771d12 100644
362 --- a/src/meson.build
363 +++ b/src/meson.build
364 @@ -266,6 +266,7 @@ nautilus_deps = [glib,
365@@ -21,6 +31,8 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
366 gsettings_desktop_schemas,
367 libgd_dep,
368 gail,
369+diff --git a/src/nautilus-file-conflict-dialog.c b/src/nautilus-file-conflict-dialog.c
370+index fdcaf2d..1b9595d 100644
371 --- a/src/nautilus-file-conflict-dialog.c
372 +++ b/src/nautilus-file-conflict-dialog.c
373 @@ -378,9 +378,17 @@ NautilusFileConflictDialog *
374@@ -42,9 +54,11 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
375 "modal", TRUE,
376 NULL));
377
378+diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
379+index 9b7b9b9..f916b05 100644
380 --- a/src/nautilus-files-view.c
381 +++ b/src/nautilus-files-view.c
382-@@ -1414,16 +1414,30 @@ choose_program (NautilusFilesView *view,
383+@@ -1442,16 +1442,30 @@ choose_program (NautilusFilesView *view,
384 GtkWidget *dialog;
385 g_autofree gchar *mime_type = NULL;
386 GtkWindow *parent_window;
387@@ -78,7 +92,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
388 mime_type);
389 g_object_set_data_full (G_OBJECT (dialog),
390 "directory-view:files",
391-@@ -1628,10 +1642,26 @@ select_pattern (NautilusFilesView *view)
392+@@ -1656,10 +1670,26 @@ select_pattern (NautilusFilesView *view)
393 GtkWidget *grid;
394 GtkWidget *entry;
395 char *example_pattern;
396@@ -106,9 +120,11 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
397 _("_Cancel"),
398 GTK_RESPONSE_CANCEL,
399 _("_Select"),
400+diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
401+index 2a0dfcd..e6b4693 100644
402 --- a/src/nautilus-list-view.c
403 +++ b/src/nautilus-list-view.c
404-@@ -1105,6 +1105,8 @@ sort_column_changed_callback (GtkTreeSor
405+@@ -1106,6 +1106,8 @@ sort_column_changed_callback (GtkTreeSortable *sortable,
406 char *reversed_attr, *default_reversed_attr;
407 gboolean default_sort_reversed;
408
409@@ -117,7 +133,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
410 file = nautilus_files_view_get_directory_as_file (NAUTILUS_FILES_VIEW (view));
411
412 gtk_tree_sortable_get_sort_column_id (sortable, &sort_column_id, &reversed);
413-@@ -3017,15 +3019,31 @@ create_column_editor (NautilusListView *
414+@@ -3035,15 +3037,31 @@ create_column_editor (NautilusListView *view)
415 char *str;
416 char *name;
417 const char *label_text;
418@@ -150,9 +166,11 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
419 NULL, NULL);
420 g_free (str);
421 g_signal_connect (window, "response",
422+diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
423+index d9ccd22..d354780 100644
424 --- a/src/nautilus-properties-window.c
425 +++ b/src/nautilus-properties-window.c
426-@@ -4570,10 +4570,26 @@ on_change_permissions_clicked (GtkWidget
427+@@ -4570,10 +4570,26 @@ on_change_permissions_clicked (GtkWidget *button,
428 GtkWidget *label;
429 GtkWidget *combo;
430 GtkGrid *grid;
431@@ -180,7 +198,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
432 _("_Cancel"), GTK_RESPONSE_CANCEL,
433 _("Change"), GTK_RESPONSE_OK,
434 NULL);
435-@@ -4994,9 +5010,17 @@ create_properties_window (StartupData *s
436+@@ -4994,9 +5010,17 @@ create_properties_window (StartupData *startup_data)
437 {
438 NautilusPropertiesWindow *window;
439 GList *l;
440@@ -199,9 +217,11 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
441 "type-hint", GDK_WINDOW_TYPE_HINT_DIALOG,
442 "modal", TRUE,
443 NULL));
444+diff --git a/src/nautilus-search-popover.c b/src/nautilus-search-popover.c
445+index 2401363..52bee08 100644
446 --- a/src/nautilus-search-popover.c
447 +++ b/src/nautilus-search-popover.c
448-@@ -539,6 +539,22 @@ show_other_types_dialog (NautilusSearchP
449+@@ -547,6 +547,22 @@ show_other_types_dialog (NautilusSearchPopover *popover)
450 GtkCellRenderer *renderer;
451 GtkWidget *toplevel;
452 GtkTreeSelection *selection;
453@@ -224,7 +244,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
454
455 mime_infos = g_content_types_get_registered ();
456
457-@@ -569,7 +585,7 @@ show_other_types_dialog (NautilusSearchP
458+@@ -577,7 +593,7 @@ show_other_types_dialog (NautilusSearchPopover *popover)
459 toplevel = gtk_widget_get_toplevel (GTK_WIDGET (popover));
460 dialog = gtk_dialog_new_with_buttons (_("Select type"),
461 GTK_WINDOW (toplevel),
462diff --git a/debian/patches/0015-tracker-search-engine-don-t-start-it-if-not-availabl.patch b/debian/patches/0015-tracker-search-engine-don-t-start-it-if-not-availabl.patch
463index 4fd9909..4cc55ed 100644
464--- a/debian/patches/0015-tracker-search-engine-don-t-start-it-if-not-availabl.patch
465+++ b/debian/patches/0015-tracker-search-engine-don-t-start-it-if-not-availabl.patch
466@@ -7,7 +7,7 @@ Subject: tracker-search-engine: don't start it if not available on system
467 1 file changed, 20 insertions(+), 4 deletions(-)
468
469 diff --git a/src/nautilus-search-engine-tracker.c b/src/nautilus-search-engine-tracker.c
470-index 4c917dd..8218ea3 100644
471+index 8885ca4..050716d 100644
472 --- a/src/nautilus-search-engine-tracker.c
473 +++ b/src/nautilus-search-engine-tracker.c
474 @@ -42,6 +42,7 @@ struct _NautilusSearchEngineTracker
475@@ -18,7 +18,7 @@ index 4c917dd..8218ea3 100644
476 gboolean recursive;
477 gboolean fts_enabled;
478
479-@@ -305,8 +306,15 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
480+@@ -304,8 +305,15 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
481 return;
482 }
483
484@@ -35,16 +35,16 @@ index 4c917dd..8218ea3 100644
485 tracker->query_pending = TRUE;
486
487 g_object_notify (G_OBJECT (provider), "running");
488-@@ -472,6 +480,9 @@ nautilus_search_engine_tracker_set_query (NautilusSearchProvider *provider,
489+@@ -471,6 +479,9 @@ nautilus_search_engine_tracker_set_query (NautilusSearchProvider *provider,
490
491- tracker = NAUTILUS_SEARCH_ENGINE_TRACKER (provider);
492+ g_clear_object (&tracker->query);
493
494 + if (!tracker->available)
495 + return;
496 +
497- g_object_ref (query);
498- g_clear_object (&tracker->query);
499- tracker->query = query;
500+ tracker->query = g_object_ref (query);
501+ tracker->recursive = is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED,
502+ nautilus_query_get_recursive (query),
503 @@ -539,16 +550,21 @@ static void
504 nautilus_search_engine_tracker_init (NautilusSearchEngineTracker *engine)
505 {
506diff --git a/debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch b/debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch
507index 1a4ee1c..f80997f 100644
508--- a/debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch
509+++ b/debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch
510@@ -1,25 +1,34 @@
511 From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
512 Date: Wed, 21 Feb 2018 17:05:51 +0100
513 Subject: search-engine: add a recent-search-engine listing GtkRecentManager
514- stuff
515+ entries
516
517-Using GtkRecent items as search engine source in nautilus
518+Using GtkRecent items as search engine source in nautilus.
519+The main reason for this, is being able to get fast results on recently-used
520+files from the shell search provider.
521+
522+This is disabled when recursive searches are disabled, as there's no need to go
523+through for recent files if no recursive (or indexed) search is enabled as the
524+simple engine will be already fast enough, while running this engine could be
525+just a waste.
526+
527+Origin: upstream
528+Applied-Upstream: https://gitlab.gnome.org/GNOME/nautilus/commit/69686372fd6e6
529 ---
530 src/meson.build | 2 +
531- src/nautilus-file.h | 1 +
532- src/nautilus-search-engine-recent.c | 385 ++++++++++++++++++++++++++++++++++++
533- src/nautilus-search-engine-recent.h | 36 ++++
534- src/nautilus-search-engine.c | 11 ++
535- 5 files changed, 435 insertions(+)
536+ src/nautilus-search-engine-recent.c | 427 ++++++++++++++++++++++++++++++++++++
537+ src/nautilus-search-engine-recent.h | 36 +++
538+ src/nautilus-search-engine.c | 11 +
539+ 4 files changed, 476 insertions(+)
540 create mode 100644 src/nautilus-search-engine-recent.c
541 create mode 100644 src/nautilus-search-engine-recent.h
542
543 diff --git a/src/meson.build b/src/meson.build
544-index a771d12..0ea9165 100644
545+index 73aafe9..213b35f 100644
546 --- a/src/meson.build
547 +++ b/src/meson.build
548-@@ -228,6 +228,8 @@ libnautilus_sources = [
549- 'nautilus-search-engine.h',
550+@@ -229,6 +229,8 @@ libnautilus_sources = [
551+ 'nautilus-search-engine-private.h',
552 'nautilus-search-engine-model.c',
553 'nautilus-search-engine-model.h',
554 + 'nautilus-search-engine-recent.c',
555@@ -27,24 +36,12 @@ index a771d12..0ea9165 100644
556 'nautilus-search-engine-simple.c',
557 'nautilus-search-engine-simple.h',
558 'nautilus-search-hit.c',
559-diff --git a/src/nautilus-file.h b/src/nautilus-file.h
560-index 3a83bd4..fd72d7a 100644
561---- a/src/nautilus-file.h
562-+++ b/src/nautilus-file.h
563-@@ -49,6 +49,7 @@ typedef struct NautilusFile NautilusFile;
564- (G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_FILE))
565- #define NAUTILUS_FILE_GET_CLASS(obj) \
566- (G_TYPE_INSTANCE_GET_CLASS ((obj), NAUTILUS_TYPE_FILE, NautilusFileClass))
567-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (NautilusFile, g_object_unref)
568-
569- typedef enum {
570- NAUTILUS_FILE_SORT_NONE,
571 diff --git a/src/nautilus-search-engine-recent.c b/src/nautilus-search-engine-recent.c
572 new file mode 100644
573-index 0000000..f052e8f
574+index 0000000..bbd0d82
575 --- /dev/null
576 +++ b/src/nautilus-search-engine-recent.c
577-@@ -0,0 +1,385 @@
578+@@ -0,0 +1,427 @@
579 +/*
580 + * Copyright (C) 2018 Canonical Ltd
581 + *
582@@ -69,6 +66,7 @@ index 0000000..f052e8f
583 +#include "nautilus-search-hit.h"
584 +#include "nautilus-search-provider.h"
585 +#include "nautilus-search-engine-recent.h"
586++#include "nautilus-search-engine-private.h"
587 +#include "nautilus-ui-utilities.h"
588 +#define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
589 +#include "nautilus-debug.h"
590@@ -161,6 +159,51 @@ index 0000000..f052e8f
591 + return FALSE;
592 +}
593 +
594++static gboolean
595++is_file_valid_recursive (NautilusSearchEngineRecent *self,
596++ GFile *file,
597++ GError **error)
598++{
599++ g_autofree gchar *path = NULL;
600++ g_autoptr (GFileInfo) file_info = NULL;
601++
602++ file_info = g_file_query_info (file, FILE_ATTRIBS,
603++ G_FILE_QUERY_INFO_NONE,
604++ self->cancellable, error);
605++ if (*error != NULL)
606++ {
607++ return FALSE;
608++ }
609++
610++ if (!g_file_info_get_attribute_boolean (file_info,
611++ G_FILE_ATTRIBUTE_ACCESS_CAN_READ))
612++ {
613++ return FALSE;
614++ }
615++
616++ path = g_file_get_path (file);
617++
618++ if (!nautilus_query_get_show_hidden_files (self->query))
619++ {
620++ if (!g_file_info_get_is_hidden (file_info) &&
621++ !g_file_info_get_is_backup (file_info))
622++ {
623++ g_autoptr (GFile) parent = g_file_get_parent (file);
624++
625++ if (parent)
626++ {
627++ return is_file_valid_recursive (self, parent, error);
628++ }
629++ }
630++ else
631++ {
632++ return FALSE;
633++ }
634++ }
635++
636++ return TRUE;
637++}
638++
639 +static gpointer
640 +recent_thread_func (gpointer user_data)
641 +{
642@@ -199,44 +242,24 @@ index 0000000..f052e8f
643 +
644 + if (gtk_recent_info_is_local (info))
645 + {
646-+ g_autofree gchar *path = NULL;
647-+ g_autoptr (GFileInfo) file_info = NULL;
648 + g_autoptr (GError) error = NULL;
649 +
650-+ file_info = g_file_query_info (file, FILE_ATTRIBS,
651-+ G_FILE_QUERY_INFO_NONE,
652-+ self->cancellable, &error);
653-+ if (error != NULL)
654++ if (!is_file_valid_recursive (self, file, &error))
655 + {
656 + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
657 + {
658 + break;
659 + }
660 +
661-+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS))
662++ if (error != NULL &&
663++ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS))
664 + {
665-+ g_debug("Impossible to read locate file info: %s",
666++ g_debug("Impossible to read recent file info: %s",
667 + error->message);
668 + }
669 +
670 + continue;
671 + }
672-+
673-+ if (!g_file_info_get_attribute_boolean (file_info,
674-+ G_FILE_ATTRIBUTE_ACCESS_CAN_READ))
675-+ {
676-+ continue;
677-+ }
678-+
679-+ path = g_file_get_path (file);
680-+
681-+ if (!nautilus_query_get_show_hidden_files (self->query) &&
682-+ (g_file_info_get_is_hidden (file_info) ||
683-+ g_file_info_get_is_backup (file_info) ||
684-+ g_strrstr (path, G_DIR_SEPARATOR_S ".") != NULL))
685-+ {
686-+ continue;
687-+ }
688 + }
689 +
690 + if (g_cancellable_is_cancelled (self->cancellable))
691@@ -333,6 +356,7 @@ index 0000000..f052e8f
692 +nautilus_search_engine_recent_start (NautilusSearchProvider *provider)
693 +{
694 + NautilusSearchEngineRecent *self = NAUTILUS_SEARCH_ENGINE_RECENT (provider);
695++ g_autoptr (GFile) location = NULL;
696 + GThread *thread;
697 +
698 + g_return_if_fail (self->query);
699@@ -340,6 +364,21 @@ index 0000000..f052e8f
700 +
701 + g_object_ref (self);
702 + g_object_ref (self->query);
703++
704++ location = nautilus_query_get_location (self->query);
705++
706++ if (!is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED,
707++ nautilus_query_get_recursive (self->query),
708++ location))
709++ {
710++ SearchHitsData *search_hits;
711++ search_hits = g_new0 (SearchHitsData, 1);
712++ search_hits->recent = self;
713++
714++ g_idle_add (search_thread_add_hits_idle, search_hits);
715++ return;
716++ }
717++
718 + self->cancellable = g_cancellable_new ();
719 +
720 + thread = g_thread_new ("nautilus-search-recent", recent_thread_func, self);
721@@ -473,18 +512,16 @@ index 0000000..bcd73b9
722 +
723 +#endif /* __NAUTILUS_SEARCH_ENGINE_RECENT_H__ */
724 diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c
725-index 209bd4f..aef91b7 100644
726+index 3a0c9d4..793b831 100644
727 --- a/src/nautilus-search-engine.c
728 +++ b/src/nautilus-search-engine.c
729-@@ -24,6 +24,7 @@
730- #include <glib/gi18n.h>
731- #include "nautilus-search-provider.h"
732- #include "nautilus-search-engine.h"
733-+#include "nautilus-search-engine-recent.h"
734- #include "nautilus-search-engine-simple.h"
735- #include "nautilus-search-engine-model.h"
736+@@ -30,11 +30,13 @@
737 #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
738-@@ -33,6 +34,7 @@
739+ #include "nautilus-debug.h"
740+ #include "nautilus-search-engine-simple.h"
741++#include "nautilus-search-engine-recent.h"
742+ #include "nautilus-search-engine-tracker.h"
743+
744 typedef struct
745 {
746 NautilusSearchEngineTracker *tracker;
747@@ -492,7 +529,7 @@ index 209bd4f..aef91b7 100644
748 NautilusSearchEngineSimple *simple;
749 NautilusSearchEngineModel *model;
750
751-@@ -74,6 +76,7 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider,
752+@@ -76,6 +78,7 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider,
753 priv = nautilus_search_engine_get_instance_private (engine);
754
755 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->tracker), query);
756@@ -500,7 +537,7 @@ index 209bd4f..aef91b7 100644
757 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->model), query);
758 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->simple), query);
759 }
760-@@ -98,6 +101,9 @@ search_engine_start_real (NautilusSearchEngine *engine)
761+@@ -100,6 +103,9 @@ search_engine_start_real (NautilusSearchEngine *engine)
762 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->tracker));
763 priv->providers_running++;
764
765@@ -510,7 +547,7 @@ index 209bd4f..aef91b7 100644
766 if (nautilus_search_engine_model_get_model (priv->model))
767 {
768 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->model));
769-@@ -159,6 +165,7 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider)
770+@@ -161,6 +167,7 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider)
771 DEBUG ("Search engine stop");
772
773 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->tracker));
774@@ -518,7 +555,7 @@ index 209bd4f..aef91b7 100644
775 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->model));
776 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->simple));
777
778-@@ -334,6 +341,7 @@ nautilus_search_engine_finalize (GObject *object)
779+@@ -336,6 +343,7 @@ nautilus_search_engine_finalize (GObject *object)
780 g_hash_table_destroy (priv->uris);
781
782 g_clear_object (&priv->tracker);
783@@ -526,7 +563,7 @@ index 209bd4f..aef91b7 100644
784 g_clear_object (&priv->model);
785 g_clear_object (&priv->simple);
786
787-@@ -395,6 +403,9 @@ nautilus_search_engine_init (NautilusSearchEngine *engine)
788+@@ -397,6 +405,9 @@ nautilus_search_engine_init (NautilusSearchEngine *engine)
789
790 priv->simple = nautilus_search_engine_simple_new ();
791 connect_provider_signals (engine, NAUTILUS_SEARCH_PROVIDER (priv->simple));
792diff --git a/debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch b/debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch
793index 99abe37..e6185da 100644
794--- a/debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch
795+++ b/debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch
796@@ -1,5 +1,5 @@
797 From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
798-Date: Wed, 11 Apr 2018 18:51:34 -0400
799+Date: Thu, 12 Apr 2018 00:51:34 +0200
800 Subject: recent: add function to update manager on file rename or move
801
802 When files have been moved or renamed nautilus should inform
803@@ -7,13 +7,13 @@ recent manager about this change for the files that
804 are listed there.
805 ---
806 src/nautilus-directory.c | 8 +++
807- src/nautilus-file.c | 25 +++++-----
808- src/nautilus-recent.c | 126 +++++++++++++++++++++++++++++++++++++++++++++++
809+ src/nautilus-file.c | 25 +++++----
810+ src/nautilus-recent.c | 132 +++++++++++++++++++++++++++++++++++++++++++++++
811 src/nautilus-recent.h | 8 ++-
812- 4 files changed, 152 insertions(+), 15 deletions(-)
813+ 4 files changed, 158 insertions(+), 15 deletions(-)
814
815 diff --git a/src/nautilus-directory.c b/src/nautilus-directory.c
816-index ad3bb03..f1a3bf8 100644
817+index 19316e8..9bb5460 100644
818 --- a/src/nautilus-directory.c
819 +++ b/src/nautilus-directory.c
820 @@ -33,6 +33,7 @@
821@@ -24,7 +24,7 @@ index ad3bb03..f1a3bf8 100644
822 #include "nautilus-vfs-directory.h"
823 #include <eel/eel-glib-extensions.h>
824 #include <eel/eel-string.h>
825-@@ -1546,9 +1547,14 @@ nautilus_directory_notify_files_moved (GList *file_pairs)
826+@@ -1560,9 +1561,14 @@ nautilus_directory_notify_files_moved (GList *file_pairs)
827
828 for (p = file_pairs; p != NULL; p = p->next)
829 {
830@@ -39,7 +39,7 @@ index ad3bb03..f1a3bf8 100644
831
832 /* Handle overwriting a file. */
833 file = nautilus_file_get_existing (to_location);
834-@@ -1626,6 +1632,8 @@ nautilus_directory_notify_files_moved (GList *file_pairs)
835+@@ -1645,6 +1651,8 @@ nautilus_directory_notify_files_moved (GList *file_pairs)
836 /* Unref each file once to balance out nautilus_file_get_by_uri. */
837 unref_list = g_list_prepend (unref_list, file);
838 }
839@@ -49,7 +49,7 @@ index ad3bb03..f1a3bf8 100644
840
841 /* Now send out the changed and added signals for existing file objects. */
842 diff --git a/src/nautilus-file.c b/src/nautilus-file.c
843-index 2135801..15e5d05 100644
844+index 63413a6..9416214 100644
845 --- a/src/nautilus-file.c
846 +++ b/src/nautilus-file.c
847 @@ -34,6 +34,7 @@
848@@ -60,7 +60,7 @@ index 2135801..15e5d05 100644
849 #include "nautilus-thumbnails.h"
850 #include "nautilus-ui-utilities.h"
851 #include "nautilus-video-mime-types.h"
852-@@ -1952,14 +1953,12 @@ rename_get_info_callback (GObject *source_object,
853+@@ -1960,14 +1961,12 @@ rename_get_info_callback (GObject *source_object,
854 GAsyncResult *res,
855 gpointer callback_data)
856 {
857@@ -77,7 +77,7 @@ index 2135801..15e5d05 100644
858
859 op = callback_data;
860
861-@@ -1967,8 +1966,12 @@ rename_get_info_callback (GObject *source_object,
862+@@ -1975,8 +1974,12 @@ rename_get_info_callback (GObject *source_object,
863 new_info = g_file_query_info_finish (G_FILE (source_object), res, &error);
864 if (new_info != NULL)
865 {
866@@ -91,7 +91,7 @@ index 2135801..15e5d05 100644
867 new_name = g_file_info_get_name (new_info);
868
869 /* If there was another file by the same name in this
870-@@ -1983,6 +1986,7 @@ rename_get_info_callback (GObject *source_object,
871+@@ -1991,6 +1994,7 @@ rename_get_info_callback (GObject *source_object,
872 }
873
874 old_uri = nautilus_file_get_uri (op->file);
875@@ -99,7 +99,7 @@ index 2135801..15e5d05 100644
876
877 update_info_and_name (op->file, new_info);
878
879-@@ -2010,9 +2014,10 @@ rename_get_info_callback (GObject *source_object,
880+@@ -2018,9 +2022,10 @@ rename_get_info_callback (GObject *source_object,
881 g_object_unref (subject);
882 g_free (origin);
883
884@@ -112,7 +112,7 @@ index 2135801..15e5d05 100644
885
886 /* the rename could have affected the display name if e.g.
887 * we're in a vfolder where the name comes from a desktop file
888-@@ -2024,14 +2029,8 @@ rename_get_info_callback (GObject *source_object,
889+@@ -2032,14 +2037,8 @@ rename_get_info_callback (GObject *source_object,
890 NAUTILUS_FILE_ATTRIBUTE_INFO |
891 NAUTILUS_FILE_ATTRIBUTE_LINK_INFO);
892 }
893@@ -128,17 +128,18 @@ index 2135801..15e5d05 100644
894
895 static void
896 diff --git a/src/nautilus-recent.c b/src/nautilus-recent.c
897-index ab50fef..c69a3a7 100644
898+index ab50fef..6676465 100644
899 --- a/src/nautilus-recent.c
900 +++ b/src/nautilus-recent.c
901-@@ -1,5 +1,6 @@
902+@@ -1,5 +1,7 @@
903 /*
904 * Copyright (C) 2002 James Willcox
905 + * Copyright (C) 2018 Canonical Ltd
906++ * Copyright (C) 2018 Marco Trevisan
907 *
908 * This program is free software; you can redistribute it and/or modify
909 * it under the terms of the GNU General Public License as published by
910-@@ -17,6 +18,7 @@
911+@@ -17,6 +19,7 @@
912
913 #include "config.h"
914 #include "nautilus-recent.h"
915@@ -146,16 +147,16 @@ index ab50fef..c69a3a7 100644
916
917 #include <eel/eel-vfs-extensions.h>
918
919-@@ -85,3 +87,127 @@ nautilus_recent_add_file (NautilusFile *file,
920+@@ -85,3 +88,132 @@ nautilus_recent_add_file (NautilusFile *file,
921
922 g_free (uri);
923 }
924 +
925 +void
926-+nautilus_recent_update_file_moved (const gchar *old_uri,
927-+ const gchar *new_uri,
928-+ const gchar *old_display_name,
929-+ const gchar *new_display_name)
930++nautilus_recent_update_file_moved (const gchar *old_uri,
931++ const gchar *new_uri,
932++ const gchar *old_display_name,
933++ const gchar *new_display_name)
934 +{
935 + GtkRecentManager *recent_manager = nautilus_recent_get_manager ();
936 + g_autoptr (NautilusFile) file = NULL;
937@@ -191,9 +192,11 @@ index ab50fef..c69a3a7 100644
938 +
939 + if (nautilus_file_is_directory (file))
940 + {
941++ g_autoptr (GFile) location = NULL;
942 + GList *recent_items;
943 + GList *l;
944 +
945++ location = g_file_new_for_uri (old_uri);
946 + recent_items = gtk_recent_manager_get_items (recent_manager);
947 +
948 + for (l = recent_items; l; l = l->next)
949@@ -203,9 +206,12 @@ index ab50fef..c69a3a7 100644
950 +
951 + if (g_str_has_prefix (item_uri, old_uri))
952 + {
953-+ const gchar *relative_path = item_uri + strlen (old_uri);
954++ g_autoptr (GFile) item_file = NULL;
955++ g_autofree gchar *relative_path = NULL;
956 + g_autofree gchar *new_item_uri = NULL;
957 +
958++ item_file = g_file_new_for_uri (item_uri);
959++ relative_path = g_file_get_relative_path (location, item_file);
960 + new_item_uri = g_build_filename (new_uri, relative_path, NULL);
961 +
962 + gtk_recent_manager_move_item (recent_manager,
963diff --git a/debian/patches/0018-search-engine-add-locate-based-search-engine.patch b/debian/patches/0018-search-engine-add-locate-based-search-engine.patch
964index 5140963..91a7ec0 100644
965--- a/debian/patches/0018-search-engine-add-locate-based-search-engine.patch
966+++ b/debian/patches/0018-search-engine-add-locate-based-search-engine.patch
967@@ -7,19 +7,19 @@ command line and parsing output to provide more and
968 quicker results to the shell and nautilus
969 ---
970 src/meson.build | 2 +
971- src/nautilus-search-engine-locate.c | 597 ++++++++++++++++++++++++++++++++++++
972+ src/nautilus-search-engine-locate.c | 601 ++++++++++++++++++++++++++++++++++++
973 src/nautilus-search-engine-locate.h | 37 +++
974 src/nautilus-search-engine.c | 11 +
975- 4 files changed, 647 insertions(+)
976+ 4 files changed, 651 insertions(+)
977 create mode 100644 src/nautilus-search-engine-locate.c
978 create mode 100644 src/nautilus-search-engine-locate.h
979
980 diff --git a/src/meson.build b/src/meson.build
981-index 0ea9165..06e6633 100644
982+index 213b35f..a0bf109 100644
983 --- a/src/meson.build
984 +++ b/src/meson.build
985-@@ -228,6 +228,8 @@ libnautilus_sources = [
986- 'nautilus-search-engine.h',
987+@@ -229,6 +229,8 @@ libnautilus_sources = [
988+ 'nautilus-search-engine-private.h',
989 'nautilus-search-engine-model.c',
990 'nautilus-search-engine-model.h',
991 + 'nautilus-search-engine-locate.c',
992@@ -29,10 +29,10 @@ index 0ea9165..06e6633 100644
993 'nautilus-search-engine-simple.c',
994 diff --git a/src/nautilus-search-engine-locate.c b/src/nautilus-search-engine-locate.c
995 new file mode 100644
996-index 0000000..16f9f21
997+index 0000000..d152a23
998 --- /dev/null
999 +++ b/src/nautilus-search-engine-locate.c
1000-@@ -0,0 +1,597 @@
1001+@@ -0,0 +1,601 @@
1002 +/*
1003 + * Copyright (C) 2018 Canonical Ltd
1004 + *
1005@@ -57,6 +57,7 @@ index 0000000..16f9f21
1006 +#include "nautilus-search-hit.h"
1007 +#include "nautilus-search-provider.h"
1008 +#include "nautilus-search-engine-locate.h"
1009++#include "nautilus-search-engine-private.h"
1010 +#include "nautilus-ui-utilities.h"
1011 +#define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
1012 +#include "nautilus-debug.h"
1013@@ -452,7 +453,12 @@ index 0000000..16f9f21
1014 + sdata = g_new0 (LocateSearchData, 1);
1015 + sdata->locate = g_object_ref (self);
1016 +
1017-+ if (!(self->locate_features & LOCATE_INSTALLED))
1018++ query_location = nautilus_query_get_location (self->query);
1019++
1020++ if (!(self->locate_features & LOCATE_INSTALLED) ||
1021++ !is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED,
1022++ nautilus_query_get_recursive (self->query),
1023++ query_location))
1024 + {
1025 + g_idle_add ((GSourceFunc) submit_results, sdata);
1026 + return;
1027@@ -493,8 +499,6 @@ index 0000000..16f9f21
1028 + return;
1029 + }
1030 +
1031-+ query_location = nautilus_query_get_location (self->query);
1032-+
1033 + sdata->query = g_object_ref (self->query);
1034 + sdata->date_range = nautilus_query_get_date_range (self->query);
1035 + sdata->mime_types = nautilus_query_get_mime_types (self->query);
1036@@ -674,18 +678,18 @@ index 0000000..ac5e3fc
1037 +
1038 +#endif /* __NAUTILUS_SEARCH_ENGINE_LOCATE_H__ */
1039 diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c
1040-index aef91b7..bf0e85d 100644
1041+index 793b831..902d483 100644
1042 --- a/src/nautilus-search-engine.c
1043 +++ b/src/nautilus-search-engine.c
1044-@@ -25,6 +25,7 @@
1045- #include "nautilus-search-provider.h"
1046- #include "nautilus-search-engine.h"
1047- #include "nautilus-search-engine-recent.h"
1048+@@ -29,6 +29,7 @@
1049+ #include <glib/gi18n.h>
1050+ #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
1051+ #include "nautilus-debug.h"
1052 +#include "nautilus-search-engine-locate.h"
1053 #include "nautilus-search-engine-simple.h"
1054- #include "nautilus-search-engine-model.h"
1055- #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
1056-@@ -35,6 +36,7 @@ typedef struct
1057+ #include "nautilus-search-engine-recent.h"
1058+ #include "nautilus-search-engine-tracker.h"
1059+@@ -37,6 +38,7 @@ typedef struct
1060 {
1061 NautilusSearchEngineTracker *tracker;
1062 NautilusSearchEngineRecent *recent;
1063@@ -693,7 +697,7 @@ index aef91b7..bf0e85d 100644
1064 NautilusSearchEngineSimple *simple;
1065 NautilusSearchEngineModel *model;
1066
1067-@@ -77,6 +79,7 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider,
1068+@@ -79,6 +81,7 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider,
1069
1070 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->tracker), query);
1071 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->recent), query);
1072@@ -701,7 +705,7 @@ index aef91b7..bf0e85d 100644
1073 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->model), query);
1074 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->simple), query);
1075 }
1076-@@ -104,6 +107,9 @@ search_engine_start_real (NautilusSearchEngine *engine)
1077+@@ -106,6 +109,9 @@ search_engine_start_real (NautilusSearchEngine *engine)
1078 priv->providers_running++;
1079 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->recent));
1080
1081@@ -711,7 +715,7 @@ index aef91b7..bf0e85d 100644
1082 if (nautilus_search_engine_model_get_model (priv->model))
1083 {
1084 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->model));
1085-@@ -166,6 +172,7 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider)
1086+@@ -168,6 +174,7 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider)
1087
1088 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->tracker));
1089 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->recent));
1090@@ -719,7 +723,7 @@ index aef91b7..bf0e85d 100644
1091 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->model));
1092 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->simple));
1093
1094-@@ -342,6 +349,7 @@ nautilus_search_engine_finalize (GObject *object)
1095+@@ -344,6 +351,7 @@ nautilus_search_engine_finalize (GObject *object)
1096
1097 g_clear_object (&priv->tracker);
1098 g_clear_object (&priv->recent);
1099@@ -727,7 +731,7 @@ index aef91b7..bf0e85d 100644
1100 g_clear_object (&priv->model);
1101 g_clear_object (&priv->simple);
1102
1103-@@ -406,6 +414,9 @@ nautilus_search_engine_init (NautilusSearchEngine *engine)
1104+@@ -408,6 +416,9 @@ nautilus_search_engine_init (NautilusSearchEngine *engine)
1105
1106 priv->recent = nautilus_search_engine_recent_new ();
1107 connect_provider_signals (engine, NAUTILUS_SEARCH_PROVIDER (priv->recent));
1108diff --git a/debian/patches/03_translations_list_update.patch b/debian/patches/03_translations_list_update.patch
1109index bd2e0fd..7fc36f0 100644
1110--- a/debian/patches/03_translations_list_update.patch
1111+++ b/debian/patches/03_translations_list_update.patch
1112@@ -1,10 +1,16 @@
1113+From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
1114+Date: Fri, 20 Jul 2018 03:25:37 +0200
1115+Subject: _translations_list_update
1116+
1117 ---
1118- po/POTFILES.in | 2 ++
1119+ po/POTFILES.in | 2 ++
1120 1 file changed, 2 insertions(+)
1121
1122+diff --git a/po/POTFILES.in b/po/POTFILES.in
1123+index 277a7ff..2960c09 100644
1124 --- a/po/POTFILES.in
1125 +++ b/po/POTFILES.in
1126-@@ -4,6 +4,8 @@ data/nautilus-autorun-software.desktop.i
1127+@@ -4,6 +4,8 @@ data/nautilus-autorun-software.desktop.in
1128 data/org.gnome.Nautilus.appdata.xml.in
1129 data/org.gnome.Nautilus.desktop.in
1130 data/org.gnome.nautilus.gschema.xml
1131diff --git a/debian/patches/04_suppress_umount_in_ltsp.patch b/debian/patches/04_suppress_umount_in_ltsp.patch
1132index bff103d..2bba6bb 100644
1133--- a/debian/patches/04_suppress_umount_in_ltsp.patch
1134+++ b/debian/patches/04_suppress_umount_in_ltsp.patch
1135@@ -1,4 +1,3 @@
1136-From 81825762ca8f8535f04f8e4ee273d443657ad121 Mon Sep 17 00:00:00 2001
1137 From: Jeremy Bicha <jbicha@ubuntu.com>
1138 Date: Thu, 27 Apr 2017 20:30:13 -0400
1139 Subject: file: Don't offer to eject or unmount LTSP volumes
1140@@ -11,10 +10,10 @@ Bug-Ubuntu: https://launchpad.net/bugs/220564
1141 1 file changed, 10 insertions(+)
1142
1143 diff --git a/src/nautilus-file.c b/src/nautilus-file.c
1144-index e7e96dc86..89748973f 100644
1145+index adbf081..3a7c9a4 100644
1146 --- a/src/nautilus-file.c
1147 +++ b/src/nautilus-file.c
1148-@@ -1116,6 +1116,11 @@ nautilus_file_can_unmount (NautilusFile *file)
1149+@@ -1128,6 +1128,11 @@ nautilus_file_can_unmount (NautilusFile *file)
1150 {
1151 g_return_val_if_fail (NAUTILUS_IS_FILE (file), FALSE);
1152
1153@@ -26,7 +25,7 @@ index e7e96dc86..89748973f 100644
1154 return file->details->can_unmount ||
1155 (file->details->mount != NULL &&
1156 g_mount_can_unmount (file->details->mount));
1157-@@ -1126,6 +1131,11 @@ nautilus_file_can_eject (NautilusFile *file)
1158+@@ -1138,6 +1143,11 @@ nautilus_file_can_eject (NautilusFile *file)
1159 {
1160 g_return_val_if_fail (NAUTILUS_IS_FILE (file), FALSE);
1161
1162diff --git a/debian/patches/06_never_exec_nonexec_launchers.patch b/debian/patches/06_never_exec_nonexec_launchers.patch
1163index c1733b5..5aedf36 100644
1164--- a/debian/patches/06_never_exec_nonexec_launchers.patch
1165+++ b/debian/patches/06_never_exec_nonexec_launchers.patch
1166@@ -1,4 +1,3 @@
1167-From 75a0e1c62203ef362437ce4fdf1fc93ec5cf147c Mon Sep 17 00:00:00 2001
1168 From: Jeremy Bicha <jbicha@ubuntu.com>
1169 Date: Sun, 30 Apr 2017 21:28:31 -0400
1170 Subject: [PATCH] Require executable permission for launchers in home dir
1171@@ -10,10 +9,10 @@ https://wiki.ubuntu.com/SecurityTeam/Policies#Execute-Permission_Bit_Required
1172 1 file changed, 1 insertion(+), 1 deletion(-)
1173
1174 diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
1175-index 14fe44bc3..0c6364986 100644
1176+index 8827160..894f0ea 100644
1177 --- a/src/nautilus-mime-actions.c
1178 +++ b/src/nautilus-mime-actions.c
1179-@@ -1606,7 +1606,7 @@ activate_desktop_file (ActivateParameters *parameters,
1180+@@ -1513,7 +1513,7 @@ activate_desktop_file (ActivateParameters *parameters,
1181 _("_Cancel"), GTK_RESPONSE_CANCEL);
1182
1183 gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
1184diff --git a/debian/patches/12_unity_launcher_support.patch b/debian/patches/12_unity_launcher_support.patch
1185index 2d9f54d..180934e 100644
1186--- a/debian/patches/12_unity_launcher_support.patch
1187+++ b/debian/patches/12_unity_launcher_support.patch
1188@@ -32,7 +32,7 @@ index 4f5cb58..9ddb88d 100644
1189 #mesondefine ENABLE_PACKAGEKIT
1190 #mesondefine LOCALEDIR
1191 diff --git a/meson.build b/meson.build
1192-index 18e645a..495101f 100644
1193+index 0b8a6f1..4d2acf2 100644
1194 --- a/meson.build
1195 +++ b/meson.build
1196 @@ -30,6 +30,8 @@ exempi_ver = '>=2.1.0'
1197@@ -94,7 +94,7 @@ index cc08345..59703df 100644
1198 nautilus_deps += exempi
1199 endif
1200 diff --git a/src/nautilus-application.c b/src/nautilus-application.c
1201-index 98e6f35..ae19115 100644
1202+index 3ccbf54..b62cfab 100644
1203 --- a/src/nautilus-application.c
1204 +++ b/src/nautilus-application.c
1205 @@ -54,6 +54,10 @@
1206diff --git a/debian/patches/18_unity_icon_color.patch b/debian/patches/18_unity_icon_color.patch
1207index b476d5a..0956765 100644
1208--- a/debian/patches/18_unity_icon_color.patch
1209+++ b/debian/patches/18_unity_icon_color.patch
1210@@ -1,12 +1,17 @@
1211-Description: specify a background color for the unity launcher icon
1212+From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
1213+Date: Fri, 20 Jul 2018 03:25:37 +0200
1214+Subject: specify a background color for the unity launcher icon
1215+
1216 Bug: https://launchpad.net/bugs/1081691
1217 ---
1218- data/org.gnome.Nautilus.desktop.in | 1 +
1219+ data/org.gnome.Nautilus.desktop.in | 1 +
1220 1 file changed, 1 insertion(+)
1221
1222+diff --git a/data/org.gnome.Nautilus.desktop.in b/data/org.gnome.Nautilus.desktop.in
1223+index b7be676..ad67456 100644
1224 --- a/data/org.gnome.Nautilus.desktop.in
1225 +++ b/data/org.gnome.Nautilus.desktop.in
1226-@@ -14,6 +14,7 @@ Categories=GNOME;GTK;Utility;Core;FileMa
1227+@@ -14,6 +14,7 @@ Categories=GNOME;GTK;Utility;Core;FileManager;
1228 MimeType=inode/directory;application/x-7z-compressed;application/x-7z-compressed-tar;application/x-bzip;application/x-bzip-compressed-tar;application/x-compress;application/x-compressed-tar;application/x-cpio;application/x-gzip;application/x-lha;application/x-lzip;application/x-lzip-compressed-tar;application/x-lzma;application/x-lzma-compressed-tar;application/x-tar;application/x-tarz;application/x-xar;application/x-xz;application/x-xz-compressed-tar;application/zip;application/gzip;application/bzip2;
1229 X-GNOME-UsesNotifications=true
1230 Actions=new-window;
1231diff --git a/debian/patches/19_unity_open_location_xid.patch b/debian/patches/19_unity_open_location_xid.patch
1232index 57403d0..bc37956 100644
1233--- a/debian/patches/19_unity_open_location_xid.patch
1234+++ b/debian/patches/19_unity_open_location_xid.patch
1235@@ -1,19 +1,22 @@
1236-Description: Add a new dbus property to the nautilus'
1237- "org.freedesktop.FileManager1" dbus interface where it stores the lists of
1238- opened locations referenced by their parent nautilus window XID.
1239+From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
1240+Date: Fri, 20 Jul 2018 03:25:37 +0200
1241+Subject: Add a new dbus property to the nautilus'
1242
1243+"org.freedesktop.FileManager1" dbus interface where it stores the lists of
1244+opened locations referenced by their parent nautilus window XID.
1245 Bug-Ubuntu: https://bugs.launchpad.net/unity/+bug/887449
1246 Forwarded: no
1247 Author: Marco Trevisan <marco@ubuntu.com>
1248-
1249 ---
1250- data/freedesktop-dbus-interfaces.xml | 1
1251- src/nautilus-application.c | 78 ++++++++++++++++++++++++++++++++---
1252- src/nautilus-application.h | 2
1253- src/nautilus-freedesktop-dbus.c | 21 ++++++++-
1254- src/nautilus-freedesktop-dbus.h | 1
1255+ data/freedesktop-dbus-interfaces.xml | 1 +
1256+ src/nautilus-application.c | 78 +++++++++++++++++++++++++++++++++---
1257+ src/nautilus-application.h | 2 +
1258+ src/nautilus-freedesktop-dbus.c | 21 +++++++++-
1259+ src/nautilus-freedesktop-dbus.h | 1 +
1260 5 files changed, 96 insertions(+), 7 deletions(-)
1261
1262+diff --git a/data/freedesktop-dbus-interfaces.xml b/data/freedesktop-dbus-interfaces.xml
1263+index da37ca0..8d12720 100644
1264 --- a/data/freedesktop-dbus-interfaces.xml
1265 +++ b/data/freedesktop-dbus-interfaces.xml
1266 @@ -31,5 +31,6 @@
1267@@ -23,9 +26,11 @@ Author: Marco Trevisan <marco@ubuntu.com>
1268 + <property name="XUbuntuOpenLocationsXids" type="a{uas}" access="read"/>
1269 </interface>
1270 </node>
1271+diff --git a/src/nautilus-application.c b/src/nautilus-application.c
1272+index b62cfab..1ec0d22 100644
1273 --- a/src/nautilus-application.c
1274 +++ b/src/nautilus-application.c
1275-@@ -1338,8 +1338,8 @@ nautilus_application_dbus_unregister (GA
1276+@@ -1358,8 +1358,8 @@ nautilus_application_dbus_unregister (GApplication *app,
1277 }
1278 }
1279
1280@@ -36,7 +41,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
1281 {
1282 NautilusApplicationPrivate *priv;
1283 gint i;
1284-@@ -1352,6 +1352,11 @@ update_dbus_opened_locations (NautilusAp
1285+@@ -1372,6 +1372,11 @@ update_dbus_opened_locations (NautilusApplication *self)
1286
1287 g_return_if_fail (NAUTILUS_IS_APPLICATION (self));
1288
1289@@ -48,7 +53,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
1290 priv = nautilus_application_get_instance_private (self);
1291
1292 /* Children of nautilus application could not handle the dbus, so don't
1293-@@ -1365,6 +1370,22 @@ update_dbus_opened_locations (NautilusAp
1294+@@ -1385,6 +1390,22 @@ update_dbus_opened_locations (NautilusApplication *self)
1295 {
1296 window = l->data;
1297
1298@@ -71,7 +76,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
1299 for (sl = nautilus_window_get_slots (window); sl; sl = sl->next)
1300 {
1301 NautilusWindowSlot *slot = sl->data;
1302-@@ -1373,6 +1394,12 @@ update_dbus_opened_locations (NautilusAp
1303+@@ -1393,6 +1414,12 @@ update_dbus_opened_locations (NautilusApplication *self)
1304 if (location != NULL)
1305 {
1306 gchar *uri = g_file_get_uri (location);
1307@@ -84,7 +89,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
1308 GList *found = g_list_find_custom (locations, uri, (GCompareFunc) g_strcmp0);
1309
1310 if (!found)
1311-@@ -1386,6 +1413,26 @@ update_dbus_opened_locations (NautilusAp
1312+@@ -1406,6 +1433,26 @@ update_dbus_opened_locations (NautilusApplication *self)
1313 }
1314 }
1315 }
1316@@ -111,7 +116,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
1317 }
1318
1319 locations_array = g_new (gchar *, locations_size + 1);
1320-@@ -1401,6 +1448,9 @@ update_dbus_opened_locations (NautilusAp
1321+@@ -1421,6 +1468,9 @@ update_dbus_opened_locations (NautilusApplication *self)
1322 nautilus_freedesktop_dbus_set_open_locations (priv->fdb_manager,
1323 (const gchar **) locations_array);
1324
1325@@ -121,7 +126,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
1326 g_free (locations_array);
1327 g_list_free_full (locations, g_free);
1328 }
1329-@@ -1410,7 +1460,14 @@ on_slot_location_changed (NautilusWindow
1330+@@ -1430,7 +1480,14 @@ on_slot_location_changed (NautilusWindowSlot *slot,
1331 GParamSpec *pspec,
1332 NautilusApplication *self)
1333 {
1334@@ -137,7 +142,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
1335 }
1336
1337 static void
1338-@@ -1420,7 +1477,7 @@ on_slot_added (NautilusWindow *wind
1339+@@ -1440,7 +1497,7 @@ on_slot_added (NautilusWindow *window,
1340 {
1341 if (nautilus_window_slot_get_location (slot))
1342 {
1343@@ -146,17 +151,17 @@ Author: Marco Trevisan <marco@ubuntu.com>
1344 }
1345
1346 g_signal_connect (slot, "notify::location", G_CALLBACK (on_slot_location_changed), self);
1347-@@ -1431,9 +1488,16 @@ on_slot_removed (NautilusWindow *wi
1348+@@ -1451,9 +1508,16 @@ on_slot_removed (NautilusWindow *window,
1349 NautilusWindowSlot *slot,
1350 NautilusApplication *self)
1351 {
1352 - update_dbus_opened_locations (self);
1353 + nautilus_application_update_dbus_opened_locations (self);
1354-+
1355-+ g_signal_handlers_disconnect_by_func (slot, on_slot_active_changed, self);
1356-+}
1357
1358 - g_signal_handlers_disconnect_by_func (slot, on_slot_location_changed, self);
1359++ g_signal_handlers_disconnect_by_func (slot, on_slot_active_changed, self);
1360++}
1361++
1362 +static void
1363 +on_realize (GtkWidget *widget,
1364 + NautilusApplication *self)
1365@@ -165,7 +170,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
1366 }
1367
1368 static void
1369-@@ -1449,6 +1513,7 @@ nautilus_application_window_added (GtkAp
1370+@@ -1469,6 +1533,7 @@ nautilus_application_window_added (GtkApplication *app,
1371 if (NAUTILUS_IS_WINDOW (window))
1372 {
1373 priv->windows = g_list_prepend (priv->windows, window);
1374@@ -173,7 +178,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
1375 g_signal_connect (window, "slot-added", G_CALLBACK (on_slot_added), app);
1376 g_signal_connect (window, "slot-removed", G_CALLBACK (on_slot_removed), app);
1377 }
1378-@@ -1468,6 +1533,7 @@ nautilus_application_window_removed (Gtk
1379+@@ -1488,6 +1553,7 @@ nautilus_application_window_removed (GtkApplication *app,
1380 if (NAUTILUS_IS_WINDOW (window))
1381 {
1382 priv->windows = g_list_remove_all (priv->windows, window);
1383@@ -181,9 +186,11 @@ Author: Marco Trevisan <marco@ubuntu.com>
1384 g_signal_handlers_disconnect_by_func (window, on_slot_added, app);
1385 g_signal_handlers_disconnect_by_func (window, on_slot_removed, app);
1386 }
1387+diff --git a/src/nautilus-application.h b/src/nautilus-application.h
1388+index 197a276..9cb32c8 100644
1389 --- a/src/nautilus-application.h
1390 +++ b/src/nautilus-application.h
1391-@@ -89,6 +89,8 @@ void nautilus_application_search (Nautil
1392+@@ -89,6 +89,8 @@ void nautilus_application_search (NautilusApplication *application,
1393 const gchar *uri,
1394 const gchar *text);
1395 void nautilus_application_startup_common (NautilusApplication *application);
1396@@ -192,6 +199,8 @@ Author: Marco Trevisan <marco@ubuntu.com>
1397 G_END_DECLS
1398
1399 #endif /* __NAUTILUS_APPLICATION_H__ */
1400+diff --git a/src/nautilus-freedesktop-dbus.c b/src/nautilus-freedesktop-dbus.c
1401+index c4657ab..601e0c9 100644
1402 --- a/src/nautilus-freedesktop-dbus.c
1403 +++ b/src/nautilus-freedesktop-dbus.c
1404 @@ -160,6 +160,9 @@ bus_acquired_cb (GDBusConnection *conn,
1405@@ -204,7 +213,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
1406 }
1407
1408 static void
1409-@@ -226,7 +229,23 @@ nautilus_freedesktop_dbus_set_open_locat
1410+@@ -226,7 +229,23 @@ nautilus_freedesktop_dbus_set_open_locations (NautilusFreedesktopDBus *fdb,
1411 {
1412 g_return_if_fail (NAUTILUS_IS_FREEDESKTOP_DBUS (fdb));
1413
1414@@ -229,9 +238,11 @@ Author: Marco Trevisan <marco@ubuntu.com>
1415 }
1416
1417 /* Tries to own the org.freedesktop.FileManager1 service name */
1418+diff --git a/src/nautilus-freedesktop-dbus.h b/src/nautilus-freedesktop-dbus.h
1419+index 410c420..e277e55 100644
1420 --- a/src/nautilus-freedesktop-dbus.h
1421 +++ b/src/nautilus-freedesktop-dbus.h
1422-@@ -47,5 +47,6 @@ GType nautilus_freedesktop_dbus_get_type
1423+@@ -47,5 +47,6 @@ GType nautilus_freedesktop_dbus_get_type (void);
1424 NautilusFreedesktopDBus * nautilus_freedesktop_dbus_new (void);
1425
1426 void nautilus_freedesktop_dbus_set_open_locations (NautilusFreedesktopDBus *fdb, const gchar **locations);
1427diff --git a/debian/patches/20_add_timestamp_to_operations.patch b/debian/patches/20_add_timestamp_to_operations.patch
1428index 9cbfbc3..f1203e5 100644
1429--- a/debian/patches/20_add_timestamp_to_operations.patch
1430+++ b/debian/patches/20_add_timestamp_to_operations.patch
1431@@ -1,6 +1,8 @@
1432-Description: Add *WithTimestamp dbus methods for file operations that
1433- might trigger a dialog, that should be presented with event time.
1434+From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
1435+Date: Fri, 20 Jul 2018 03:25:37 +0200
1436+Subject: Add *WithTimestamp dbus methods for file operations that
1437
1438+ might trigger a dialog, that should be presented with event time.
1439 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1445595
1440 Bug: https://bugzilla.gnome.org/show_bug.cgi?id=758833
1441 Forwarded: yes
1442@@ -9,16 +11,15 @@ From 13b0e898fbc80230333bb53dfffaa26a32889279 Mon Sep 17 00:00:00 2001
1443 From: Tim Lunn <tim@feathertop.org>
1444 Date: Sat, 20 Feb 2016 08:26:51 +1100
1445 Subject: [PATCH] 20_timestamp
1446-
1447----
1448-
1449 ---
1450- data/dbus-interfaces.xml | 15 ++++++
1451- src/nautilus-dbus-manager.c | 97 +++++++++++++++++++++++++++++++++++------
1452- src/nautilus-file-operations.c | 52 +++++++++++++++++++++
1453- src/nautilus-file-operations.h | 17 +++++++
1454+ data/dbus-interfaces.xml | 15 +++++++
1455+ src/nautilus-dbus-manager.c | 97 ++++++++++++++++++++++++++++++++++++------
1456+ src/nautilus-file-operations.c | 52 ++++++++++++++++++++++
1457+ src/nautilus-file-operations.h | 17 ++++++++
1458 4 files changed, 167 insertions(+), 14 deletions(-)
1459
1460+diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
1461+index 35fb994..c1b2cab 100644
1462 --- a/data/dbus-interfaces.xml
1463 +++ b/data/dbus-interfaces.xml
1464 @@ -27,13 +27,28 @@
1465@@ -50,9 +51,11 @@ Subject: [PATCH] 20_timestamp
1466 + </method>
1467 </interface>
1468 </node>
1469+diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
1470+index 77d00d6..b6dc4e1 100644
1471 --- a/src/nautilus-dbus-manager.c
1472 +++ b/src/nautilus-dbus-manager.c
1473-@@ -60,13 +60,13 @@ nautilus_dbus_manager_dispose (GObject *
1474+@@ -60,13 +60,13 @@ nautilus_dbus_manager_dispose (GObject *object)
1475 G_OBJECT_CLASS (nautilus_dbus_manager_parent_class)->dispose (object);
1476 }
1477
1478@@ -73,7 +76,7 @@ Subject: [PATCH] 20_timestamp
1479 {
1480 GFile *source_file, *target_dir;
1481 const gchar *target_name = NULL, *source_name = NULL;
1482-@@ -89,16 +89,41 @@ handle_copy_file (NautilusDBusFileOperat
1483+@@ -89,16 +89,41 @@ handle_copy_file (NautilusDBusFileOperations *object,
1484
1485 g_object_unref (source_file);
1486 g_object_unref (target_dir);
1487@@ -119,7 +122,7 @@ Subject: [PATCH] 20_timestamp
1488 {
1489 GList *source_files = NULL;
1490 GFile *dest_dir;
1491-@@ -112,18 +137,39 @@ handle_copy_uris (NautilusDBusFileOperat
1492+@@ -112,17 +137,38 @@ handle_copy_uris (NautilusDBusFileOperations *object,
1493 g_file_new_for_uri (sources[idx]));
1494 }
1495
1496@@ -146,7 +149,7 @@ Subject: [PATCH] 20_timestamp
1497 return TRUE; /* invocation was handled */
1498 }
1499
1500- static gboolean
1501++static gboolean
1502 +handle_copy_uris_with_timestamp (NautilusDBusFileOperations *object,
1503 + GDBusMethodInvocation *invocation,
1504 + const gchar **sources,
1505@@ -158,11 +161,10 @@ Subject: [PATCH] 20_timestamp
1506 + return TRUE;
1507 +}
1508 +
1509-+static gboolean
1510+ static gboolean
1511 handle_empty_trash (NautilusDBusFileOperations *object,
1512 GDBusMethodInvocation *invocation)
1513- {
1514-@@ -133,6 +179,17 @@ handle_empty_trash (NautilusDBusFileOper
1515+@@ -133,6 +179,17 @@ handle_empty_trash (NautilusDBusFileOperations *object,
1516 return TRUE; /* invocation was handled */
1517 }
1518
1519@@ -180,7 +182,7 @@ Subject: [PATCH] 20_timestamp
1520 static void
1521 nautilus_dbus_manager_init (NautilusDBusManager *self)
1522 {
1523-@@ -150,6 +207,18 @@ nautilus_dbus_manager_init (NautilusDBus
1524+@@ -150,6 +207,18 @@ nautilus_dbus_manager_init (NautilusDBusManager *self)
1525 "handle-empty-trash",
1526 G_CALLBACK (handle_empty_trash),
1527 self);
1528@@ -199,6 +201,8 @@ Subject: [PATCH] 20_timestamp
1529 }
1530
1531 static void
1532+diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
1533+index 546acf8..c641ec5 100644
1534 --- a/src/nautilus-file-operations.c
1535 +++ b/src/nautilus-file-operations.c
1536 @@ -69,6 +69,7 @@ typedef struct
1537@@ -209,7 +213,7 @@ Subject: [PATCH] 20_timestamp
1538 NautilusProgressInfo *progress;
1539 GCancellable *cancellable;
1540 GHashTable *skip_files;
1541-@@ -1167,6 +1168,7 @@ typedef struct
1542+@@ -1172,6 +1173,7 @@ typedef struct
1543 const char *details_text;
1544 const char **button_titles;
1545 gboolean show_all;
1546@@ -217,7 +221,7 @@ Subject: [PATCH] 20_timestamp
1547 int result;
1548 /* Dialogs are ran from operation threads, which need to be blocked until
1549 * the user gives a valid response
1550-@@ -1227,6 +1229,7 @@ do_run_simple_dialog (gpointer _data)
1551+@@ -1232,6 +1234,7 @@ do_run_simple_dialog (gpointer _data)
1552 }
1553
1554 /* Run it. */
1555@@ -225,7 +229,7 @@ Subject: [PATCH] 20_timestamp
1556 result = gtk_dialog_run (GTK_DIALOG (dialog));
1557
1558 while ((result == GTK_RESPONSE_NONE || result == GTK_RESPONSE_DELETE_EVENT) && data->ignore_close_box)
1559-@@ -1273,6 +1276,7 @@ run_simple_dialog_va (CommonJob *jo
1560+@@ -1278,6 +1281,7 @@ run_simple_dialog_va (CommonJob *job,
1561 data->secondary_text = secondary_text;
1562 data->details_text = details_text;
1563 data->show_all = show_all;
1564@@ -233,10 +237,11 @@ Subject: [PATCH] 20_timestamp
1565 data->completed = FALSE;
1566 g_mutex_init (&data->mutex);
1567 g_cond_init (&data->cond);
1568-@@ -5862,6 +5866,26 @@ nautilus_file_operations_copy_file (GFil
1569+@@ -5779,6 +5783,26 @@ nautilus_file_operations_copy_file (GFile *source_file,
1570+ GtkWindow *parent_window,
1571 NautilusCopyCallback done_callback,
1572 gpointer done_callback_data)
1573- {
1574++{
1575 + nautilus_file_operations_copy_file_with_time (source_file,
1576 + target_dir,
1577 + source_display_name,
1578@@ -256,11 +261,10 @@ Subject: [PATCH] 20_timestamp
1579 + guint32 timestamp,
1580 + NautilusCopyCallback done_callback,
1581 + gpointer done_callback_data)
1582-+{
1583+ {
1584 GTask *task;
1585 CopyMoveJob *job;
1586-
1587-@@ -5875,6 +5899,7 @@ nautilus_file_operations_copy_file (GFil
1588+@@ -5793,6 +5817,7 @@ nautilus_file_operations_copy_file (GFile *source_file,
1589 nautilus_progress_info_set_destination (((CommonJob *) job)->progress, target_dir);
1590 job->target_name = g_strdup (new_name);
1591 job->debuting_files = g_hash_table_new_full (g_file_hash, (GEqualFunc) g_file_equal, g_object_unref, NULL);
1592@@ -268,10 +272,11 @@ Subject: [PATCH] 20_timestamp
1593
1594 if (source_display_name != NULL)
1595 {
1596-@@ -5902,6 +5927,24 @@ nautilus_file_operations_copy (GList
1597+@@ -5819,6 +5844,24 @@ nautilus_file_operations_copy (GList *files,
1598+ GtkWindow *parent_window,
1599 NautilusCopyCallback done_callback,
1600 gpointer done_callback_data)
1601- {
1602++{
1603 + nautilus_file_operations_copy_with_time (files,
1604 + relative_item_points,
1605 + target_dir,
1606@@ -289,11 +294,10 @@ Subject: [PATCH] 20_timestamp
1607 + guint32 timestamp,
1608 + NautilusCopyCallback done_callback,
1609 + gpointer done_callback_data)
1610-+{
1611+ {
1612 GTask *task;
1613 CopyMoveJob *job;
1614-
1615-@@ -5911,6 +5954,7 @@ nautilus_file_operations_copy (GList
1616+@@ -5829,6 +5872,7 @@ nautilus_file_operations_copy (GList *files,
1617 job->done_callback_data = done_callback_data;
1618 job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
1619 job->destination = g_object_ref (target_dir);
1620@@ -301,21 +305,21 @@ Subject: [PATCH] 20_timestamp
1621 /* Need to indicate the destination for the operation notification open
1622 * button. */
1623 nautilus_progress_info_set_destination (((CommonJob *) job)->progress, target_dir);
1624-@@ -7934,6 +7978,13 @@ empty_trash_thread_func (GTask *t
1625+@@ -7886,6 +7930,13 @@ empty_trash_thread_func (GTask *task,
1626+
1627 void
1628 nautilus_file_operations_empty_trash (GtkWidget *parent_view)
1629- {
1630++{
1631 + nautilus_file_operations_empty_trash_with_time (parent_view, GDK_CURRENT_TIME);
1632 +}
1633 +
1634 +void
1635 +nautilus_file_operations_empty_trash_with_time (GtkWidget *parent_view,
1636 + guint32 timestamp)
1637-+{
1638+ {
1639 g_autoptr (GTask) task = NULL;
1640 EmptyTrashJob *job;
1641- GtkWindow *parent_window;
1642-@@ -7948,6 +7999,7 @@ nautilus_file_operations_empty_trash (Gt
1643+@@ -7901,6 +7952,7 @@ nautilus_file_operations_empty_trash (GtkWidget *parent_view)
1644 job->trash_dirs = g_list_prepend (job->trash_dirs,
1645 g_file_new_for_uri ("trash:"));
1646 job->should_confirm = TRUE;
1647@@ -323,9 +327,11 @@ Subject: [PATCH] 20_timestamp
1648
1649 inhibit_power_manager ((CommonJob *) job, _("Emptying Trash"));
1650
1651+diff --git a/src/nautilus-file-operations.h b/src/nautilus-file-operations.h
1652+index a479ee6..321fbc6 100644
1653 --- a/src/nautilus-file-operations.h
1654 +++ b/src/nautilus-file-operations.h
1655-@@ -65,7 +65,17 @@ void nautilus_file_operations_copy_file
1656+@@ -65,7 +65,17 @@ void nautilus_file_operations_copy_file (GFile *source_file,
1657 GtkWindow *parent_window,
1658 NautilusCopyCallback done_callback,
1659 gpointer done_callback_data);
1660@@ -343,7 +349,7 @@ Subject: [PATCH] 20_timestamp
1661 void nautilus_file_operations_new_folder (GtkWidget *parent_view,
1662 GdkPoint *target_point,
1663 const char *parent_dir_uri,
1664-@@ -129,6 +139,13 @@ void nautilus_file_operations_copy
1665+@@ -129,6 +139,13 @@ void nautilus_file_operations_copy (GList *files,
1666 GtkWindow *parent_window,
1667 NautilusCopyCallback done_callback,
1668 gpointer done_callback_data);
1669diff --git a/debian/patches/Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch b/debian/patches/Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch
1670new file mode 100644
1671index 0000000..d7c9a12
1672--- /dev/null
1673+++ b/debian/patches/Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch
1674@@ -0,0 +1,53 @@
1675+From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
1676+Date: Wed, 18 Jul 2018 18:46:28 +0200
1677+Subject: Revert "Revert "files-view: Remove new empty folder name
1678+ suggestion""
1679+
1680+This reverts commit 945c32dec747855047aa9b380d53588c5fcfb57a.
1681+
1682+This feature was already provided in Ubuntu, so would be a regression if we drop it
1683+---
1684+ src/nautilus-files-view.c | 15 ++++++++-------
1685+ 1 file changed, 8 insertions(+), 7 deletions(-)
1686+
1687+diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
1688+index 8784f63..9b7b9b9 100644
1689+--- a/src/nautilus-files-view.c
1690++++ b/src/nautilus-files-view.c
1691+@@ -2047,9 +2047,8 @@ static void
1692+ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,
1693+ gboolean with_selection)
1694+ {
1695+- NautilusDirectory *containing_directory;
1696++ g_autoptr (NautilusDirectory) containing_directory = NULL;
1697+ NautilusFilesViewPrivate *priv;
1698+- GList *selection;
1699+ g_autofree char *uri = NULL;
1700+ g_autofree char *common_prefix = NULL;
1701+
1702+@@ -2063,8 +2062,13 @@ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,
1703+ uri = nautilus_files_view_get_backing_uri (view);
1704+ containing_directory = nautilus_directory_get_by_uri (uri);
1705+
1706+- selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
1707+- common_prefix = nautilus_get_common_filename_prefix (selection, MIN_COMMON_FILENAME_PREFIX_LENGTH);
1708++ if (with_selection)
1709++ {
1710++ GList *selection;
1711++ selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
1712++ common_prefix = nautilus_get_common_filename_prefix (selection, MIN_COMMON_FILENAME_PREFIX_LENGTH);
1713++ nautilus_file_list_free (selection);
1714++ }
1715+
1716+ priv->new_folder_controller =
1717+ nautilus_new_folder_dialog_controller_new (nautilus_files_view_get_containing_window (view),
1718+@@ -2080,9 +2084,6 @@ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,
1719+ "cancelled",
1720+ (GCallback) new_folder_dialog_controller_on_cancelled,
1721+ view);
1722+-
1723+- nautilus_file_list_free (selection);
1724+- nautilus_directory_unref (containing_directory);
1725+ }
1726+
1727+ typedef struct
1728diff --git a/debian/patches/Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch b/debian/patches/Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch
1729new file mode 100644
1730index 0000000..8f4fa62
1731--- /dev/null
1732+++ b/debian/patches/Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch
1733@@ -0,0 +1,25 @@
1734+From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
1735+Date: Wed, 18 Jul 2018 18:46:16 +0200
1736+Subject: Revert "Revert "nautilus-file: Don't show thumbnails for the first 2
1737+ zoom levels""
1738+
1739+This reverts commit d62c0899f34665bdc4752ce8b6844328889f4638.
1740+
1741+This feature was already provided in Ubuntu, so would be a regression if we drop it
1742+---
1743+ src/nautilus-file.c | 2 +-
1744+ 1 file changed, 1 insertion(+), 1 deletion(-)
1745+
1746+diff --git a/src/nautilus-file.c b/src/nautilus-file.c
1747+index 0ac5398..adbf081 100644
1748+--- a/src/nautilus-file.c
1749++++ b/src/nautilus-file.c
1750+@@ -5511,7 +5511,7 @@ nautilus_thumbnail_is_limited_by_zoom (int size,
1751+
1752+ zoom_level = size * scale;
1753+
1754+- if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_SMALL)
1755++ if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_STANDARD)
1756+ {
1757+ return TRUE;
1758+ }
1759diff --git a/debian/patches/appstream-compulsory.patch b/debian/patches/appstream-compulsory.patch
1760index 4260814..19c6d0b 100644
1761--- a/debian/patches/appstream-compulsory.patch
1762+++ b/debian/patches/appstream-compulsory.patch
1763@@ -1,5 +1,5 @@
1764 From: Jeremy Bicha <jbicha@ubuntu.com>
1765-Date: Fri, 13 Apr 2018 14:57:30 -0400
1766+Date: Fri, 13 Apr 2018 20:57:30 +0200
1767 Subject: Set nautilus as unremovable in GNOME Software
1768
1769 for GNOME and Unity users since it is a depends of ubuntu-desktop
1770diff --git a/debian/patches/clear_pending_selection.patch b/debian/patches/clear_pending_selection.patch
1771deleted file mode 100644
1772index f964dc9..0000000
1773--- a/debian/patches/clear_pending_selection.patch
1774+++ /dev/null
1775@@ -1,28 +0,0 @@
1776-Origin; https://gitlab.gnome.org/GNOME/nautilus/merge_requests/195
1777-From 416dfb1815fe83f73e335199eea5216e604a6fd6 Mon Sep 17 00:00:00 2001
1778-From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
1779-Date: Thu, 19 Apr 2018 04:19:51 -0500
1780-Subject: [PATCH] window-slot: Clear pending_selection after freeing it
1781-
1782-This might not be the case when handling archive files
1783----
1784- src/nautilus-window-slot.c | 6 +-----
1785- 1 file changed, 1 insertion(+), 5 deletions(-)
1786-
1787-diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
1788-index 2fa9c3339..541dd24a8 100644
1789---- a/src/nautilus-window-slot.c
1790-+++ b/src/nautilus-window-slot.c
1791-@@ -1611,11 +1611,7 @@ handle_regular_file_if_needed (NautilusWindowSlot *self,
1792- if ((parent_file != NULL) &&
1793- nautilus_file_get_file_type (file) == G_FILE_TYPE_REGULAR)
1794- {
1795-- if (priv->pending_selection != NULL)
1796-- {
1797-- nautilus_file_list_free (priv->pending_selection);
1798-- }
1799--
1800-+ g_clear_pointer (&priv->pending_selection, nautilus_file_list_free);
1801- g_clear_object (&priv->pending_location);
1802- g_clear_object (&priv->pending_file_to_activate);
1803- g_free (priv->pending_scroll_to);
1804diff --git a/debian/patches/file-view-Always-unset-pending_selection-after-freeing-it.patch b/debian/patches/file-view-Always-unset-pending_selection-after-freeing-it.patch
1805new file mode 100644
1806index 0000000..4191e7e
1807--- /dev/null
1808+++ b/debian/patches/file-view-Always-unset-pending_selection-after-freeing-it.patch
1809@@ -0,0 +1,80 @@
1810+From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
1811+Date: Thu, 26 Jul 2018 04:55:19 +0200
1812+Subject: file-view: Always unset pending_selection after freeing it
1813+
1814+When a file view was loaded with a pending selection, and not all the files were
1815+seen yet, the private pending_selection list was properly free'd, but the pointer
1816+was not cleared, causing a crash when `nautilus_files_view_set_selection` was
1817+called again, as it was trying to deeply copy a list pointed by this invalid
1818+reference.
1819+
1820+So, removing the unneeded `pending_selection` temporary pointer from the main
1821+function scope, as it only confuses, while use it (with an autolist) when we
1822+need to pass the previous `priv->pending_selection` (stealing its ownership)
1823+to set_selection again.
1824+
1825+Eventually use a g_clear_pointer to free the list and nullify its priv reference
1826+
1827+Fixes #295
1828+
1829+(cherry picked from commit ae3382a281b018337a8032ef13663ec2d9c7fd6c)
1830+
1831+Bug-GNOME: https://gitlab.gnome.org/GNOME/nautilus/issues/295
1832+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1713581
1833+Applied-Upstream: commit: https://gitlab.gnome.org/GNOME/nautilus/commit/834c4e7f
1834+---
1835+ src/nautilus-files-view.c | 16 +++++++---------
1836+ 1 file changed, 7 insertions(+), 9 deletions(-)
1837+
1838+diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
1839+index f916b05..87a4a42 100644
1840+--- a/src/nautilus-files-view.c
1841++++ b/src/nautilus-files-view.c
1842+@@ -3587,7 +3587,6 @@ done_loading (NautilusFilesView *view,
1843+ gboolean all_files_seen)
1844+ {
1845+ NautilusFilesViewPrivate *priv;
1846+- GList *pending_selection;
1847+ GList *selection;
1848+ gboolean do_reveal = FALSE;
1849+
1850+@@ -3608,21 +3607,23 @@ done_loading (NautilusFilesView *view,
1851+ nautilus_files_view_update_toolbar_menus (view);
1852+ reset_update_interval (view);
1853+
1854+- pending_selection = priv->pending_selection;
1855+ selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
1856+
1857+ if (nautilus_view_is_searching (NAUTILUS_VIEW (view)) &&
1858+- all_files_seen && !selection && !pending_selection)
1859++ all_files_seen && selection == NULL && priv->pending_selection == NULL)
1860+ {
1861+ nautilus_files_view_select_first (view);
1862+ do_reveal = TRUE;
1863+ }
1864+- else if (pending_selection != NULL && all_files_seen)
1865++ else if (priv->pending_selection != NULL && all_files_seen)
1866+ {
1867+- priv->pending_selection = NULL;
1868++ GList *pending_selection;
1869++ pending_selection = g_steal_pointer (&priv->pending_selection);
1870+
1871+ nautilus_files_view_call_set_selection (view, pending_selection);
1872+ do_reveal = TRUE;
1873++
1874++ nautilus_file_list_free (pending_selection);
1875+ }
1876+
1877+ if (selection)
1878+@@ -3630,10 +3631,7 @@ done_loading (NautilusFilesView *view,
1879+ g_list_free_full (selection, g_object_unref);
1880+ }
1881+
1882+- if (pending_selection)
1883+- {
1884+- g_list_free_full (pending_selection, g_object_unref);
1885+- }
1886++ g_clear_pointer (&priv->pending_selection, nautilus_file_list_free);
1887+
1888+ if (do_reveal)
1889+ {
1890diff --git a/debian/patches/multiarch_fallback.patch b/debian/patches/multiarch_fallback.patch
1891index 0cc4b8f..42edf6e 100644
1892--- a/debian/patches/multiarch_fallback.patch
1893+++ b/debian/patches/multiarch_fallback.patch
1894@@ -1,12 +1,13 @@
1895-From 54592574c3cb951085c747680046b4787daca7f2 Mon Sep 17 00:00:00 2001
1896 From: Jeremy Bicha <jbicha@ubuntu.com>
1897 Date: Tue, 13 Sep 2016 21:33:50 -0400
1898 Subject: [PATCH] Load extensions from non-multiarch directory too
1899
1900 ---
1901- src/nautilus-module.c | 1 +
1902+ src/nautilus-module.c | 1 +
1903 1 file changed, 1 insertion(+)
1904
1905+diff --git a/src/nautilus-module.c b/src/nautilus-module.c
1906+index bf474bd..bd74cc7 100644
1907 --- a/src/nautilus-module.c
1908 +++ b/src/nautilus-module.c
1909 @@ -260,6 +260,7 @@ nautilus_module_setup (void)
1910diff --git a/debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mo.patch b/debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mo.patch
1911new file mode 100644
1912index 0000000..e43f1d3
1913--- /dev/null
1914+++ b/debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mo.patch
1915@@ -0,0 +1,45 @@
1916+From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
1917+Date: Tue, 17 Jul 2018 04:23:58 +0200
1918+Subject: nautilusgtkplacesview: show error if volume is not mounted
1919+
1920+Fixes crash as location would be NULL afterwards.
1921+
1922+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1764779
1923+Forwarded: not-needed
1924+---
1925+ src/gtk/nautilusgtkplacesview.c | 20 +++++++++++++++-----
1926+ 1 file changed, 15 insertions(+), 5 deletions(-)
1927+
1928+diff --git a/src/gtk/nautilusgtkplacesview.c b/src/gtk/nautilusgtkplacesview.c
1929+index b72085b..c5e98a5 100644
1930+--- a/src/gtk/nautilusgtkplacesview.c
1931++++ b/src/gtk/nautilusgtkplacesview.c
1932+@@ -1329,13 +1329,23 @@ volume_mount_ready_cb (GObject *source_volume,
1933+ GFile *root;
1934+
1935+ mount = g_volume_get_mount (volume);
1936+- root = g_mount_get_default_location (mount);
1937+
1938+- if (priv->should_open_location)
1939+- emit_open_location (NAUTILUS_GTK_PLACES_VIEW (user_data), root, priv->open_flags);
1940++ if (G_IS_MOUNT (mount))
1941++ {
1942++ root = g_mount_get_default_location (mount);
1943+
1944+- g_object_unref (mount);
1945+- g_object_unref (root);
1946++ if (priv->should_open_location)
1947++ emit_open_location (NAUTILUS_GTK_PLACES_VIEW (user_data), root, priv->open_flags);
1948++
1949++ g_object_unref (mount);
1950++ g_object_unref (root);
1951++ }
1952++ else
1953++ {
1954++ emit_show_error_message (NAUTILUS_GTK_PLACES_VIEW(user_data),
1955++ _("Unable to access location"),
1956++ _("volume not mounted"));
1957++ }
1958+ }
1959+
1960+ update_places (view);
1961diff --git a/debian/patches/query-add-recursive-flags-and-use-it-in-search-engines.patch b/debian/patches/query-add-recursive-flags-and-use-it-in-search-engines.patch
1962new file mode 100644
1963index 0000000..fddae3e
1964--- /dev/null
1965+++ b/debian/patches/query-add-recursive-flags-and-use-it-in-search-engines.patch
1966@@ -0,0 +1,1022 @@
1967+From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
1968+Date: Thu, 26 Jul 2018 22:01:57 +0200
1969+Subject: query: add recursive flags and use it in search-engines
1970+
1971+Forwarded: yes, https://gitlab.gnome.org/GNOME/nautilus/merge_requests/249
1972+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1767027
1973+Applied-Upstream: 3.29
1974+---
1975+ src/meson.build | 1 +
1976+ src/nautilus-application.c | 11 ++----
1977+ src/nautilus-application.h | 3 +-
1978+ src/nautilus-directory-async.c | 4 +-
1979+ src/nautilus-file-private.h | 3 +-
1980+ src/nautilus-file-utilities.c | 48 +++++++++++++++++++++++
1981+ src/nautilus-file-utilities.h | 6 +++
1982+ src/nautilus-file.c | 28 ++++++++++++++
1983+ src/nautilus-file.h | 2 +
1984+ src/nautilus-query-editor.c | 20 +++++-----
1985+ src/nautilus-query.c | 28 +++++++-------
1986+ src/nautilus-query.h | 14 +++++--
1987+ src/nautilus-search-directory.c | 6 ---
1988+ src/nautilus-search-engine-private.h | 31 +++++++++++++++
1989+ src/nautilus-search-engine-simple.c | 74 +++++++++---------------------------
1990+ src/nautilus-search-engine-simple.h | 2 +
1991+ src/nautilus-search-engine-tracker.c | 16 ++++----
1992+ src/nautilus-search-engine.c | 36 +++++++++++++-----
1993+ src/nautilus-search-engine.h | 2 -
1994+ src/nautilus-shell-search-provider.c | 50 ++++++++++++++++--------
1995+ src/nautilus-window-slot.c | 19 ++++-----
1996+ src/nautilus-window-slot.h | 2 +-
1997+ src/nautilus-window.c | 4 +-
1998+ src/nautilus-window.h | 2 +-
1999+ 24 files changed, 261 insertions(+), 151 deletions(-)
2000+ create mode 100644 src/nautilus-search-engine-private.h
2001+
2002+diff --git a/src/meson.build b/src/meson.build
2003+index a771d12..73aafe9 100644
2004+--- a/src/meson.build
2005++++ b/src/meson.build
2006+@@ -226,6 +226,7 @@ libnautilus_sources = [
2007+ 'nautilus-search-provider.h',
2008+ 'nautilus-search-engine.c',
2009+ 'nautilus-search-engine.h',
2010++ 'nautilus-search-engine-private.h',
2011+ 'nautilus-search-engine-model.c',
2012+ 'nautilus-search-engine-model.h',
2013+ 'nautilus-search-engine-simple.c',
2014+diff --git a/src/nautilus-application.c b/src/nautilus-application.c
2015+index 1ec0d22..26ce836 100644
2016+--- a/src/nautilus-application.c
2017++++ b/src/nautilus-application.c
2018+@@ -1621,15 +1621,12 @@ nautilus_application_new (void)
2019+
2020+ void
2021+ nautilus_application_search (NautilusApplication *self,
2022+- const gchar *uri,
2023+- const gchar *text)
2024++ NautilusQuery *query)
2025+ {
2026++ g_autoptr (GFile) location = NULL;
2027+ NautilusWindow *window;
2028+- GFile *location;
2029+
2030+- location = g_file_new_for_uri (uri);
2031++ location = nautilus_query_get_location (query);
2032+ window = open_window (self, location);
2033+- nautilus_window_search (window, text);
2034+-
2035+- g_object_unref (location);
2036++ nautilus_window_search (window, query);
2037+ }
2038+diff --git a/src/nautilus-application.h b/src/nautilus-application.h
2039+index 9cb32c8..47adcc4 100644
2040+--- a/src/nautilus-application.h
2041++++ b/src/nautilus-application.h
2042+@@ -86,8 +86,7 @@ GtkWidget * nautilus_application_connect_server (NautilusApplication *applicatio
2043+ NautilusWindow *window);
2044+
2045+ void nautilus_application_search (NautilusApplication *application,
2046+- const gchar *uri,
2047+- const gchar *text);
2048++ NautilusQuery *query);
2049+ void nautilus_application_startup_common (NautilusApplication *application);
2050+
2051+ void nautilus_application_update_dbus_opened_locations (NautilusApplication *app);
2052+diff --git a/src/nautilus-directory-async.c b/src/nautilus-directory-async.c
2053+index 05a87e3..a1a27de 100644
2054+--- a/src/nautilus-directory-async.c
2055++++ b/src/nautilus-directory-async.c
2056+@@ -4383,6 +4383,7 @@ got_filesystem_info (FilesystemInfoState *state,
2057+ file->details->filesystem_readonly =
2058+ g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY);
2059+ filesystem_type = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE);
2060++ file->details->filesystem_remote = g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE);
2061+ if (g_strcmp0 (eel_ref_str_peek (file->details->filesystem_type), filesystem_type) != 0)
2062+ {
2063+ eel_ref_str_unref (file->details->filesystem_type);
2064+@@ -4465,7 +4466,8 @@ filesystem_info_start (NautilusDirectory *directory,
2065+ g_file_query_filesystem_info_async (location,
2066+ G_FILE_ATTRIBUTE_FILESYSTEM_READONLY ","
2067+ G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW ","
2068+- G_FILE_ATTRIBUTE_FILESYSTEM_TYPE,
2069++ G_FILE_ATTRIBUTE_FILESYSTEM_TYPE ","
2070++ G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE,
2071+ G_PRIORITY_DEFAULT,
2072+ state->cancellable,
2073+ query_filesystem_info_callback,
2074+diff --git a/src/nautilus-file-private.h b/src/nautilus-file-private.h
2075+index cb2bebb..5f6b209 100644
2076+--- a/src/nautilus-file-private.h
2077++++ b/src/nautilus-file-private.h
2078+@@ -202,7 +202,8 @@ struct NautilusFileDetails
2079+ eel_boolean_bit filesystem_readonly : 1;
2080+ eel_boolean_bit filesystem_use_preview : 2; /* GFilesystemPreviewType */
2081+ eel_boolean_bit filesystem_info_is_up_to_date : 1;
2082+- eel_ref_str filesystem_type;
2083++ eel_boolean_bit filesystem_remote : 1;
2084++ eel_ref_str filesystem_type;
2085+
2086+ time_t trash_time; /* 0 is unknown */
2087+ time_t recency; /* 0 is unknown */
2088+diff --git a/src/nautilus-file-utilities.c b/src/nautilus-file-utilities.c
2089+index e79f37b..f8d8476 100644
2090+--- a/src/nautilus-file-utilities.c
2091++++ b/src/nautilus-file-utilities.c
2092+@@ -1517,3 +1517,51 @@ nautilus_uri_to_native_uri (const gchar *uri)
2093+ return NULL;
2094+ }
2095+
2096++NautilusQueryRecursive
2097++location_settings_search_get_recursive (void)
2098++{
2099++ switch (g_settings_get_enum (nautilus_preferences, "recursive-search"))
2100++ {
2101++ case NAUTILUS_SPEED_TRADEOFF_ALWAYS:
2102++ {
2103++ return NAUTILUS_QUERY_RECURSIVE_ALWAYS;
2104++ }
2105++ break;
2106++
2107++ case NAUTILUS_SPEED_TRADEOFF_LOCAL_ONLY:
2108++ {
2109++ return NAUTILUS_QUERY_RECURSIVE_LOCAL_ONLY;
2110++ }
2111++ break;
2112++
2113++ case NAUTILUS_SPEED_TRADEOFF_NEVER:
2114++ {
2115++ return NAUTILUS_QUERY_RECURSIVE_NEVER;
2116++ }
2117++ break;
2118++ }
2119++
2120++ return NAUTILUS_QUERY_RECURSIVE_ALWAYS;
2121++}
2122++
2123++NautilusQueryRecursive
2124++location_settings_search_get_recursive_for_location (GFile *location)
2125++{
2126++ NautilusQueryRecursive recursive = location_settings_search_get_recursive ();
2127++
2128++ g_return_val_if_fail (location, recursive);
2129++
2130++ if (recursive == NAUTILUS_QUERY_RECURSIVE_LOCAL_ONLY)
2131++ {
2132++ g_autoptr (NautilusFile) file = nautilus_file_get_existing (location);
2133++
2134++ g_return_val_if_fail (file != NULL, recursive);
2135++
2136++ if (nautilus_file_is_remote (file))
2137++ {
2138++ recursive = NAUTILUS_QUERY_RECURSIVE_NEVER;
2139++ }
2140++ }
2141++
2142++ return recursive;
2143++}
2144+diff --git a/src/nautilus-file-utilities.h b/src/nautilus-file-utilities.h
2145+index b567611..b165d63 100644
2146+--- a/src/nautilus-file-utilities.h
2147++++ b/src/nautilus-file-utilities.h
2148+@@ -25,6 +25,9 @@
2149+
2150+ #include <gio/gio.h>
2151+ #include <gtk/gtk.h>
2152++#include <config.h>
2153++
2154++#include "nautilus-query.h"
2155+
2156+ #define NAUTILUS_DESKTOP_ID "org.gnome.Nautilus.desktop"
2157+
2158+@@ -127,4 +130,7 @@ GList * nautilus_file_list_from_uri_list (GList *uris);
2159+
2160+ gchar * nautilus_uri_to_native_uri (const gchar *uri);
2161+
2162++NautilusQueryRecursive location_settings_search_get_recursive (void);
2163++NautilusQueryRecursive location_settings_search_get_recursive_for_location (GFile *location);
2164++
2165+ #endif /* NAUTILUS_FILE_UTILITIES_H */
2166+diff --git a/src/nautilus-file.c b/src/nautilus-file.c
2167+index 3f6a69f..63413a6 100644
2168+--- a/src/nautilus-file.c
2169++++ b/src/nautilus-file.c
2170+@@ -4975,6 +4975,29 @@ nautilus_file_get_filesystem_type (NautilusFile *file)
2171+ return filesystem_type;
2172+ }
2173+
2174++gboolean
2175++nautilus_file_get_filesystem_remote (NautilusFile *file)
2176++{
2177++ NautilusFile *parent;
2178++
2179++ g_assert (NAUTILUS_IS_FILE (file));
2180++
2181++ if (nautilus_file_is_directory (file))
2182++ {
2183++ return file->details->filesystem_remote;
2184++ }
2185++ else
2186++ {
2187++ parent = nautilus_file_get_parent (file);
2188++ if (parent != NULL)
2189++ {
2190++ return parent->details->filesystem_remote;
2191++ }
2192++ }
2193++
2194++ return FALSE;
2195++}
2196++
2197+ gboolean
2198+ nautilus_file_should_show_thumbnail (NautilusFile *file)
2199+ {
2200+@@ -8376,6 +8399,11 @@ nautilus_file_is_remote (NautilusFile *file)
2201+
2202+ g_assert (NAUTILUS_IS_FILE (file));
2203+
2204++ if (nautilus_file_get_filesystem_remote (file))
2205++ {
2206++ return TRUE;
2207++ }
2208++
2209+ filesystem_type = nautilus_file_get_filesystem_type (file);
2210+
2211+ return filesystem_type != NULL && g_strv_contains (remote_types, filesystem_type);
2212+diff --git a/src/nautilus-file.h b/src/nautilus-file.h
2213+index 5b319f9..54fdcb3 100644
2214+--- a/src/nautilus-file.h
2215++++ b/src/nautilus-file.h
2216+@@ -253,6 +253,8 @@ char * nautilus_file_get_filesystem_id (Nautilu
2217+
2218+ char * nautilus_file_get_filesystem_type (NautilusFile *file);
2219+
2220++gboolean nautilus_file_get_filesystem_remote (NautilusFile *file);
2221++
2222+ NautilusFile * nautilus_file_get_trash_original_file (NautilusFile *file);
2223+
2224+ /* Permissions. */
2225+diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
2226+index 94b9c4d..8398ad4 100644
2227+--- a/src/nautilus-query-editor.c
2228++++ b/src/nautilus-query-editor.c
2229+@@ -144,12 +144,12 @@ update_information_label (NautilusQueryEditor *editor)
2230+ fts_sensitive = FALSE;
2231+ }
2232+ else if (nautilus_file_is_remote (file) &&
2233+- !settings_search_is_recursive (editor))
2234++ location_settings_search_get_recursive_for_location (priv->location) == NAUTILUS_QUERY_RECURSIVE_NEVER)
2235+ {
2236+ label = _("Remote location — only searching the current folder");
2237+ fts_sensitive = FALSE;
2238+ }
2239+- else if (!settings_search_is_recursive (editor))
2240++ else if (location_settings_search_get_recursive_for_location (priv->location) == NAUTILUS_QUERY_RECURSIVE_NEVER)
2241+ {
2242+ label = _("Only searching the current folder");
2243+ }
2244+@@ -170,17 +170,18 @@ recursive_search_preferences_changed (GSettings *settings,
2245+ gchar *key,
2246+ NautilusQueryEditor *editor)
2247+ {
2248++
2249+ NautilusQueryEditorPrivate *priv;
2250+- gboolean recursive;
2251++ NautilusQueryRecursive recursive;
2252+
2253+ priv = nautilus_query_editor_get_instance_private (editor);
2254+
2255+- if (!priv->location || !priv->query)
2256++ if (!priv->query)
2257+ {
2258+ return;
2259+ }
2260+
2261+- recursive = settings_search_is_recursive (editor);
2262++ recursive = location_settings_search_get_recursive ();
2263+ if (recursive != nautilus_query_get_recursive (priv->query))
2264+ {
2265+ nautilus_query_set_recursive (priv->query, recursive);
2266+@@ -382,7 +383,6 @@ create_query (NautilusQueryEditor *editor)
2267+ NautilusQueryEditorPrivate *priv;
2268+ NautilusQuery *query;
2269+ NautilusFile *file;
2270+- gboolean recursive;
2271+ gboolean fts_enabled;
2272+
2273+ priv = nautilus_query_editor_get_instance_private (editor);
2274+@@ -396,11 +396,13 @@ create_query (NautilusQueryEditor *editor)
2275+
2276+ nautilus_query_set_search_content (query, fts_enabled);
2277+
2278+- recursive = settings_search_is_recursive (editor);
2279+-
2280+ nautilus_query_set_text (query, gtk_entry_get_text (GTK_ENTRY (priv->entry)));
2281+ nautilus_query_set_location (query, priv->location);
2282+- nautilus_query_set_recursive (query, recursive);
2283++
2284++ /* We only set the query using the global setting for recursivity here,
2285++ * it's up to the search engine to check weather it can proceed with
2286++ * deep search in the current directory or not. */
2287++ nautilus_query_set_recursive (query, location_settings_search_get_recursive ());
2288+
2289+ nautilus_query_editor_set_query (editor, query);
2290+
2291+diff --git a/src/nautilus-query.c b/src/nautilus-query.c
2292+index 59600d1..c3e4ef4 100644
2293+--- a/src/nautilus-query.c
2294++++ b/src/nautilus-query.c
2295+@@ -44,11 +44,11 @@ struct _NautilusQuery
2296+ GList *mime_types;
2297+ gboolean show_hidden;
2298+ GPtrArray *date_range;
2299++ NautilusQueryRecursive recursive;
2300+ NautilusQuerySearchType search_type;
2301+ NautilusQuerySearchContent search_content;
2302+
2303+ gboolean searching;
2304+- gboolean recursive;
2305+ char **prepared_words;
2306+ GMutex prepared_words_mutex;
2307+ };
2308+@@ -118,7 +118,7 @@ nautilus_query_get_property (GObject *object,
2309+
2310+ case PROP_RECURSIVE:
2311+ {
2312+- g_value_set_boolean (value, self->recursive);
2313++ g_value_set_enum (value, self->recursive);
2314+ }
2315+ break;
2316+
2317+@@ -181,7 +181,7 @@ nautilus_query_set_property (GObject *object,
2318+
2319+ case PROP_RECURSIVE:
2320+ {
2321+- nautilus_query_set_recursive (self, g_value_get_boolean (value));
2322++ nautilus_query_set_recursive (self, g_value_get_enum (value));
2323+ }
2324+ break;
2325+
2326+@@ -272,11 +272,12 @@ nautilus_query_class_init (NautilusQueryClass *class)
2327+ */
2328+ g_object_class_install_property (gobject_class,
2329+ PROP_RECURSIVE,
2330+- g_param_spec_boolean ("recursive",
2331+- "Whether the query is being performed on subdirectories",
2332+- "Whether the query is being performed on subdirectories or not",
2333+- FALSE,
2334+- G_PARAM_READWRITE));
2335++ g_param_spec_enum ("recursive",
2336++ "Whether the query is being performed on subdirectories",
2337++ "Whether the query is being performed on subdirectories or not",
2338++ NAUTILUS_TYPE_QUERY_RECURSIVE,
2339++ NAUTILUS_QUERY_RECURSIVE_ALWAYS,
2340++ G_PARAM_READWRITE));
2341+
2342+ /**
2343+ * NautilusQuery::search-type:
2344+@@ -636,22 +637,21 @@ nautilus_query_set_searching (NautilusQuery *query,
2345+ }
2346+ }
2347+
2348+-gboolean
2349++NautilusQueryRecursive
2350+ nautilus_query_get_recursive (NautilusQuery *query)
2351+ {
2352+- g_return_val_if_fail (NAUTILUS_IS_QUERY (query), FALSE);
2353++ g_return_val_if_fail (NAUTILUS_IS_QUERY (query),
2354++ NAUTILUS_QUERY_RECURSIVE_ALWAYS);
2355+
2356+ return query->recursive;
2357+ }
2358+
2359+ void
2360+-nautilus_query_set_recursive (NautilusQuery *query,
2361+- gboolean recursive)
2362++nautilus_query_set_recursive (NautilusQuery *query,
2363++ NautilusQueryRecursive recursive)
2364+ {
2365+ g_return_if_fail (NAUTILUS_IS_QUERY (query));
2366+
2367+- recursive = !!recursive;
2368+-
2369+ if (query->recursive != recursive)
2370+ {
2371+ query->recursive = recursive;
2372+diff --git a/src/nautilus-query.h b/src/nautilus-query.h
2373+index 2264f50..0e04061 100644
2374+--- a/src/nautilus-query.h
2375++++ b/src/nautilus-query.h
2376+@@ -35,6 +35,13 @@ typedef enum {
2377+ NAUTILUS_QUERY_SEARCH_CONTENT_FULL_TEXT,
2378+ } NautilusQuerySearchContent;
2379+
2380++typedef enum {
2381++ NAUTILUS_QUERY_RECURSIVE_NEVER,
2382++ NAUTILUS_QUERY_RECURSIVE_ALWAYS,
2383++ NAUTILUS_QUERY_RECURSIVE_LOCAL_ONLY,
2384++ NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY,
2385++} NautilusQueryRecursive;
2386++
2387+ #define NAUTILUS_TYPE_QUERY (nautilus_query_get_type ())
2388+
2389+ G_DECLARE_FINAL_TYPE (NautilusQuery, nautilus_query, NAUTILUS, QUERY, GObject)
2390+@@ -67,10 +74,9 @@ GPtrArray* nautilus_query_get_date_range (NautilusQuery *query);
2391+ void nautilus_query_set_date_range (NautilusQuery *query,
2392+ GPtrArray *date_range);
2393+
2394+-gboolean nautilus_query_get_recursive (NautilusQuery *query);
2395+-
2396+-void nautilus_query_set_recursive (NautilusQuery *query,
2397+- gboolean recursive);
2398++NautilusQueryRecursive nautilus_query_get_recursive (NautilusQuery *query);
2399++void nautilus_query_set_recursive (NautilusQuery *query,
2400++ NautilusQueryRecursive recursive);
2401+
2402+ gboolean nautilus_query_get_searching (NautilusQuery *query);
2403+
2404+diff --git a/src/nautilus-search-directory.c b/src/nautilus-search-directory.c
2405+index ae710f3..d86fda2 100644
2406+--- a/src/nautilus-search-directory.c
2407++++ b/src/nautilus-search-directory.c
2408+@@ -176,8 +176,6 @@ static void
2409+ start_search (NautilusSearchDirectory *self)
2410+ {
2411+ NautilusSearchEngineModel *model_provider;
2412+- NautilusSearchEngineSimple *simple_provider;
2413+- gboolean recursive;
2414+
2415+ if (!self->query)
2416+ {
2417+@@ -205,10 +203,6 @@ start_search (NautilusSearchDirectory *self)
2418+ model_provider = nautilus_search_engine_get_model_provider (self->engine);
2419+ nautilus_search_engine_model_set_model (model_provider, self->base_model);
2420+
2421+- simple_provider = nautilus_search_engine_get_simple_provider (self->engine);
2422+- recursive = nautilus_query_get_recursive (self->query);
2423+- g_object_set (simple_provider, "recursive", recursive, NULL);
2424+-
2425+ reset_file_list (self);
2426+
2427+ nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (self->engine));
2428+diff --git a/src/nautilus-search-engine-private.h b/src/nautilus-search-engine-private.h
2429+new file mode 100644
2430+index 0000000..e5f989f
2431+--- /dev/null
2432++++ b/src/nautilus-search-engine-private.h
2433+@@ -0,0 +1,31 @@
2434++/*
2435++ * Copyright (C) 2018 Canonical Ltd.
2436++ *
2437++ * Nautilus is free software; you can redistribute it and/or
2438++ * modify it under the terms of the GNU General Public License as
2439++ * published by the Free Software Foundation; either version 2 of the
2440++ * License, or (at your option) any later version.
2441++ *
2442++ * Nautilus is distributed in the hope that it will be useful,
2443++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2444++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2445++ * General Public License for more details.
2446++ *
2447++ * You should have received a copy of the GNU General Public
2448++ * License along with this program; see the file COPYING. If not,
2449++ * see <http://www.gnu.org/licenses/>.
2450++ *
2451++ * Author: Marco Trevisan <marco@ubuntu.com>
2452++ *
2453++ */
2454++
2455++#pragma once
2456++
2457++#include "nautilus-query.h"
2458++
2459++typedef enum {
2460++ NAUTILUS_SEARCH_ENGINE_TYPE_NON_INDEXED,
2461++ NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED,
2462++} NautilusSearchEngineType;
2463++
2464++gboolean is_recursive_search (NautilusSearchEngineType engine_type, NautilusQueryRecursive recursive, GFile *location);
2465+diff --git a/src/nautilus-search-engine-simple.c b/src/nautilus-search-engine-simple.c
2466+index 3ec9eb3..19a8616 100644
2467+--- a/src/nautilus-search-engine-simple.c
2468++++ b/src/nautilus-search-engine-simple.c
2469+@@ -20,9 +20,11 @@
2470+ */
2471+
2472+ #include <config.h>
2473++#include "nautilus-search-engine-simple.h"
2474++
2475++#include "nautilus-search-engine-private.h"
2476+ #include "nautilus-search-hit.h"
2477+ #include "nautilus-search-provider.h"
2478+-#include "nautilus-search-engine-simple.h"
2479+ #include "nautilus-ui-utilities.h"
2480+ #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
2481+ #include "nautilus-debug.h"
2482+@@ -35,7 +37,7 @@
2483+
2484+ enum
2485+ {
2486+- PROP_RECURSIVE = 1,
2487++ PROP_0,
2488+ PROP_RUNNING,
2489+ NUM_PROPERTIES
2490+ };
2491+@@ -52,7 +54,6 @@ typedef struct
2492+
2493+ GHashTable *visited;
2494+
2495+- gboolean recursive;
2496+ gint n_processed_files;
2497+ GList *hits;
2498+
2499+@@ -66,8 +67,6 @@ struct _NautilusSearchEngineSimple
2500+ NautilusQuery *query;
2501+
2502+ SearchThreadData *active_search;
2503+-
2504+- gboolean recursive;
2505+ };
2506+
2507+ static void nautilus_search_provider_init (NautilusSearchProviderInterface *iface);
2508+@@ -208,6 +207,9 @@ static void
2509+ visit_directory (GFile *dir,
2510+ SearchThreadData *data)
2511+ {
2512++ g_autoptr (GPtrArray) date_range = NULL;
2513++ NautilusQuerySearchType type;
2514++ NautilusQueryRecursive recursive;
2515+ GFileEnumerator *enumerator;
2516+ GFileInfo *info;
2517+ GFile *child;
2518+@@ -238,10 +240,12 @@ visit_directory (GFile *dir,
2519+ return;
2520+ }
2521+
2522++ type = nautilus_query_get_search_type (data->query);
2523++ recursive = nautilus_query_get_recursive (data->query);
2524++ date_range = nautilus_query_get_date_range (data->query);
2525++
2526+ while ((info = g_file_enumerator_next_file (enumerator, data->cancellable, NULL)) != NULL)
2527+ {
2528+- g_autoptr (GPtrArray) date_range = NULL;
2529+-
2530+ display_name = g_file_info_get_display_name (info);
2531+ if (display_name == NULL)
2532+ {
2533+@@ -276,15 +280,12 @@ visit_directory (GFile *dir,
2534+ mtime = g_file_info_get_attribute_uint64 (info, "time::modified");
2535+ atime = g_file_info_get_attribute_uint64 (info, "time::access");
2536+
2537+- date_range = nautilus_query_get_date_range (data->query);
2538+ if (found && date_range != NULL)
2539+ {
2540+- NautilusQuerySearchType type;
2541+ guint64 current_file_time;
2542+
2543+ initial_date = g_ptr_array_index (date_range, 0);
2544+ end_date = g_ptr_array_index (date_range, 1);
2545+- type = nautilus_query_get_search_type (data->query);
2546+
2547+ if (type == NAUTILUS_QUERY_SEARCH_TYPE_LAST_ACCESS)
2548+ {
2549+@@ -322,7 +323,10 @@ visit_directory (GFile *dir,
2550+ send_batch (data);
2551+ }
2552+
2553+- if (data->engine->recursive && g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
2554++ if (recursive != NAUTILUS_QUERY_RECURSIVE_NEVER &&
2555++ g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY &&
2556++ is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_NON_INDEXED,
2557++ recursive, child))
2558+ {
2559+ id = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_ID_FILE);
2560+ visited = FALSE;
2561+@@ -438,9 +442,9 @@ nautilus_search_engine_simple_set_query (NautilusSearchProvider *provider,
2562+ {
2563+ NautilusSearchEngineSimple *simple = NAUTILUS_SEARCH_ENGINE_SIMPLE (provider);
2564+
2565+- g_object_ref (query);
2566+ g_clear_object (&simple->query);
2567+- simple->query = query;
2568++
2569++ simple->query = g_object_ref (query);
2570+ }
2571+
2572+ static gboolean
2573+@@ -453,30 +457,6 @@ nautilus_search_engine_simple_is_running (NautilusSearchProvider *provider)
2574+ return simple->active_search != NULL;
2575+ }
2576+
2577+-static void
2578+-nautilus_search_engine_simple_set_property (GObject *object,
2579+- guint arg_id,
2580+- const GValue *value,
2581+- GParamSpec *pspec)
2582+-{
2583+- NautilusSearchEngineSimple *engine = NAUTILUS_SEARCH_ENGINE_SIMPLE (object);
2584+-
2585+- switch (arg_id)
2586+- {
2587+- case PROP_RECURSIVE:
2588+- {
2589+- engine->recursive = g_value_get_boolean (value);
2590+- }
2591+- break;
2592+-
2593+- default:
2594+- {
2595+- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, arg_id, pspec);
2596+- }
2597+- break;
2598+- }
2599+-}
2600+-
2601+ static void
2602+ nautilus_search_engine_simple_get_property (GObject *object,
2603+ guint arg_id,
2604+@@ -492,12 +472,6 @@ nautilus_search_engine_simple_get_property (GObject *object,
2605+ g_value_set_boolean (value, nautilus_search_engine_simple_is_running (NAUTILUS_SEARCH_PROVIDER (engine)));
2606+ }
2607+ break;
2608+-
2609+- case PROP_RECURSIVE:
2610+- {
2611+- g_value_set_boolean (value, engine->recursive);
2612+- }
2613+- break;
2614+ }
2615+ }
2616+
2617+@@ -518,20 +492,6 @@ nautilus_search_engine_simple_class_init (NautilusSearchEngineSimpleClass *class
2618+ gobject_class = G_OBJECT_CLASS (class);
2619+ gobject_class->finalize = finalize;
2620+ gobject_class->get_property = nautilus_search_engine_simple_get_property;
2621+- gobject_class->set_property = nautilus_search_engine_simple_set_property;
2622+-
2623+- /**
2624+- * NautilusSearchEngineSimple::recursive:
2625+- *
2626+- * Whether the search is recursive or not.
2627+- */
2628+- g_object_class_install_property (gobject_class,
2629+- PROP_RECURSIVE,
2630+- g_param_spec_boolean ("recursive",
2631+- "recursive",
2632+- "recursive",
2633+- FALSE,
2634+- G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
2635+
2636+ /**
2637+ * NautilusSearchEngine::running:
2638+diff --git a/src/nautilus-search-engine-simple.h b/src/nautilus-search-engine-simple.h
2639+index dd6953f..d50b36d 100644
2640+--- a/src/nautilus-search-engine-simple.h
2641++++ b/src/nautilus-search-engine-simple.h
2642+@@ -22,6 +22,8 @@
2643+ #ifndef NAUTILUS_SEARCH_ENGINE_SIMPLE_H
2644+ #define NAUTILUS_SEARCH_ENGINE_SIMPLE_H
2645+
2646++#include <glib-object.h>
2647++
2648+ G_BEGIN_DECLS
2649+
2650+ #define NAUTILUS_TYPE_SEARCH_ENGINE_SIMPLE (nautilus_search_engine_simple_get_type ())
2651+diff --git a/src/nautilus-search-engine-tracker.c b/src/nautilus-search-engine-tracker.c
2652+index 4c917dd..8885ca4 100644
2653+--- a/src/nautilus-search-engine-tracker.c
2654++++ b/src/nautilus-search-engine-tracker.c
2655+@@ -22,7 +22,7 @@
2656+ #include <config.h>
2657+ #include "nautilus-search-engine-tracker.h"
2658+
2659+-#include "nautilus-global-preferences.h"
2660++#include "nautilus-search-engine-private.h"
2661+ #include "nautilus-search-hit.h"
2662+ #include "nautilus-search-provider.h"
2663+ #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
2664+@@ -295,7 +295,6 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
2665+ GString *sparql;
2666+ GList *mimetypes, *l;
2667+ gint mime_count;
2668+- gboolean recursive;
2669+ GPtrArray *date_range;
2670+
2671+ tracker = NAUTILUS_SEARCH_ENGINE_TRACKER (provider);
2672+@@ -317,10 +316,6 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
2673+ return;
2674+ }
2675+
2676+- recursive = g_settings_get_enum (nautilus_preferences, "recursive-search") == NAUTILUS_SPEED_TRADEOFF_LOCAL_ONLY ||
2677+- g_settings_get_enum (nautilus_preferences, "recursive-search") == NAUTILUS_SPEED_TRADEOFF_ALWAYS;
2678+- tracker->recursive = recursive;
2679+-
2680+ tracker->fts_enabled = nautilus_query_get_search_content (tracker->query);
2681+
2682+ query_text = nautilus_query_get_text (tracker->query);
2683+@@ -468,13 +463,18 @@ static void
2684+ nautilus_search_engine_tracker_set_query (NautilusSearchProvider *provider,
2685+ NautilusQuery *query)
2686+ {
2687++ g_autoptr(GFile) location = NULL;
2688+ NautilusSearchEngineTracker *tracker;
2689+
2690+ tracker = NAUTILUS_SEARCH_ENGINE_TRACKER (provider);
2691++ location = nautilus_query_get_location (query);
2692+
2693+- g_object_ref (query);
2694+ g_clear_object (&tracker->query);
2695+- tracker->query = query;
2696++
2697++ tracker->query = g_object_ref (query);
2698++ tracker->recursive = is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED,
2699++ nautilus_query_get_recursive (query),
2700++ location);
2701+ }
2702+
2703+ static gboolean
2704+diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c
2705+index 209bd4f..3a0c9d4 100644
2706+--- a/src/nautilus-search-engine.c
2707++++ b/src/nautilus-search-engine.c
2708+@@ -20,14 +20,16 @@
2709+ */
2710+
2711+ #include <config.h>
2712+-
2713+-#include <glib/gi18n.h>
2714+-#include "nautilus-search-provider.h"
2715+ #include "nautilus-search-engine.h"
2716+-#include "nautilus-search-engine-simple.h"
2717++#include "nautilus-search-engine-private.h"
2718++
2719++#include "nautilus-file.h"
2720+ #include "nautilus-search-engine-model.h"
2721++#include "nautilus-search-provider.h"
2722++#include <glib/gi18n.h>
2723+ #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
2724+ #include "nautilus-debug.h"
2725++#include "nautilus-search-engine-simple.h"
2726+ #include "nautilus-search-engine-tracker.h"
2727+
2728+ typedef struct
2729+@@ -417,12 +419,28 @@ nautilus_search_engine_get_model_provider (NautilusSearchEngine *engine)
2730+ return priv->model;
2731+ }
2732+
2733+-NautilusSearchEngineSimple *
2734+-nautilus_search_engine_get_simple_provider (NautilusSearchEngine *engine)
2735++gboolean
2736++is_recursive_search (NautilusSearchEngineType engine_type,
2737++ NautilusQueryRecursive recursive,
2738++ GFile *location)
2739+ {
2740+- NautilusSearchEnginePrivate *priv;
2741++ switch (recursive)
2742++ {
2743++ case NAUTILUS_QUERY_RECURSIVE_NEVER:
2744++ return FALSE;
2745+
2746+- priv = nautilus_search_engine_get_instance_private (engine);
2747++ case NAUTILUS_QUERY_RECURSIVE_ALWAYS:
2748++ return TRUE;
2749++
2750++ case NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY:
2751++ return engine_type == NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED;
2752++
2753++ case NAUTILUS_QUERY_RECURSIVE_LOCAL_ONLY:
2754++ {
2755++ g_autoptr (NautilusFile) file = nautilus_file_get (location);
2756++ return !nautilus_file_is_remote (file);
2757++ }
2758++ }
2759+
2760+- return priv->simple;
2761++ return TRUE;
2762+ }
2763+diff --git a/src/nautilus-search-engine.h b/src/nautilus-search-engine.h
2764+index 0416e83..435908a 100644
2765+--- a/src/nautilus-search-engine.h
2766++++ b/src/nautilus-search-engine.h
2767+@@ -42,8 +42,6 @@ struct _NautilusSearchEngineClass
2768+ NautilusSearchEngine *nautilus_search_engine_new (void);
2769+ NautilusSearchEngineModel *
2770+ nautilus_search_engine_get_model_provider (NautilusSearchEngine *engine);
2771+-NautilusSearchEngineSimple *
2772+- nautilus_search_engine_get_simple_provider (NautilusSearchEngine *engine);
2773+
2774+ G_END_DECLS
2775+
2776+diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
2777+index cdadc08..ffc2b7f 100644
2778+--- a/src/nautilus-shell-search-provider.c
2779++++ b/src/nautilus-shell-search-provider.c
2780+@@ -426,15 +426,30 @@ search_add_volumes_and_bookmarks (PendingSearch *search)
2781+ g_object_unref (volume_monitor);
2782+ }
2783+
2784++static NautilusQuery*
2785++shell_query_new (gchar **terms)
2786++{
2787++ NautilusQuery *query;
2788++ g_autoptr (GFile) home = NULL;
2789++ g_autofree gchar *terms_joined = NULL;
2790++
2791++ terms_joined = g_strjoinv (" ", terms);
2792++ home = g_file_new_for_path (g_get_home_dir ());
2793++
2794++ query = nautilus_query_new ();
2795++ nautilus_query_set_text (query, terms_joined);
2796++ nautilus_query_set_location (query, home);
2797++
2798++ return query;
2799++}
2800++
2801+ static void
2802+ execute_search (NautilusShellSearchProvider *self,
2803+ GDBusMethodInvocation *invocation,
2804+ gchar **terms)
2805+ {
2806+- gchar *terms_joined;
2807+ NautilusQuery *query;
2808+ PendingSearch *pending_search;
2809+- GFile *home;
2810+
2811+ cancel_current_search (self);
2812+
2813+@@ -446,13 +461,9 @@ execute_search (NautilusShellSearchProvider *self,
2814+ return;
2815+ }
2816+
2817+- terms_joined = g_strjoinv (" ", terms);
2818+- home = g_file_new_for_path (g_get_home_dir ());
2819+-
2820+- query = nautilus_query_new ();
2821++ query = shell_query_new (terms);
2822++ nautilus_query_set_recursive (query, NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY);
2823+ nautilus_query_set_show_hidden_files (query, FALSE);
2824+- nautilus_query_set_text (query, terms_joined);
2825+- nautilus_query_set_location (query, home);
2826+
2827+ pending_search = g_slice_new0 (PendingSearch);
2828+ pending_search->invocation = g_object_ref (invocation);
2829+@@ -479,9 +490,6 @@ execute_search (NautilusShellSearchProvider *self,
2830+ nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (pending_search->engine),
2831+ query);
2832+ nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (pending_search->engine));
2833+-
2834+- g_clear_object (&home);
2835+- g_free (terms_joined);
2836+ }
2837+
2838+ static gboolean
2839+@@ -713,13 +721,23 @@ handle_launch_search (NautilusShellSearchProvider2 *skeleton,
2840+ gpointer user_data)
2841+ {
2842+ GApplication *app = g_application_get_default ();
2843+- gchar *string = g_strjoinv (" ", terms);
2844+- gchar *uri = nautilus_get_home_directory_uri ();
2845++ g_autoptr (NautilusQuery) query = shell_query_new (terms);
2846+
2847+- nautilus_application_search (NAUTILUS_APPLICATION (app), uri, string);
2848++ if (location_settings_search_get_recursive () == NAUTILUS_QUERY_RECURSIVE_NEVER)
2849++ {
2850++ /*
2851++ * If no recursive search is enabled, we still want to be able to
2852++ * show the same results we presented in the overview when nautilus
2853++ * is explicitly launched to access to more results, and thus we perform
2854++ * a query showing results coming from index-based search engines.
2855++ * Otherwise we just respect the user settings.
2856++ * See: https://gitlab.gnome.org/GNOME/nautilus/merge_requests/249
2857++ */
2858++ nautilus_query_set_recursive (query,
2859++ NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY);
2860++ }
2861+
2862+- g_free (string);
2863+- g_free (uri);
2864++ nautilus_application_search (NAUTILUS_APPLICATION (app), query);
2865+
2866+ nautilus_shell_search_provider2_complete_launch_search (skeleton, invocation);
2867+ return TRUE;
2868+diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
2869+index 7b27244..9b9a7aa 100644
2870+--- a/src/nautilus-window-slot.c
2871++++ b/src/nautilus-window-slot.c
2872+@@ -100,6 +100,7 @@ typedef struct
2873+
2874+ /* Query editor */
2875+ NautilusQueryEditor *query_editor;
2876++ NautilusQuery *pending_search_query;
2877+ gulong qe_changed_id;
2878+ gulong qe_cancel_id;
2879+ gulong qe_activated_id;
2880+@@ -110,7 +111,6 @@ typedef struct
2881+ * finish. Used for showing a spinner to provide feedback to the user. */
2882+ gboolean allow_stop;
2883+ gboolean needs_reload;
2884+- gchar *pending_search_text;
2885+
2886+ /* New location. */
2887+ GFile *pending_location;
2888+@@ -361,9 +361,9 @@ update_search_visible (NautilusWindowSlot *self)
2889+ g_object_unref (query);
2890+ }
2891+
2892+- if (priv->pending_search_text)
2893++ if (priv->pending_search_query)
2894+ {
2895+- nautilus_window_slot_search (self, g_strdup (priv->pending_search_text));
2896++ nautilus_window_slot_search (self, g_object_ref (priv->pending_search_query));
2897+ }
2898+ }
2899+
2900+@@ -589,17 +589,13 @@ nautilus_window_slot_get_search_visible (NautilusWindowSlot *self)
2901+
2902+ void
2903+ nautilus_window_slot_search (NautilusWindowSlot *self,
2904+- const gchar *text)
2905++ NautilusQuery *query)
2906+ {
2907+ NautilusWindowSlotPrivate *priv;
2908+ NautilusView *view;
2909+
2910+ priv = nautilus_window_slot_get_instance_private (self);
2911+- if (priv->pending_search_text)
2912+- {
2913+- g_free (priv->pending_search_text);
2914+- priv->pending_search_text = NULL;
2915+- }
2916++ g_clear_object (&priv->pending_search_query);
2917+
2918+ view = nautilus_window_slot_get_current_view (self);
2919+ /* We could call this when the location is still being checked in the
2920+@@ -608,11 +604,11 @@ nautilus_window_slot_search (NautilusWindowSlot *self,
2921+ if (view)
2922+ {
2923+ nautilus_window_slot_set_search_visible (self, TRUE);
2924+- nautilus_query_editor_set_text (priv->query_editor, text);
2925++ nautilus_query_editor_set_query (priv->query_editor, query);
2926+ }
2927+ else
2928+ {
2929+- priv->pending_search_text = g_strdup (text);
2930++ priv->pending_search_query = g_object_ref (query);
2931+ }
2932+ }
2933+
2934+@@ -2812,6 +2808,7 @@ nautilus_window_slot_dispose (GObject *object)
2935+ g_clear_object (&priv->current_location_bookmark);
2936+ g_clear_object (&priv->last_location_bookmark);
2937+ g_clear_object (&priv->slot_action_group);
2938++ g_clear_object (&priv->pending_search_query);
2939+
2940+ g_clear_pointer (&priv->find_mount_cancellable, g_cancellable_cancel);
2941+
2942+diff --git a/src/nautilus-window-slot.h b/src/nautilus-window-slot.h
2943+index 573357d..f67b6ab 100644
2944+--- a/src/nautilus-window-slot.h
2945++++ b/src/nautilus-window-slot.h
2946+@@ -112,7 +112,7 @@ void nautilus_window_slot_set_active (NautilusWindowSlot *
2947+ gboolean nautilus_window_slot_get_loading (NautilusWindowSlot *slot);
2948+
2949+ void nautilus_window_slot_search (NautilusWindowSlot *slot,
2950+- const gchar *text);
2951++ NautilusQuery *query);
2952+
2953+ gboolean nautilus_window_slot_handles_location (NautilusWindowSlot *self,
2954+ GFile *location);
2955+diff --git a/src/nautilus-window.c b/src/nautilus-window.c
2956+index d355e1e..b10c623 100644
2957+--- a/src/nautilus-window.c
2958++++ b/src/nautilus-window.c
2959+@@ -3107,14 +3107,14 @@ nautilus_window_show_about_dialog (NautilusWindow *window)
2960+
2961+ void
2962+ nautilus_window_search (NautilusWindow *window,
2963+- const gchar *text)
2964++ NautilusQuery *query)
2965+ {
2966+ NautilusWindowSlot *active_slot;
2967+
2968+ active_slot = nautilus_window_get_active_slot (window);
2969+ if (active_slot)
2970+ {
2971+- nautilus_window_slot_search (active_slot, text);
2972++ nautilus_window_slot_search (active_slot, query);
2973+ }
2974+ else
2975+ {
2976+diff --git a/src/nautilus-window.h b/src/nautilus-window.h
2977+index 39b16e7..c1196d3 100644
2978+--- a/src/nautilus-window.h
2979++++ b/src/nautilus-window.h
2980+@@ -135,7 +135,7 @@ void nautilus_window_end_dnd (NautilusWindow *window,
2981+ GdkDragContext *context);
2982+
2983+ void nautilus_window_search (NautilusWindow *window,
2984+- const gchar *text);
2985++ NautilusQuery *query);
2986+
2987+ void nautilus_window_initialize_slot (NautilusWindow *window,
2988+ NautilusWindowSlot *slot,
2989diff --git a/debian/patches/series b/debian/patches/series
2990index d6c50a8..41a35d1 100644
2991--- a/debian/patches/series
2992+++ b/debian/patches/series
2993@@ -1,3 +1,5 @@
2994+Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch
2995+Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch
2996 multiarch_fallback.patch
2997 03_translations_list_update.patch
2998 04_suppress_umount_in_ltsp.patch
2999@@ -14,10 +16,11 @@ ubuntu_backspace_behaviour.patch
3000 0001-Respect-gtk-dialogs-use-header-for-all-dialogs.patch
3001 #Needs updating
3002 #16_unity_new_documents.patch
3003+query-add-recursive-flags-and-use-it-in-search-engines.patch
3004 0015-tracker-search-engine-don-t-start-it-if-not-availabl.patch
3005 0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch
3006 0017-recent-add-function-to-update-manager-on-file-rename.patch
3007 0018-search-engine-add-locate-based-search-engine.patch
3008 appstream-compulsory.patch
3009-server_list_segfault.patch
3010-clear_pending_selection.patch
3011+nautilusgtkplacesview-show-error-if-volume-is-not-mo.patch
3012+file-view-Always-unset-pending_selection-after-freeing-it.patch
3013diff --git a/debian/patches/server_list_segfault.patch b/debian/patches/server_list_segfault.patch
3014deleted file mode 100644
3015index 28e0784..0000000
3016--- a/debian/patches/server_list_segfault.patch
3017+++ /dev/null
3018@@ -1,57 +0,0 @@
3019-From 5a5ce0e210a97fbde85a37d24269415b11dcf5d8 Mon Sep 17 00:00:00 2001
3020-From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
3021-Date: Thu, 19 Apr 2018 03:04:58 -0500
3022-Subject: [PATCH 1/2] nautilusgtkplacesview: unset entry_pulse_timeout_id
3023- before removing it
3024-
3025-Fixes a warning on widget finalize, when trying to remove an invalid
3026-source.
3027----
3028- src/gtk/nautilusgtkplacesview.c | 1 +
3029- 1 file changed, 1 insertion(+)
3030-
3031-diff --git a/src/gtk/nautilusgtkplacesview.c b/src/gtk/nautilusgtkplacesview.c
3032-index de0610e52..e00576658 100644
3033---- a/src/gtk/nautilusgtkplacesview.c
3034-+++ b/src/gtk/nautilusgtkplacesview.c
3035-@@ -1405,6 +1405,7 @@ pulse_entry_cb (gpointer user_data)
3036- {
3037- gtk_entry_set_progress_pulse_step (GTK_ENTRY (priv->address_entry), 0.0);
3038- gtk_entry_set_progress_fraction (GTK_ENTRY (priv->address_entry), 0.0);
3039-+ priv->entry_pulse_timeout_id = 0;
3040-
3041- return G_SOURCE_REMOVE;
3042- }
3043---
3044-2.14.3
3045-
3046-
3047-From 8571e5735d4237d98f286f9d9fce59d8519826a7 Mon Sep 17 00:00:00 2001
3048-From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
3049-Date: Thu, 19 Apr 2018 03:06:31 -0500
3050-Subject: [PATCH 2/2] nautilusgtkplacesview: disconnect from server list
3051- monitor changes on destroy
3052-
3053-It might happen otherwise that a change is recorded in between the
3054-widget dispose and finalization, causing a crash when setting
3055-the visible name for the GtkStack (as that will be NULL at that point)
3056-
3057-Fixes #140
3058----
3059- src/gtk/nautilusgtkplacesview.c | 3 +++
3060- 1 file changed, 3 insertions(+)
3061-
3062-diff --git a/src/gtk/nautilusgtkplacesview.c b/src/gtk/nautilusgtkplacesview.c
3063-index e00576658..041849f60 100644
3064---- a/src/gtk/nautilusgtkplacesview.c
3065-+++ b/src/gtk/nautilusgtkplacesview.c
3066-@@ -401,6 +401,9 @@ nautilus_gtk_places_view_destroy (GtkWidget *widget)
3067- if (priv->network_monitor)
3068- g_signal_handlers_disconnect_by_func (priv->network_monitor, update_places, widget);
3069-
3070-+ if (priv->server_list_monitor)
3071-+ g_signal_handlers_disconnect_by_func (priv->server_list_monitor, server_file_changed_cb, widget);
3072-+
3073- g_cancellable_cancel (priv->cancellable);
3074- g_cancellable_cancel (priv->networks_fetching_cancellable);
3075-
3076diff --git a/debian/patches/ubuntu_backspace_behaviour.patch b/debian/patches/ubuntu_backspace_behaviour.patch
3077index 097c06f..25573ce 100644
3078--- a/debian/patches/ubuntu_backspace_behaviour.patch
3079+++ b/debian/patches/ubuntu_backspace_behaviour.patch
3080@@ -1,17 +1,17 @@
3081-From b97f085565bac06d90a8577c3e3b9c2969ab3456 Mon Sep 17 00:00:00 2001
3082-From: Sebastien Noël <sebastien@twolife.be>
3083+From: =?utf-8?q?Sebastien_No=C3=ABl?= <sebastien@twolife.be>
3084 Date: Tue, 28 Jan 2014 19:08:31 +0000
3085 Subject: Restore backspace for going to parent folder
3086
3087 This restores the behaviour from nautilus <= 3.4.
3088 ---
3089----
3090- src/nautilus-window.c | 2 ++
3091+ src/nautilus-window.c | 2 ++
3092 1 file changed, 2 insertions(+)
3093
3094+diff --git a/src/nautilus-window.c b/src/nautilus-window.c
3095+index 0bff4e0..d355e1e 100644
3096 --- a/src/nautilus-window.c
3097 +++ b/src/nautilus-window.c
3098-@@ -2291,6 +2291,7 @@ const GActionEntry win_entries[] =
3099+@@ -2244,6 +2244,7 @@ const GActionEntry win_entries[] =
3100 {
3101 { "back", action_back },
3102 { "forward", action_forward },
3103@@ -19,9 +19,9 @@ This restores the behaviour from nautilus <= 3.4.
3104 { "up", action_up },
3105 { "view-menu", action_toggle_state_view_button, NULL, "false", NULL },
3106 { "reload", action_reload },
3107-@@ -2359,6 +2360,7 @@ nautilus_window_initialize_actions (Naut
3108- nautilus_application_set_accelerator (app, "win.prompt-root-location", "slash");
3109- nautilus_application_set_accelerator (app, "win.prompt-home-location", "asciitilde");
3110+@@ -2319,6 +2320,7 @@ nautilus_window_initialize_actions (NautilusWindow *window)
3111+ /* Support keyboard layouts which have a dead tilde key but not a tilde key. */
3112+ nautilus_application_set_accelerators (app, "win.prompt-home-location", prompt_home_location_accels);
3113 nautilus_application_set_accelerator (app, "win.view-menu", "F10");
3114 + nautilus_application_set_accelerator (app, "win.backspaceup", "BackSpace");
3115 nautilus_application_set_accelerator (app, "win.restore-tab", "<shift><control>t");
3116diff --git a/debian/patches/ubuntu_infobars_color.patch b/debian/patches/ubuntu_infobars_color.patch
3117index 6cb9cbe..edbbe7f 100644
3118--- a/debian/patches/ubuntu_infobars_color.patch
3119+++ b/debian/patches/ubuntu_infobars_color.patch
3120@@ -1,15 +1,20 @@
3121-Description: set the infobars type to "other" rather than "question"
3122- to avoid blue cluebars
3123+From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
3124+Date: Fri, 20 Jul 2018 03:25:37 +0200
3125+Subject: set the infobars type to "other" rather than "question"
3126+
3127+to avoid blue cluebars
3128 Bug-Ubuntu: https://launchpad.net/bugs/1259059
3129 ---
3130- src/nautilus-special-location-bar.c | 2 +-
3131- src/nautilus-trash-bar.c | 2 +-
3132- src/nautilus-x-content-bar.c | 2 +-
3133+ src/nautilus-special-location-bar.c | 2 +-
3134+ src/nautilus-trash-bar.c | 2 +-
3135+ src/nautilus-x-content-bar.c | 2 +-
3136 3 files changed, 3 insertions(+), 3 deletions(-)
3137
3138+diff --git a/src/nautilus-special-location-bar.c b/src/nautilus-special-location-bar.c
3139+index dc10a82..2f9e7b6 100644
3140 --- a/src/nautilus-special-location-bar.c
3141 +++ b/src/nautilus-special-location-bar.c
3142-@@ -191,7 +191,7 @@ GtkWidget *
3143+@@ -188,7 +188,7 @@ GtkWidget *
3144 nautilus_special_location_bar_new (NautilusSpecialLocation location)
3145 {
3146 return g_object_new (NAUTILUS_TYPE_SPECIAL_LOCATION_BAR,
3147@@ -18,9 +23,11 @@ Bug-Ubuntu: https://launchpad.net/bugs/1259059
3148 "special-location", location,
3149 NULL);
3150 }
3151+diff --git a/src/nautilus-trash-bar.c b/src/nautilus-trash-bar.c
3152+index 798a023..2c2cdeb 100644
3153 --- a/src/nautilus-trash-bar.c
3154 +++ b/src/nautilus-trash-bar.c
3155-@@ -242,6 +242,6 @@ nautilus_trash_bar_new (NautilusFilesVie
3156+@@ -242,6 +242,6 @@ nautilus_trash_bar_new (NautilusFilesView *view)
3157 {
3158 return g_object_new (NAUTILUS_TYPE_TRASH_BAR,
3159 "view", view,
3160@@ -28,9 +35,11 @@ Bug-Ubuntu: https://launchpad.net/bugs/1259059
3161 + "message-type", GTK_MESSAGE_OTHER,
3162 NULL);
3163 }
3164+diff --git a/src/nautilus-x-content-bar.c b/src/nautilus-x-content-bar.c
3165+index f37c846..2c41e97 100644
3166 --- a/src/nautilus-x-content-bar.c
3167 +++ b/src/nautilus-x-content-bar.c
3168-@@ -345,7 +345,7 @@ nautilus_x_content_bar_new (GMount
3169+@@ -345,7 +345,7 @@ nautilus_x_content_bar_new (GMount *mount,
3170 const char * const *x_content_types)
3171 {
3172 return g_object_new (NAUTILUS_TYPE_X_CONTENT_BAR,
3173diff --git a/debian/patches/ubuntu_revert_no_wallpaper.patch b/debian/patches/ubuntu_revert_no_wallpaper.patch
3174index ae64e63..8c750ef 100644
3175--- a/debian/patches/ubuntu_revert_no_wallpaper.patch
3176+++ b/debian/patches/ubuntu_revert_no_wallpaper.patch
3177@@ -1,18 +1,19 @@
3178-From 90625221ec1ef82fe221c3d376d92f40154cae69 Mon Sep 17 00:00:00 2001
3179 From: Lars Uebernickel <lars.uebernickel@canonical.com>
3180 Date: Fri, 30 Oct 2015 10:42:23 +0100
3181 Subject: [PATCH] Restore background drawing
3182
3183 ---
3184- nautilus-desktop/meson.build | 2
3185- nautilus-desktop/nautilus-desktop-background.c | 627 ++++++++++++++++++++++++
3186- nautilus-desktop/nautilus-desktop-background.h | 68 ++
3187- nautilus-desktop/nautilus-desktop-canvas-view.c | 40 -
3188- nautilus-desktop/nautilus-desktop-window.c | 12
3189+ nautilus-desktop/meson.build | 2 +
3190+ nautilus-desktop/nautilus-desktop-background.c | 627 ++++++++++++++++++++++++
3191+ nautilus-desktop/nautilus-desktop-background.h | 68 +++
3192+ nautilus-desktop/nautilus-desktop-canvas-view.c | 40 +-
3193+ nautilus-desktop/nautilus-desktop-window.c | 12 +
3194 5 files changed, 735 insertions(+), 14 deletions(-)
3195 create mode 100644 nautilus-desktop/nautilus-desktop-background.c
3196 create mode 100644 nautilus-desktop/nautilus-desktop-background.h
3197
3198+diff --git a/nautilus-desktop/meson.build b/nautilus-desktop/meson.build
3199+index a5e207d..d853982 100644
3200 --- a/nautilus-desktop/meson.build
3201 +++ b/nautilus-desktop/meson.build
3202 @@ -2,6 +2,8 @@ nautilus_desktop_sources = [
3203@@ -24,6 +25,9 @@ Subject: [PATCH] Restore background drawing
3204 'nautilus-desktop-canvas-view.c',
3205 'nautilus-desktop-canvas-view.h',
3206 'nautilus-desktop-canvas-view-container.c',
3207+diff --git a/nautilus-desktop/nautilus-desktop-background.c b/nautilus-desktop/nautilus-desktop-background.c
3208+new file mode 100644
3209+index 0000000..8d1d174
3210 --- /dev/null
3211 +++ b/nautilus-desktop/nautilus-desktop-background.c
3212 @@ -0,0 +1,627 @@
3213@@ -654,6 +658,9 @@ Subject: [PATCH] Restore background drawing
3214 + "widget", container,
3215 + NULL);
3216 +}
3217+diff --git a/nautilus-desktop/nautilus-desktop-background.h b/nautilus-desktop/nautilus-desktop-background.h
3218+new file mode 100644
3219+index 0000000..29b342e
3220 --- /dev/null
3221 +++ b/nautilus-desktop/nautilus-desktop-background.h
3222 @@ -0,0 +1,68 @@
3223@@ -725,6 +732,8 @@ Subject: [PATCH] Restore background drawing
3224 +};
3225 +
3226 +#endif /* __NAUTILIUS_DESKTOP_BACKGROUND_H__ */
3227+diff --git a/nautilus-desktop/nautilus-desktop-canvas-view.c b/nautilus-desktop/nautilus-desktop-canvas-view.c
3228+index 16a285f..b281a28 100644
3229 --- a/nautilus-desktop/nautilus-desktop-canvas-view.c
3230 +++ b/nautilus-desktop/nautilus-desktop-canvas-view.c
3231 @@ -26,6 +26,7 @@
3232@@ -743,7 +752,7 @@ Subject: [PATCH] Restore background drawing
3233 };
3234
3235 static void default_zoom_level_changed (gpointer user_data);
3236-@@ -243,6 +245,23 @@ desktop_canvas_view_property_filter (Gdk
3237+@@ -243,6 +245,23 @@ desktop_canvas_view_property_filter (GdkXEvent *gdk_xevent,
3238 return GDK_FILTER_CONTINUE;
3239 }
3240
3241@@ -767,7 +776,7 @@ Subject: [PATCH] Restore background drawing
3242 static guint
3243 real_get_id (NautilusFilesView *view)
3244 {
3245-@@ -266,6 +285,12 @@ nautilus_desktop_canvas_view_dispose (GO
3246+@@ -266,6 +285,12 @@ nautilus_desktop_canvas_view_dispose (GObject *object)
3247 nautilus_files_view_update_context_menus,
3248 canvas_view);
3249
3250@@ -780,7 +789,7 @@ Subject: [PATCH] Restore background drawing
3251 G_OBJECT_CLASS (nautilus_desktop_canvas_view_parent_class)->dispose (object);
3252 }
3253
3254-@@ -328,6 +353,7 @@ nautilus_desktop_canvas_view_class_init
3255+@@ -328,6 +353,7 @@ nautilus_desktop_canvas_view_class_init (NautilusDesktopCanvasViewClass *class)
3256
3257 canvas_class->create_canvas_container = real_create_canvas_container;
3258
3259@@ -788,7 +797,7 @@ Subject: [PATCH] Restore background drawing
3260 vclass->update_context_menus = real_update_context_menus;
3261 vclass->get_view_id = real_get_id;
3262 vclass->end_loading = nautilus_desktop_canvas_view_end_loading;
3263-@@ -374,17 +400,6 @@ realized_callback (GtkWidget
3264+@@ -374,17 +400,6 @@ realized_callback (GtkWidget *widget,
3265 desktop_canvas_view);
3266 }
3267
3268@@ -806,7 +815,7 @@ Subject: [PATCH] Restore background drawing
3269 static NautilusCanvasZoomLevel
3270 get_default_zoom_level (void)
3271 {
3272-@@ -737,9 +752,6 @@ nautilus_desktop_canvas_view_init (Nauti
3273+@@ -737,9 +752,6 @@ nautilus_desktop_canvas_view_init (NautilusDesktopCanvasView *desktop_canvas_vie
3274 nautilus_files_view_set_show_foreign (NAUTILUS_FILES_VIEW (desktop_canvas_view),
3275 FALSE);
3276
3277@@ -816,6 +825,8 @@ Subject: [PATCH] Restore background drawing
3278 g_signal_connect_object (desktop_canvas_view, "realize",
3279 G_CALLBACK (realized_callback), desktop_canvas_view, 0);
3280 g_signal_connect_object (desktop_canvas_view, "unrealize",
3281+diff --git a/nautilus-desktop/nautilus-desktop-window.c b/nautilus-desktop/nautilus-desktop-window.c
3282+index f35c849..cc557c8 100644
3283 --- a/nautilus-desktop/nautilus-desktop-window.c
3284 +++ b/nautilus-desktop/nautilus-desktop-window.c
3285 @@ -44,6 +44,7 @@
3286diff --git a/debian/patches/ubuntu_sync_background_to_accountsservice.patch b/debian/patches/ubuntu_sync_background_to_accountsservice.patch
3287index 9953d85..56e6b5e 100644
3288--- a/debian/patches/ubuntu_sync_background_to_accountsservice.patch
3289+++ b/debian/patches/ubuntu_sync_background_to_accountsservice.patch
3290@@ -1,14 +1,19 @@
3291-Description: Sync chosen background filename to accountsservice
3292- used in lightdm by unity-greeter
3293+From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
3294+Date: Fri, 20 Jul 2018 03:25:37 +0200
3295+Subject: Sync chosen background filename to accountsservice
3296+
3297+used in lightdm by unity-greeter
3298 Bug: https://launchpad.net/bugs/1128492
3299 Bug: https://launchpad.net/bugs/928553
3300 ---
3301- nautilus-desktop/nautilus-desktop-background.c | 81 +++++++++++++++++++++++++
3302+ nautilus-desktop/nautilus-desktop-background.c | 81 ++++++++++++++++++++++++++
3303 1 file changed, 81 insertions(+)
3304
3305+diff --git a/nautilus-desktop/nautilus-desktop-background.c b/nautilus-desktop/nautilus-desktop-background.c
3306+index 8d1d174..1f0668b 100644
3307 --- a/nautilus-desktop/nautilus-desktop-background.c
3308 +++ b/nautilus-desktop/nautilus-desktop-background.c
3309-@@ -75,6 +75,85 @@ struct NautilusDesktopBackgroundDetails
3310+@@ -75,6 +75,85 @@ struct NautilusDesktopBackgroundDetails {
3311 };
3312
3313
3314@@ -94,7 +99,7 @@ Bug: https://launchpad.net/bugs/928553
3315 static gboolean
3316 background_settings_change_event_cb (GSettings *settings,
3317 gpointer keys,
3318-@@ -460,6 +539,8 @@ background_change_event_idle_cb (Nautilu
3319+@@ -460,6 +539,8 @@ background_change_event_idle_cb (NautilusDesktopBackground *self)
3320 gnome_bg_load_from_preferences (self->details->bg,
3321 gnome_background_preferences);
3322
3323diff --git a/debian/patches/zg_activity_logging.patch b/debian/patches/zg_activity_logging.patch
3324index c0ac76a..c713a3f 100644
3325--- a/debian/patches/zg_activity_logging.patch
3326+++ b/debian/patches/zg_activity_logging.patch
3327@@ -1,22 +1,23 @@
3328-From 7ebf2ec608b69d4e3f8cb39d8c55af7f32744c74 Mon Sep 17 00:00:00 2001
3329 From: Rico Tzschichholz <ricotz@ubuntu.com>
3330 Date: Wed, 2 Dec 2015 15:31:19 +0100
3331 Subject: [PATCH] Add zeitgeist activity logging
3332
3333 ---
3334- meson.build | 2
3335- src/nautilus-file-operations.c | 198 +++++++++++++++++++++++
3336- src/nautilus-file.c | 26 +++
3337- test/meson.build | 5
3338- test/run-zeitgeist-test.sh | 50 +++++
3339- test/test-nautilus-zeitgeist.c | 343 +++++++++++++++++++++++++++++++++++++++++
3340+ meson.build | 2 +
3341+ src/nautilus-file-operations.c | 198 ++++++++++++++++++++++++
3342+ src/nautilus-file.c | 26 ++++
3343+ test/meson.build | 5 +
3344+ test/run-zeitgeist-test.sh | 50 ++++++
3345+ test/test-nautilus-zeitgeist.c | 343 +++++++++++++++++++++++++++++++++++++++++
3346 6 files changed, 624 insertions(+)
3347- create mode 100755 test/run-zeitgeist-test.sh
3348+ create mode 100644 test/run-zeitgeist-test.sh
3349 create mode 100644 test/test-nautilus-zeitgeist.c
3350
3351+diff --git a/meson.build b/meson.build
3352+index 4d2acf2..21991e9 100644
3353 --- a/meson.build
3354 +++ b/meson.build
3355-@@ -58,6 +58,8 @@ gio_unix = dependency ('gio-unix-2.0', v
3356+@@ -55,6 +55,8 @@ gio_unix = dependency ('gio-unix-2.0', version: glib_ver)
3357 gsettings_desktop_schemas = dependency ('gsettings-desktop-schemas',
3358 version: schemas_ver)
3359
3360@@ -25,6 +26,8 @@ Subject: [PATCH] Add zeitgeist activity logging
3361 libm = cc.find_library ('libm')
3362
3363 conf = configuration_data ()
3364+diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
3365+index c641ec5..93ff3fe 100644
3366 --- a/src/nautilus-file-operations.c
3367 +++ b/src/nautilus-file-operations.c
3368 @@ -61,6 +61,8 @@
3369@@ -36,7 +39,7 @@ Subject: [PATCH] Add zeitgeist activity logging
3370 /* TODO: TESTING!!! */
3371
3372 typedef struct
3373-@@ -234,6 +236,112 @@ typedef struct
3374+@@ -235,6 +237,112 @@ typedef struct
3375 #define MERGE_ALL _("Merge _All")
3376 #define COPY_FORCE _("Copy _Anyway")
3377
3378@@ -149,7 +152,7 @@ Subject: [PATCH] Add zeitgeist activity logging
3379 static void
3380 mark_desktop_file_executable (CommonJob *common,
3381 GCancellable *cancellable,
3382-@@ -2355,6 +2463,37 @@ delete_task_done (GObject *source_o
3383+@@ -2364,6 +2472,37 @@ delete_task_done (GObject *source_object,
3384
3385 job = user_data;
3386
3387@@ -187,7 +190,7 @@ Subject: [PATCH] Add zeitgeist activity logging
3388 g_list_free_full (job->files, g_object_unref);
3389
3390 if (job->done_callback)
3391-@@ -5776,6 +5915,25 @@ copy_task_done (GObject *source_obj
3392+@@ -5698,6 +5837,25 @@ copy_task_done (GObject *source_object,
3393 job->done_callback_data);
3394 }
3395
3396@@ -213,7 +216,7 @@ Subject: [PATCH] Add zeitgeist activity logging
3397 g_list_free_full (job->files, g_object_unref);
3398 if (job->destination)
3399 {
3400-@@ -6422,6 +6580,20 @@ move_task_done (GObject *source_obj
3401+@@ -6394,6 +6552,20 @@ move_task_done (GObject *source_object,
3402 job->done_callback_data);
3403 }
3404
3405@@ -234,7 +237,7 @@ Subject: [PATCH] Add zeitgeist activity logging
3406 g_list_free_full (job->files, g_object_unref);
3407 g_object_unref (job->destination);
3408 g_hash_table_unref (job->debuting_files);
3409-@@ -6807,6 +6979,25 @@ link_task_done (GObject *source_obj
3410+@@ -6779,6 +6951,25 @@ link_task_done (GObject *source_object,
3411 job->done_callback_data);
3412 }
3413
3414@@ -260,7 +263,7 @@ Subject: [PATCH] Add zeitgeist activity logging
3415 g_list_free_full (job->files, g_object_unref);
3416 g_object_unref (job->destination);
3417 g_hash_table_unref (job->debuting_files);
3418-@@ -7310,6 +7501,13 @@ create_task_done (GObject *source_o
3419+@@ -7282,6 +7473,13 @@ create_task_done (GObject *source_object,
3420 job->done_callback_data);
3421 }
3422
3423@@ -274,19 +277,21 @@ Subject: [PATCH] Add zeitgeist activity logging
3424 g_object_unref (job->dest_dir);
3425 if (job->src)
3426 {
3427+diff --git a/src/nautilus-file.c b/src/nautilus-file.c
3428+index 3a7c9a4..3f6a69f 100644
3429 --- a/src/nautilus-file.c
3430 +++ b/src/nautilus-file.c
3431-@@ -85,6 +85,9 @@
3432+@@ -87,6 +87,9 @@
3433
3434 #define MEGA_TO_BASE_RATE 1048576
3435-
3436+
3437 +#include <zeitgeist.h>
3438 +#define ZEITGEIST_NAUTILUS_ACTOR "application://nautilus.desktop"
3439 +
3440 /* Files that start with these characters sort after files that don't. */
3441 #define SORT_LAST_CHAR1 '.'
3442 #define SORT_LAST_CHAR2 '#'
3443-@@ -1980,6 +1983,29 @@ rename_get_info_callback (GObject *
3444+@@ -1992,6 +1995,29 @@ rename_get_info_callback (GObject *source_object,
3445 update_info_and_name (op->file, new_info);
3446
3447 new_uri = nautilus_file_get_uri (op->file);
3448@@ -316,9 +321,11 @@ Subject: [PATCH] Add zeitgeist activity logging
3449 nautilus_directory_moved (old_uri, new_uri);
3450 g_free (new_uri);
3451 g_free (old_uri);
3452+diff --git a/test/meson.build b/test/meson.build
3453+index f6ad5b0..5f8a1ea 100644
3454 --- a/test/meson.build
3455 +++ b/test/meson.build
3456-@@ -16,6 +16,10 @@ test_file_utilities_get_common_filename_
3457+@@ -16,6 +16,10 @@ test_file_utilities_get_common_filename_prefix = executable ('test-file-utilitie
3458 'test-file-utilities-get-common-filename-prefix.c',
3459 dependencies: libnautilus_dep)
3460
3461@@ -329,12 +336,15 @@ Subject: [PATCH] Add zeitgeist activity logging
3462 test_eel_string_get_common_prefix = executable ('test-eel-string-get-common-prefix',
3463 'test-eel-string-get-common-prefix.c',
3464 dependencies: libnautilus_dep)
3465-@@ -23,4 +27,5 @@ test_eel_string_get_common_prefix = exec
3466+@@ -23,4 +27,5 @@ test_eel_string_get_common_prefix = executable ('test-eel-string-get-common-pref
3467 test ('test-nautilus-search-engine', test_nautilus_search_engine)
3468 test ('test-nautilus-directory-async', test_nautilus_directory_async)
3469 test ('test-file-utilities-get-common-filename-prefix', test_file_utilities_get_common_filename_prefix)
3470 +test ('test-nautilus-zeitgeist', test_nautilus_zeitgeist)
3471 test ('test-eel-string-get-common-prefix', test_eel_string_get_common_prefix)
3472+diff --git a/test/run-zeitgeist-test.sh b/test/run-zeitgeist-test.sh
3473+new file mode 100644
3474+index 0000000..1f3ab19
3475 --- /dev/null
3476 +++ b/test/run-zeitgeist-test.sh
3477 @@ -0,0 +1,50 @@
3478@@ -388,6 +398,9 @@ Subject: [PATCH] Add zeitgeist activity logging
3479 +echo "Cleaning up..."
3480 +zeitgeist-daemon --quit
3481 +rm -r "${TMP_PATH}"
3482+diff --git a/test/test-nautilus-zeitgeist.c b/test/test-nautilus-zeitgeist.c
3483+new file mode 100644
3484+index 0000000..b0fea03
3485 --- /dev/null
3486 +++ b/test/test-nautilus-zeitgeist.c
3487 @@ -0,0 +1,343 @@
3488diff --git a/meson.build b/meson.build
3489index 18e645a..0b8a6f1 100644
3490--- a/meson.build
3491+++ b/meson.build
3492@@ -1,5 +1,5 @@
3493 project ('nautilus', 'c',
3494- version: '3.26.3',
3495+ version: '3.26.4',
3496 meson_version: '>=0.40.0',
3497 license: 'GPL3+')
3498
3499diff --git a/org.gnome.Nautilus.json b/org.gnome.Nautilus.json
3500deleted file mode 100644
3501index 2ed1cbc..0000000
3502--- a/org.gnome.Nautilus.json
3503+++ /dev/null
3504@@ -1,108 +0,0 @@
3505-{
3506- "app-id": "org.gnome.Nautilus",
3507- "runtime": "org.gnome.Platform",
3508- "runtime-version": "master",
3509- "sdk": "org.gnome.Sdk",
3510- "command": "nautilus",
3511- "tags": ["devel", "development", "nightly"],
3512- "desktop-file-name-prefix": "(Development) ",
3513- "finish-args": [
3514- "--share=ipc", "--socket=x11",
3515- "--socket=wayland",
3516- "--talk-name=org.gnome.OnlineAccounts",
3517- "--talk-name=org.freedesktop.Tracker1",
3518- "--filesystem=home",
3519- "--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*",
3520- "--filesystem=xdg-run/dconf", "--filesystem=~/.config/dconf:ro",
3521- "--talk-name=ca.desrt.dconf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
3522- ],
3523- "build-options" : {
3524- "cflags": "-Wno-deprecated-declarations -Og",
3525- "cxxflags": "-Wno-deprecated-declarations -Og"
3526- },
3527- "cleanup": [ "/include", "/share/bash-completion" ],
3528- "modules": [
3529- {
3530- "name": "libexif",
3531- "sources": [
3532- {
3533- "type": "archive",
3534- "url": "https://downloads.sourceforge.net/libexif/libexif-0.6.21.tar.bz2",
3535- "sha256": "16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a"
3536- },
3537- {
3538- "type": "shell",
3539- "commands": [
3540- "cp -f /usr/share/gnu-config/config.sub .",
3541- "cp -f /usr/share/gnu-config/config.guess ."
3542- ]
3543- }
3544- ]
3545- },
3546- {
3547- "name": "exempi",
3548- "config-opts": [
3549- "--disable-unittest"
3550- ],
3551- "sources": [
3552- {
3553- "type": "git",
3554- "url": "https://anongit.freedesktop.org/git/exempi.git"
3555- }
3556- ]
3557-
3558- },
3559- {
3560- "name": "tracker",
3561- "cleanup": [ "/bin", "/etc", "/libexec" ],
3562- "config-opts": [ "--disable-miner-apps", "--disable-static",
3563- "--disable-tracker-extract", "--disable-tracker-needle",
3564- "--disable-tracker-preferences", "--disable-artwork",
3565- "--disable-tracker-writeback", "--disable-miner-user-guides",
3566- "--with-bash-completion-dir=no" ],
3567- "sources": [
3568- {
3569- "type": "git",
3570- "url": "https://git.gnome.org/browse/tracker"
3571- }
3572- ]
3573- },
3574- {
3575- "name": "gnome-desktop",
3576- "config-opts": ["--disable-debug-tools", "--disable-udev"],
3577- "sources": [
3578- {
3579- "type": "git",
3580- "url": "https://git.gnome.org/browse/gnome-desktop"
3581- }
3582- ]
3583- },
3584- {
3585- "name": "gnome-autoar",
3586- "sources": [
3587- {
3588- "type": "git",
3589- "url": "https://git.gnome.org/browse/gnome-autoar"
3590- }
3591- ]
3592- },
3593- {
3594- "buildsystem": "meson",
3595- "builddir": true,
3596- "name": "nautilus",
3597- "config-opts": [
3598- "-Denable-desktop=false",
3599- "-Denable-selinux=false",
3600- "-Denable-xmp=true",
3601- "-Denable-exif=true",
3602- "--libdir=/app/lib"
3603- ],
3604- "sources": [
3605- {
3606- "type": "git",
3607- "url": "https://gitlab.gnome.org/GNOME/nautilus.git"
3608- }
3609- ]
3610- }
3611- ]
3612-}
3613diff --git a/po/zh_TW.po b/po/zh_TW.po
3614index e10497e..60df1bc 100644
3615--- a/po/zh_TW.po
3616+++ b/po/zh_TW.po
3617@@ -10,9 +10,8 @@
3618 msgid ""
3619 msgstr ""
3620 "Project-Id-Version: nautilus 3.1.90\n"
3621-"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
3622-"product=nautilus&keywords=I18N+L10N&component=Internationalization (i18n)\n"
3623-"POT-Creation-Date: 2017-09-08 11:04+0000\n"
3624+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/nautilus/issues\n"
3625+"POT-Creation-Date: 2018-01-05 19:22+0000\n"
3626 "PO-Revision-Date: 2017-09-12 01:44+0800\n"
3627 "Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"
3628 "Language-Team: Chinese(Taiwan) <zh-l10n@lists.linux.org.tw>\n"
3629@@ -694,8 +693,8 @@ msgstr "顯示更多訊息(_D)"
3630 #. Add buttons
3631 #: eel/eel-stock-dialogs.c:204 src/nautilus-file-conflict-dialog.c:325
3632 #: src/nautilus-file-operations.c:225 src/nautilus-files-view.c:1114
3633-#: src/nautilus-files-view.c:1635 src/nautilus-files-view.c:5941
3634-#: src/nautilus-files-view.c:6445 src/nautilus-location-entry.c:282
3635+#: src/nautilus-files-view.c:1635 src/nautilus-files-view.c:5947
3636+#: src/nautilus-files-view.c:6451 src/nautilus-location-entry.c:282
3637 #: src/nautilus-mime-actions.c:564 src/nautilus-mime-actions.c:568
3638 #: src/nautilus-mime-actions.c:650 src/nautilus-mime-actions.c:956
3639 #: src/nautilus-mime-actions.c:1508 src/nautilus-properties-window.c:4577
3640@@ -726,7 +725,7 @@ msgid "Unable to rename desktop icon"
3641 msgstr "無法重新命名桌面圖示"
3642
3643 #: nautilus-desktop/nautilus-desktop-link.c:142 src/nautilus-bookmark.c:116
3644-#: src/nautilus-file-utilities.c:304 src/nautilus-list-view.c:1739
3645+#: src/nautilus-file-utilities.c:304 src/nautilus-list-view.c:1742
3646 #: src/nautilus-pathbar.c:449 src/nautilus-shell-search-provider.c:315
3647 #: src/nautilus-window.c:193
3648 msgid "Home"
3649@@ -1015,7 +1014,7 @@ msgstr "重設為預設值(_F)"
3650 msgid "Replace the current List Columns settings with the default settings"
3651 msgstr "使用預設設定值取代目前的清單欄設定值"
3652
3653-#: src/nautilus-column-utilities.c:57 src/nautilus-list-view.c:1986
3654+#: src/nautilus-column-utilities.c:57 src/nautilus-list-view.c:1989
3655 #: src/resources/ui/nautilus-rename-file-popover.ui:14
3656 msgid "Name"
3657 msgstr "名稱"
3658@@ -1990,7 +1989,7 @@ msgid "Do _not Empty Trash"
3659 msgstr "不要清空回收筒(_N)"
3660
3661 #. Translators: %s is a file name formatted for display
3662-#: src/nautilus-file-operations.c:2909 src/nautilus-files-view.c:6674
3663+#: src/nautilus-file-operations.c:2909 src/nautilus-files-view.c:6680
3664 #, c-format
3665 msgid "Unable to access “%s”"
3666 msgstr "無法存取 「%s」"
3667@@ -2518,8 +2517,8 @@ msgstr "確定(_O)"
3668 msgid "Select Items Matching"
3669 msgstr "選擇項目比對"
3670
3671-#: src/nautilus-files-view.c:1637 src/nautilus-files-view.c:5942
3672-#: src/nautilus-files-view.c:6446
3673+#: src/nautilus-files-view.c:1637 src/nautilus-files-view.c:5948
3674+#: src/nautilus-files-view.c:6452
3675 msgid "_Select"
3676 msgstr "選擇(_S)"
3677
3678@@ -2596,109 +2595,109 @@ msgstr "(%s)"
3679 msgid "%s %s, %s %s"
3680 msgstr "%s %s, %s %s"
3681
3682-#: src/nautilus-files-view.c:5929
3683+#: src/nautilus-files-view.c:5935
3684 msgid "Select Move Destination"
3685 msgstr "選擇移動的目的地"
3686
3687-#: src/nautilus-files-view.c:5933
3688+#: src/nautilus-files-view.c:5939
3689 msgid "Select Copy Destination"
3690 msgstr "選擇複製的目的地"
3691
3692-#: src/nautilus-files-view.c:6442
3693+#: src/nautilus-files-view.c:6448
3694 msgid "Select Extract Destination"
3695 msgstr "選擇解開的目的地"
3696
3697 #. Translators: %s is a file name formatted for display
3698-#: src/nautilus-files-view.c:6702
3699+#: src/nautilus-files-view.c:6708
3700 #, c-format
3701 msgid "Unable to remove “%s”"
3702 msgstr "無法移除「%s」"
3703
3704 #. Translators: %s is a file name formatted for display
3705-#: src/nautilus-files-view.c:6730
3706+#: src/nautilus-files-view.c:6736
3707 #, c-format
3708 msgid "Unable to eject “%s”"
3709 msgstr "無法退出「%s」"
3710
3711-#: src/nautilus-files-view.c:6753
3712+#: src/nautilus-files-view.c:6759
3713 msgid "Unable to stop drive"
3714 msgstr "無法停止裝置"
3715
3716 #. Translators: %s is a file name formatted for display
3717-#: src/nautilus-files-view.c:6865
3718+#: src/nautilus-files-view.c:6871
3719 #, c-format
3720 msgid "Unable to start “%s”"
3721 msgstr "無法啟動「%s」"
3722
3723-#: src/nautilus-files-view.c:7776
3724+#: src/nautilus-files-view.c:7782
3725 #, c-format
3726 msgid "New Folder with Selection (%'d Item)"
3727 msgid_plural "New Folder with Selection (%'d Items)"
3728 msgstr[0] "以選取範圍新增資料夾 (%'d 個項目)"
3729
3730-#: src/nautilus-files-view.c:7836
3731+#: src/nautilus-files-view.c:7842
3732 #, c-format
3733 msgid "Open With %s"
3734 msgstr "以 %s 開啟"
3735
3736-#: src/nautilus-files-view.c:7848
3737+#: src/nautilus-files-view.c:7854
3738 msgid "Run"
3739 msgstr "執行"
3740
3741-#: src/nautilus-files-view.c:7853
3742+#: src/nautilus-files-view.c:7859
3743 msgid "Extract Here"
3744 msgstr "在此處解開"
3745
3746-#: src/nautilus-files-view.c:7854
3747+#: src/nautilus-files-view.c:7860
3748 msgid "Extract to…"
3749 msgstr "解開到…"
3750
3751-#: src/nautilus-files-view.c:7858
3752+#: src/nautilus-files-view.c:7864
3753 msgid "Open"
3754 msgstr "開啟"
3755
3756-#: src/nautilus-files-view.c:7915
3757+#: src/nautilus-files-view.c:7921
3758 #: src/resources/ui/nautilus-files-view-context-menus.ui:125
3759 msgid "_Start"
3760 msgstr "開啟(_S)"
3761
3762-#: src/nautilus-files-view.c:7921 src/gtk/nautilusgtkplacesview.c:1685
3763+#: src/nautilus-files-view.c:7927 src/gtk/nautilusgtkplacesview.c:1685
3764 msgid "_Connect"
3765 msgstr "連接(_C)"
3766
3767-#: src/nautilus-files-view.c:7927
3768+#: src/nautilus-files-view.c:7933
3769 msgid "_Start Multi-disk Drive"
3770 msgstr "開啟多磁碟裝置(_S)"
3771
3772-#: src/nautilus-files-view.c:7933
3773+#: src/nautilus-files-view.c:7939
3774 msgid "U_nlock Drive"
3775 msgstr "解鎖裝置(_N)"
3776
3777-#: src/nautilus-files-view.c:7953
3778+#: src/nautilus-files-view.c:7959
3779 msgid "Stop Drive"
3780 msgstr "停止裝置"
3781
3782-#: src/nautilus-files-view.c:7959
3783+#: src/nautilus-files-view.c:7965
3784 msgid "_Safely Remove Drive"
3785 msgstr "安全的移除裝置(_S)"
3786
3787-#: src/nautilus-files-view.c:7965 src/gtk/nautilusgtkplacesview.c:1675
3788+#: src/nautilus-files-view.c:7971 src/gtk/nautilusgtkplacesview.c:1675
3789 msgid "_Disconnect"
3790 msgstr "中斷(_D)"
3791
3792-#: src/nautilus-files-view.c:7971
3793+#: src/nautilus-files-view.c:7977
3794 msgid "_Stop Multi-disk Drive"
3795 msgstr "關閉多磁碟裝置(_S)"
3796
3797-#: src/nautilus-files-view.c:7977
3798+#: src/nautilus-files-view.c:7983
3799 msgid "_Lock Drive"
3800 msgstr "鎖定裝置(_L)"
3801
3802-#: src/nautilus-files-view.c:9660
3803+#: src/nautilus-files-view.c:9666
3804 msgid "Content View"
3805 msgstr "內容顯示模式"
3806
3807-#: src/nautilus-files-view.c:9661
3808+#: src/nautilus-files-view.c:9667
3809 msgid "View of the current folder"
3810 msgstr "顯示目前的資料夾"
3811
3812@@ -3326,18 +3325,18 @@ msgstr "(空的)"
3813 msgid "Use Default"
3814 msgstr "使用預設值"
3815
3816-#: src/nautilus-list-view.c:2114
3817+#: src/nautilus-list-view.c:2117
3818 #: src/resources/ui/nautilus-preferences-window.ui:90
3819 #: src/resources/ui/nautilus-preferences-window.ui:1162
3820 msgid "List View"
3821 msgstr "清單檢視"
3822
3823-#: src/nautilus-list-view.c:3023
3824+#: src/nautilus-list-view.c:3026
3825 #, c-format
3826 msgid "%s Visible Columns"
3827 msgstr "%s 可視欄位"
3828
3829-#: src/nautilus-list-view.c:3043
3830+#: src/nautilus-list-view.c:3046
3831 msgid "Choose the order of information to appear in this folder:"
3832 msgstr "請選擇這個資料夾顯示資訊的次序:"
3833
3834@@ -3419,7 +3418,7 @@ msgstr "要執行「%s」,還是顯示它的內容?"
3835 #: src/nautilus-mime-actions.c:641
3836 #, c-format
3837 msgid "“%s” is an executable text file."
3838-msgstr "「%s」不是可執行的文字檔。"
3839+msgstr "「%s」是可執行的文字檔。"
3840
3841 #: src/nautilus-mime-actions.c:647
3842 msgid "Run in _Terminal"
3843@@ -4190,49 +4189,49 @@ msgstr "清空(_E)"
3844 msgid "Delete all items in the Trash"
3845 msgstr "刪除回收筒中的所有項目"
3846
3847-#: src/nautilus-ui-utilities.c:381
3848+#: src/nautilus-ui-utilities.c:307
3849 #, c-format
3850 msgid "Since %d day ago"
3851 msgid_plural "Since %d days ago"
3852 msgstr[0] "%d 天前"
3853
3854-#: src/nautilus-ui-utilities.c:382
3855+#: src/nautilus-ui-utilities.c:308
3856 #, c-format
3857 msgid "%d day ago"
3858 msgid_plural "%d days ago"
3859 msgstr[0] "%d 天前"
3860
3861-#: src/nautilus-ui-utilities.c:388
3862+#: src/nautilus-ui-utilities.c:314
3863 #, c-format
3864 msgid "Since last week"
3865 msgid_plural "Since %d weeks ago"
3866 msgstr[0] "%d 週前"
3867
3868-#: src/nautilus-ui-utilities.c:389
3869+#: src/nautilus-ui-utilities.c:315
3870 #, c-format
3871 msgid "Last week"
3872 msgid_plural "%d weeks ago"
3873 msgstr[0] "%d 週前"
3874
3875-#: src/nautilus-ui-utilities.c:395
3876+#: src/nautilus-ui-utilities.c:321
3877 #, c-format
3878 msgid "Since last month"
3879 msgid_plural "Since %d months ago"
3880 msgstr[0] "%d 個月前"
3881
3882-#: src/nautilus-ui-utilities.c:396
3883+#: src/nautilus-ui-utilities.c:322
3884 #, c-format
3885 msgid "Last month"
3886 msgid_plural "%d months ago"
3887 msgstr[0] "%d 個月前"
3888
3889-#: src/nautilus-ui-utilities.c:401
3890+#: src/nautilus-ui-utilities.c:327
3891 #, c-format
3892 msgid "Since last year"
3893 msgid_plural "Since %d years ago"
3894 msgstr[0] "%d 年前"
3895
3896-#: src/nautilus-ui-utilities.c:402
3897+#: src/nautilus-ui-utilities.c:328
3898 #, c-format
3899 msgid "Last year"
3900 msgid_plural "%d years ago"
3901diff --git a/src/gtk/gtk-code-generator.sh b/src/gtk/gtk-code-generator.sh
3902index c740053..b30c479 100755
3903--- a/src/gtk/gtk-code-generator.sh
3904+++ b/src/gtk/gtk-code-generator.sh
3905@@ -5,8 +5,8 @@
3906 # action.
3907 # Also remove/add the neccesary bits to make it work inside nautilus
3908
3909-URL=https://git.gnome.org/browse/gtk+/plain/gtk/
3910-URLUI=https://git.gnome.org/browse/gtk+/plain/gtk/ui/
3911+URL=https://gitlab.gnome.org/GNOME/gtk/raw/gtk-3-22/gtk/
3912+URLUI=https://gitlab.gnome.org/GNOME/gtk/raw/gtk-3-22/gtk/ui/
3913 SUFIX=?h=gtk-3-22
3914
3915 # Since comments are not allowed inside the sed line, this is what it will do
3916diff --git a/src/gtk/nautilusgtkplacesview.c b/src/gtk/nautilusgtkplacesview.c
3917index de0610e..b72085b 100644
3918--- a/src/gtk/nautilusgtkplacesview.c
3919+++ b/src/gtk/nautilusgtkplacesview.c
3920@@ -401,6 +401,9 @@ nautilus_gtk_places_view_destroy (GtkWidget *widget)
3921 if (priv->network_monitor)
3922 g_signal_handlers_disconnect_by_func (priv->network_monitor, update_places, widget);
3923
3924+ if (priv->server_list_monitor)
3925+ g_signal_handlers_disconnect_by_func (priv->server_list_monitor, server_file_changed_cb, widget);
3926+
3927 g_cancellable_cancel (priv->cancellable);
3928 g_cancellable_cancel (priv->networks_fetching_cancellable);
3929
3930@@ -1182,8 +1185,7 @@ update_places (NautilusGtkPlacesView *view)
3931 populate_servers (view);
3932
3933 /* fetch networks and add them asynchronously */
3934- if (!nautilus_gtk_places_view_get_local_only (view))
3935- fetch_networks (view);
3936+ fetch_networks (view);
3937
3938 update_view_mode (view);
3939 /* Check whether we still are in a loading state */
3940@@ -1405,6 +1407,7 @@ pulse_entry_cb (gpointer user_data)
3941 {
3942 gtk_entry_set_progress_pulse_step (GTK_ENTRY (priv->address_entry), 0.0);
3943 gtk_entry_set_progress_fraction (GTK_ENTRY (priv->address_entry), 0.0);
3944+ priv->entry_pulse_timeout_id = 0;
3945
3946 return G_SOURCE_REMOVE;
3947 }
3948@@ -1420,7 +1423,6 @@ unmount_mount (NautilusGtkPlacesView *view,
3949
3950 priv = nautilus_gtk_places_view_get_instance_private (view);
3951 toplevel = gtk_widget_get_toplevel (GTK_WIDGET (view));
3952- operation = gtk_mount_operation_new (GTK_WINDOW (toplevel));
3953
3954 g_cancellable_cancel (priv->cancellable);
3955 g_clear_object (&priv->cancellable);
3956@@ -1898,10 +1900,45 @@ on_listbox_row_activated (NautilusGtkPlacesView *view,
3957 GtkWidget *listbox)
3958 {
3959 NautilusGtkPlacesViewPrivate *priv;
3960+ GdkEvent *event;
3961+ guint button;
3962+ GtkPlacesOpenFlags open_flags;
3963
3964 priv = nautilus_gtk_places_view_get_instance_private (view);
3965
3966- activate_row (view, row, priv->current_open_flags);
3967+ event = gtk_get_current_event ();
3968+ gdk_event_get_button (event, &button);
3969+
3970+ if (gdk_event_get_event_type (event) == GDK_BUTTON_RELEASE && button == GDK_BUTTON_MIDDLE)
3971+ open_flags = GTK_PLACES_OPEN_NEW_TAB;
3972+ else
3973+ open_flags = priv->current_open_flags;
3974+
3975+ activate_row (view, row, open_flags);
3976+}
3977+
3978+static gboolean
3979+is_mount_locally_accessible (GMount *mount)
3980+{
3981+ GFile *base_file;
3982+ gchar *path;
3983+
3984+ if (mount == NULL)
3985+ return FALSE;
3986+
3987+ base_file = g_mount_get_root (mount);
3988+
3989+ if (base_file == NULL)
3990+ return FALSE;
3991+
3992+ path = g_file_get_path (base_file);
3993+ g_object_unref (base_file);
3994+
3995+ if (path == NULL)
3996+ return FALSE;
3997+
3998+ g_free (path);
3999+ return TRUE;
4000 }
4001
4002 static gboolean
4003@@ -1911,6 +1948,7 @@ listbox_filter_func (GtkListBoxRow *row,
4004 NautilusGtkPlacesViewPrivate *priv;
4005 gboolean is_network;
4006 gboolean is_placeholder;
4007+ gboolean is_local = FALSE;
4008 gboolean retval;
4009 gboolean searching;
4010 gchar *name;
4011@@ -1923,7 +1961,20 @@ listbox_filter_func (GtkListBoxRow *row,
4012 is_network = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "is-network"));
4013 is_placeholder = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "is-placeholder"));
4014
4015- if (is_network && priv->local_only)
4016+ if (NAUTILUS_IS_GTK_PLACES_VIEW_ROW (row))
4017+ {
4018+ NautilusGtkPlacesViewRow *placesviewrow;
4019+ GMount *mount;
4020+
4021+ placesviewrow = NAUTILUS_GTK_PLACES_VIEW_ROW (row);
4022+ g_object_get(G_OBJECT (placesviewrow), "mount", &mount, NULL);
4023+
4024+ is_local = is_mount_locally_accessible (mount);
4025+
4026+ g_clear_object (&mount);
4027+ }
4028+
4029+ if (is_network && priv->local_only && !is_local)
4030 return FALSE;
4031
4032 if (is_placeholder && searching)
4033diff --git a/src/nautilus-application.c b/src/nautilus-application.c
4034index 98e6f35..3ccbf54 100644
4035--- a/src/nautilus-application.c
4036+++ b/src/nautilus-application.c
4037@@ -159,7 +159,7 @@ check_required_directories (NautilusApplication *self)
4038 GString *directories_as_string;
4039 GSList *l;
4040 char *error_string;
4041- const char *detail_string;
4042+ g_autofree char *detail_string = NULL;
4043 GtkDialog *dialog;
4044
4045 ret = FALSE;
4046diff --git a/src/nautilus-canvas-container.c b/src/nautilus-canvas-container.c
4047index b85a2ad..fa28051 100644
4048--- a/src/nautilus-canvas-container.c
4049+++ b/src/nautilus-canvas-container.c
4050@@ -6965,6 +6965,7 @@ nautilus_canvas_container_add (NautilusCanvasContainer *container,
4051 void
4052 nautilus_canvas_container_layout_now (NautilusCanvasContainer *container)
4053 {
4054+ container->details->in_layout_now = TRUE;
4055 if (container->details->idle_id != 0)
4056 {
4057 unschedule_redo_layout (container);
4058@@ -6975,6 +6976,7 @@ nautilus_canvas_container_layout_now (NautilusCanvasContainer *container)
4059 * newly added files may trigger a change in the size allocation and
4060 * thus toggle scrollbars on */
4061 gtk_container_check_resize (GTK_CONTAINER (gtk_widget_get_parent (GTK_WIDGET (container))));
4062+ container->details->in_layout_now = FALSE;
4063 }
4064
4065 /**
4066@@ -8241,6 +8243,10 @@ nautilus_canvas_container_accessible_icon_added_cb (NautilusCanvasContainer *con
4067 AtkObject *atk_parent;
4068 AtkObject *atk_child;
4069
4070+ /* We don't want to emit children_changed signals during the initial load. */
4071+ if (!container->details->in_layout_now)
4072+ return;
4073+
4074 icon = g_hash_table_lookup (container->details->icon_set, icon_data);
4075 if (icon)
4076 {
4077diff --git a/src/nautilus-canvas-item.c b/src/nautilus-canvas-item.c
4078index 9767200..d1c7817 100644
4079--- a/src/nautilus-canvas-item.c
4080+++ b/src/nautilus-canvas-item.c
4081@@ -286,6 +286,7 @@ nautilus_canvas_item_set_property (GObject *object,
4082 NautilusCanvasItem *item;
4083 NautilusCanvasItemDetails *details;
4084 AtkObject *accessible;
4085+ gboolean is_rename;
4086
4087 item = NAUTILUS_CANVAS_ITEM (object);
4088 accessible = atk_gobject_accessible_for_object (G_OBJECT (item));
4089@@ -301,13 +302,15 @@ nautilus_canvas_item_set_property (GObject *object,
4090 return;
4091 }
4092
4093+ is_rename = details->editable_text != NULL;
4094 g_free (details->editable_text);
4095 details->editable_text = g_strdup (g_value_get_string (value));
4096 if (details->text_util)
4097 {
4098 gail_text_util_text_setup (details->text_util,
4099 details->editable_text);
4100- g_object_notify (G_OBJECT (accessible), "accessible-name");
4101+ if (is_rename)
4102+ g_object_notify (G_OBJECT (accessible), "accessible-name");
4103 }
4104
4105 nautilus_canvas_item_invalidate_label_size (item);
4106diff --git a/src/nautilus-canvas-private.h b/src/nautilus-canvas-private.h
4107index 0f3ad70..0a114ba 100644
4108--- a/src/nautilus-canvas-private.h
4109+++ b/src/nautilus-canvas-private.h
4110@@ -235,6 +235,7 @@ struct NautilusCanvasContainerDetails {
4111 guint a11y_item_action_idle_handler;
4112 GQueue* a11y_item_action_queue;
4113
4114+ eel_boolean_bit in_layout_now : 1;
4115 eel_boolean_bit is_loading : 1;
4116 eel_boolean_bit needs_resort : 1;
4117 eel_boolean_bit selection_needs_resort : 1;
4118diff --git a/src/nautilus-directory.c b/src/nautilus-directory.c
4119index ad3bb03..19316e8 100644
4120--- a/src/nautilus-directory.c
4121+++ b/src/nautilus-directory.c
4122@@ -66,10 +66,14 @@ static void set_directory_location (NautilusDirectory *directory,
4123 G_DEFINE_TYPE (NautilusDirectory, nautilus_directory, G_TYPE_OBJECT);
4124
4125 static gboolean
4126-real_contains_file (NautilusDirectory *directory,
4127+real_contains_file (NautilusDirectory *self,
4128 NautilusFile *file)
4129 {
4130- return file->details->directory == directory;
4131+ NautilusDirectory *directory;
4132+
4133+ directory = nautilus_file_get_directory (file);
4134+
4135+ return directory == self;
4136 }
4137
4138 static gboolean
4139@@ -1089,7 +1093,7 @@ call_files_added_free_list (gpointer key,
4140 }
4141
4142 static void
4143-call_files_changed_common (NautilusDirectory *directory,
4144+call_files_changed_common (NautilusDirectory *self,
4145 GList *file_list)
4146 {
4147 GList *node;
4148@@ -1097,15 +1101,18 @@ call_files_changed_common (NautilusDirectory *directory,
4149
4150 for (node = file_list; node != NULL; node = node->next)
4151 {
4152+ NautilusDirectory *directory;
4153+
4154 file = node->data;
4155- if (file->details->directory == directory)
4156+ directory = nautilus_file_get_directory (file);
4157+
4158+ if (directory == self)
4159 {
4160- nautilus_directory_add_file_to_work_queue (directory,
4161- file);
4162+ nautilus_directory_add_file_to_work_queue (self, file);
4163 }
4164 }
4165- nautilus_directory_async_state_changed (directory);
4166- nautilus_directory_emit_change_signals (directory, file_list);
4167+ nautilus_directory_async_state_changed (self);
4168+ nautilus_directory_emit_change_signals (self, file_list);
4169 }
4170
4171 static void
4172@@ -1292,6 +1299,10 @@ nautilus_directory_notify_files_changed (GList *files)
4173 file = nautilus_file_get_existing (location);
4174 if (file != NULL)
4175 {
4176+ NautilusDirectory *directory;
4177+
4178+ directory = nautilus_file_get_directory (file);
4179+
4180 /* Tell it to re-get info now, and later emit
4181 * a changed signal.
4182 */
4183@@ -1299,9 +1310,7 @@ nautilus_directory_notify_files_changed (GList *files)
4184 file->details->link_info_is_up_to_date = FALSE;
4185 nautilus_file_invalidate_extension_info_internal (file);
4186
4187- hash_table_list_prepend (changed_lists,
4188- file->details->directory,
4189- file);
4190+ hash_table_list_prepend (changed_lists, directory, file);
4191 }
4192 }
4193
4194@@ -1343,11 +1352,14 @@ nautilus_directory_notify_files_removed (GList *files)
4195 file = nautilus_file_get_existing (location);
4196 if (file != NULL && !nautilus_file_rename_in_progress (file))
4197 {
4198+ NautilusDirectory *directory;
4199+
4200+ directory = nautilus_file_get_directory (file);
4201+
4202 /* Mark it gone and prepare to send the changed signal. */
4203 nautilus_file_mark_gone (file);
4204 hash_table_list_prepend (changed_lists,
4205- file->details->directory,
4206- nautilus_file_ref (file));
4207+ directory, nautilus_file_ref (file));
4208 }
4209 nautilus_file_unref (file);
4210 }
4211@@ -1505,10 +1517,12 @@ nautilus_directory_moved (const char *old_uri,
4212 list = nautilus_directory_moved_internal (old_location, new_location);
4213 for (node = list; node != NULL; node = node->next)
4214 {
4215+ NautilusDirectory *directory;
4216+
4217 file = NAUTILUS_FILE (node->data);
4218- hash_table_list_prepend (hash,
4219- file->details->directory,
4220- nautilus_file_ref (file));
4221+ directory = nautilus_file_get_directory (file);
4222+
4223+ hash_table_list_prepend (hash, directory, nautilus_file_ref (file));
4224 }
4225 nautilus_file_list_free (list);
4226
4227@@ -1554,14 +1568,14 @@ nautilus_directory_notify_files_moved (GList *file_pairs)
4228 file = nautilus_file_get_existing (to_location);
4229 if (file != NULL)
4230 {
4231+ NautilusDirectory *directory;
4232+
4233+ directory = nautilus_file_get_directory (file);
4234+
4235 /* Mark it gone and prepare to send the changed signal. */
4236 nautilus_file_mark_gone (file);
4237- new_directory = file->details->directory;
4238- hash_table_list_prepend (changed_lists,
4239- new_directory,
4240- file);
4241- collect_parent_directories (parent_directories,
4242- new_directory);
4243+ hash_table_list_prepend (changed_lists, directory, file);
4244+ collect_parent_directories (parent_directories, directory);
4245 }
4246
4247 /* Update any directory objects that are affected. */
4248@@ -1569,10 +1583,11 @@ nautilus_directory_notify_files_moved (GList *file_pairs)
4249 to_location);
4250 for (node = affected_files; node != NULL; node = node->next)
4251 {
4252+ NautilusDirectory *directory;
4253+
4254 file = NAUTILUS_FILE (node->data);
4255- hash_table_list_prepend (changed_lists,
4256- file->details->directory,
4257- file);
4258+ directory = nautilus_file_get_directory (file);
4259+ hash_table_list_prepend (changed_lists, directory, file);
4260 }
4261 unref_list = g_list_concat (unref_list, affected_files);
4262
4263@@ -1586,8 +1601,12 @@ nautilus_directory_notify_files_moved (GList *file_pairs)
4264 }
4265 else
4266 {
4267+ NautilusDirectory *directory;
4268+
4269+ directory = nautilus_file_get_directory (file);
4270+
4271 /* Handle notification in the old directory. */
4272- old_directory = file->details->directory;
4273+ old_directory = directory;
4274 collect_parent_directories (parent_directories, old_directory);
4275
4276 /* Cancel loading of attributes in the old directory */
4277diff --git a/src/nautilus-file-private.h b/src/nautilus-file-private.h
4278index adcfacf..cb2bebb 100644
4279--- a/src/nautilus-file-private.h
4280+++ b/src/nautilus-file-private.h
4281@@ -259,6 +259,8 @@ gboolean nautilus_file_set_display_name (NautilusFile
4282 const char *display_name,
4283 const char *edit_name,
4284 gboolean custom);
4285+NautilusDirectory *
4286+ nautilus_file_get_directory (NautilusFile *file);
4287 void nautilus_file_set_directory (NautilusFile *file,
4288 NautilusDirectory *directory);
4289 void nautilus_file_set_mount (NautilusFile *file,
4290diff --git a/src/nautilus-file-utilities.c b/src/nautilus-file-utilities.c
4291index 30dac56..e79f37b 100644
4292--- a/src/nautilus-file-utilities.c
4293+++ b/src/nautilus-file-utilities.c
4294@@ -623,7 +623,7 @@ nautilus_is_other_locations_directory (GFile *dir)
4295 GMount *
4296 nautilus_get_mounted_mount_for_root (GFile *location)
4297 {
4298- GVolumeMonitor *volume_monitor;
4299+ g_autoptr (GVolumeMonitor) volume_monitor = NULL;
4300 GList *mounts;
4301 GList *l;
4302 GMount *mount;
4303diff --git a/src/nautilus-file.c b/src/nautilus-file.c
4304index fc765be..0ac5398 100644
4305--- a/src/nautilus-file.c
4306+++ b/src/nautilus-file.c
4307@@ -556,6 +556,14 @@ nautilus_file_clear_info (NautilusFile *file)
4308 clear_metadata (file);
4309 }
4310
4311+NautilusDirectory *
4312+nautilus_file_get_directory (NautilusFile *file)
4313+{
4314+ g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
4315+
4316+ return file->details->directory;
4317+}
4318+
4319 void
4320 nautilus_file_set_directory (NautilusFile *file,
4321 NautilusDirectory *directory)
4322@@ -2164,7 +2172,14 @@ nautilus_file_can_rename_file (NautilusFile *file,
4323 g_error_free (error);
4324 return NULL;
4325 }
4326- new_file_name = g_strdup_printf ("%s.desktop", new_name);
4327+
4328+ /* Only append `.desktop` if it doesn't already exist. */
4329+ if (g_str_has_suffix (new_name, ".desktop")) {
4330+ new_file_name = g_strdup (new_name);
4331+ } else {
4332+ new_file_name = g_strdup_printf ("%s.desktop", new_name);
4333+ }
4334+
4335 new_file_name = g_strdelimit (new_file_name, "/", '-');
4336
4337 if (name_is (file, new_file_name))
4338@@ -5496,7 +5511,7 @@ nautilus_thumbnail_is_limited_by_zoom (int size,
4339
4340 zoom_level = size * scale;
4341
4342- if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_STANDARD)
4343+ if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_SMALL)
4344 {
4345 return TRUE;
4346 }
4347@@ -8566,10 +8581,31 @@ nautilus_file_emit_changed (NautilusFile *file)
4348 link_files = get_link_files (file);
4349 for (p = link_files; p != NULL; p = p->next)
4350 {
4351- if (p->data != file)
4352+ /* Looking for directly recursive links. */
4353+ GList *link_targets = NULL;
4354+ NautilusDirectory *directory;
4355+
4356+ if (p->data == file)
4357 {
4358- nautilus_file_changed (NAUTILUS_FILE (p->data));
4359+ continue;
4360 }
4361+
4362+ link_targets = get_link_files (p->data);
4363+ directory = nautilus_file_get_directory (p->data);
4364+
4365+ /* Reiterating (heh) that this will break with more complex cycles.
4366+ * Users, stop trying to break things on purpose.
4367+ */
4368+ if (g_list_find (link_targets, file) != NULL &&
4369+ directory == nautilus_file_get_directory (file))
4370+ {
4371+ g_signal_emit (p->data, signals[CHANGED], 0, p->data);
4372+ nautilus_file_list_free (link_targets);
4373+ continue;
4374+ }
4375+
4376+ nautilus_file_changed (NAUTILUS_FILE (p->data));
4377+ nautilus_file_list_free (link_targets);
4378 }
4379 nautilus_file_list_free (link_files);
4380 }
4381diff --git a/src/nautilus-file.h b/src/nautilus-file.h
4382index 3a83bd4..5b319f9 100644
4383--- a/src/nautilus-file.h
4384+++ b/src/nautilus-file.h
4385@@ -149,6 +149,8 @@ NautilusFile * nautilus_file_get_existing_by_uri (const c
4386 NautilusFile * nautilus_file_ref (NautilusFile *file);
4387 void nautilus_file_unref (NautilusFile *file);
4388
4389+G_DEFINE_AUTOPTR_CLEANUP_FUNC (NautilusFile, nautilus_file_unref)
4390+
4391 /* Monitor the file. */
4392 void nautilus_file_monitor_add (NautilusFile *file,
4393 gconstpointer client,
4394diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
4395index 9b7b9b9..8784f63 100644
4396--- a/src/nautilus-files-view.c
4397+++ b/src/nautilus-files-view.c
4398@@ -2047,8 +2047,9 @@ static void
4399 nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,
4400 gboolean with_selection)
4401 {
4402- g_autoptr (NautilusDirectory) containing_directory = NULL;
4403+ NautilusDirectory *containing_directory;
4404 NautilusFilesViewPrivate *priv;
4405+ GList *selection;
4406 g_autofree char *uri = NULL;
4407 g_autofree char *common_prefix = NULL;
4408
4409@@ -2062,13 +2063,8 @@ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,
4410 uri = nautilus_files_view_get_backing_uri (view);
4411 containing_directory = nautilus_directory_get_by_uri (uri);
4412
4413- if (with_selection)
4414- {
4415- GList *selection;
4416- selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
4417- common_prefix = nautilus_get_common_filename_prefix (selection, MIN_COMMON_FILENAME_PREFIX_LENGTH);
4418- nautilus_file_list_free (selection);
4419- }
4420+ selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
4421+ common_prefix = nautilus_get_common_filename_prefix (selection, MIN_COMMON_FILENAME_PREFIX_LENGTH);
4422
4423 priv->new_folder_controller =
4424 nautilus_new_folder_dialog_controller_new (nautilus_files_view_get_containing_window (view),
4425@@ -2084,6 +2080,9 @@ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,
4426 "cancelled",
4427 (GCallback) new_folder_dialog_controller_on_cancelled,
4428 view);
4429+
4430+ nautilus_file_list_free (selection);
4431+ nautilus_directory_unref (containing_directory);
4432 }
4433
4434 typedef struct
4435diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
4436index 9c168f9..2a0dfcd 100644
4437--- a/src/nautilus-list-view.c
4438+++ b/src/nautilus-list-view.c
4439@@ -592,16 +592,9 @@ button_press_callback (GtkWidget *widget,
4440 nautilus_file_unref (file);
4441 }
4442 }
4443- else
4444+ else if ((event->button == GDK_BUTTON_PRIMARY || event->button == GDK_BUTTON_SECONDARY))
4445 {
4446- if ((event->button == 1 || event->button == 3))
4447- {
4448- activate_selected_items (view);
4449- }
4450- else if (event->button == 2)
4451- {
4452- activate_selected_items_alternate (view, NULL, TRUE);
4453- }
4454+ activate_selected_items (view);
4455 }
4456 }
4457 else
4458@@ -695,6 +688,19 @@ button_press_callback (GtkWidget *widget,
4459 {
4460 do_popup_menu (widget, view, event);
4461 }
4462+
4463+ /* Don't open a new tab if we are in single click mode (this would open 2 tabs),
4464+ * or if CTRL or SHIFT is pressed.
4465+ */
4466+ if (event->button == GDK_BUTTON_MIDDLE &&
4467+ get_click_policy () != NAUTILUS_CLICK_POLICY_SINGLE &&
4468+ !button_event_modifies_selection (event))
4469+ {
4470+ gtk_tree_selection_unselect_all (selection);
4471+ gtk_tree_selection_select_path (selection, path);
4472+
4473+ activate_selected_items_alternate (view, NULL, TRUE);
4474+ }
4475 }
4476
4477 gtk_tree_path_free (path);
4478diff --git a/src/nautilus-notebook.c b/src/nautilus-notebook.c
4479index f2b3fbd..6e1db52 100644
4480--- a/src/nautilus-notebook.c
4481+++ b/src/nautilus-notebook.c
4482@@ -88,14 +88,11 @@ find_tab_num_at_pos (NautilusNotebook *notebook,
4483 gint abs_x,
4484 gint abs_y)
4485 {
4486- GtkPositionType tab_pos;
4487 int page_num = 0;
4488 GtkNotebook *nb = GTK_NOTEBOOK (notebook);
4489 GtkWidget *page;
4490 GtkAllocation allocation;
4491
4492- tab_pos = gtk_notebook_get_tab_pos (GTK_NOTEBOOK (notebook));
4493-
4494 while ((page = gtk_notebook_get_nth_page (nb, page_num)))
4495 {
4496 GtkWidget *tab;
4497@@ -118,15 +115,7 @@ find_tab_num_at_pos (NautilusNotebook *notebook,
4498 max_x = x_root + allocation.x + allocation.width;
4499 max_y = y_root + allocation.y + allocation.height;
4500
4501- if (((tab_pos == GTK_POS_TOP)
4502- || (tab_pos == GTK_POS_BOTTOM))
4503- && (abs_x <= max_x))
4504- {
4505- return page_num;
4506- }
4507- else if (((tab_pos == GTK_POS_LEFT)
4508- || (tab_pos == GTK_POS_RIGHT))
4509- && (abs_y <= max_y))
4510+ if (abs_x <= max_x && abs_y <= max_y)
4511 {
4512 return page_num;
4513 }
4514@@ -154,7 +143,7 @@ button_press_cb (NautilusNotebook *notebook,
4515 /* consume event, so that we don't pop up the context menu when
4516 * the mouse if not over a tab label
4517 */
4518- return TRUE;
4519+ return GDK_EVENT_STOP;
4520 }
4521
4522 /* switch to the page the mouse is over, but don't consume the event */
4523@@ -165,11 +154,16 @@ button_press_cb (NautilusNotebook *notebook,
4524 {
4525 GtkWidget *slot;
4526
4527+ if (tab_clicked == -1)
4528+ {
4529+ return GDK_EVENT_PROPAGATE;
4530+ }
4531+
4532 slot = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), tab_clicked);
4533 g_signal_emit (notebook, signals[TAB_CLOSE_REQUEST], 0, slot);
4534 }
4535
4536- return FALSE;
4537+ return GDK_EVENT_PROPAGATE;
4538 }
4539
4540 static void
4541diff --git a/src/nautilus-trash-monitor.c b/src/nautilus-trash-monitor.c
4542index 97f4874..1e156e1 100644
4543--- a/src/nautilus-trash-monitor.c
4544+++ b/src/nautilus-trash-monitor.c
4545@@ -29,7 +29,7 @@
4546 #include <gio/gio.h>
4547 #include <string.h>
4548
4549-#define UPDATE_RATE_SECONDS 5
4550+#define UPDATE_RATE_SECONDS 1
4551
4552 struct NautilusTrashMonitorDetails
4553 {
4554diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
4555index a9911ee..7b27244 100644
4556--- a/src/nautilus-window-slot.c
4557+++ b/src/nautilus-window-slot.c
4558@@ -1592,11 +1592,7 @@ handle_regular_file_if_needed (NautilusWindowSlot *self,
4559 if ((parent_file != NULL) &&
4560 nautilus_file_get_file_type (file) == G_FILE_TYPE_REGULAR)
4561 {
4562- if (priv->pending_selection != NULL)
4563- {
4564- nautilus_file_list_free (priv->pending_selection);
4565- }
4566-
4567+ g_clear_pointer (&priv->pending_selection, nautilus_file_list_free);
4568 g_clear_object (&priv->pending_location);
4569 g_clear_object (&priv->pending_file_to_activate);
4570 g_free (priv->pending_scroll_to);
4571@@ -2793,6 +2789,8 @@ nautilus_window_slot_dispose (GObject *object)
4572
4573 nautilus_window_slot_remove_extra_location_widgets (self);
4574
4575+ nautilus_window_slot_set_active (self, FALSE);
4576+
4577 if (priv->content_view)
4578 {
4579 gtk_widget_destroy (GTK_WIDGET (priv->content_view));
4580diff --git a/src/nautilus-window.c b/src/nautilus-window.c
4581index 9eaae35..0bff4e0 100644
4582--- a/src/nautilus-window.c
4583+++ b/src/nautilus-window.c
4584@@ -2284,6 +2284,12 @@ nautilus_window_initialize_actions (NautilusWindow *window)
4585 "<ctrl>r",
4586 NULL
4587 };
4588+ const gchar *prompt_home_location_accels[] =
4589+ {
4590+ "asciitilde",
4591+ "dead_tilde",
4592+ NULL
4593+ };
4594
4595 g_action_map_add_action_entries (G_ACTION_MAP (window),
4596 win_entries, G_N_ELEMENTS (win_entries),
4597@@ -2310,7 +2316,8 @@ nautilus_window_initialize_actions (NautilusWindow *window)
4598 nautilus_application_set_accelerator (app, "win.tab-move-left", "<shift><control>Page_Up");
4599 nautilus_application_set_accelerator (app, "win.tab-move-right", "<shift><control>Page_Down");
4600 nautilus_application_set_accelerator (app, "win.prompt-root-location", "slash");
4601- nautilus_application_set_accelerator (app, "win.prompt-home-location", "asciitilde");
4602+ /* Support keyboard layouts which have a dead tilde key but not a tilde key. */
4603+ nautilus_application_set_accelerators (app, "win.prompt-home-location", prompt_home_location_accels);
4604 nautilus_application_set_accelerator (app, "win.view-menu", "F10");
4605 nautilus_application_set_accelerator (app, "win.restore-tab", "<shift><control>t");
4606

Subscribers

People subscribed via source and target branches