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
diff --git a/NEWS b/NEWS
index 94f1bf4..2084b54 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,19 @@
1Major changes in 3.26.4
2* Fix tab lookup by coordinates in notebook (Ernestas Kulik)
3* Fix renaming of desktop files (Michael Murphy)
4* Fix crash on changes on recursive links (Ernestas Kulik, Ernestas Kulik)
5* Fix crash for non disconnected keybinding (Marco Trevisan)
6* Update Gtk-placesview code to fix crash (Marco Trevisan)
7* Avoid a11y related signals flooding on startup (Joanmarie Diggs)
8* Update flatpak generation for 3.26 (Carlos Soriano)
9* Fix Memory leaks (Rahul Verma, Wong Heung Sang)
10* Support dead_tilde key for location entry change (António Fernandes)
11* Fix middle-click for double-double-click mode (George Mocanu)
12* Updated Translations
13
14Major changes in 3.26.3.1:
15* Revert accidental backports of behavioral and visual changes
16
1Major changes in 3.26.3:17Major changes in 3.26.3:
2* Don’t strip extension from folders in compress dialog (Rahul Verma)18* Don’t strip extension from folders in compress dialog (Rahul Verma)
3* Fix items not being focused when selected in list view (António Fernandes)19* Fix items not being focused when selected in list view (António Fernandes)
diff --git a/build-aux/flatpak/org.gnome.Nautilus-v3.26.json b/build-aux/flatpak/org.gnome.Nautilus-v3.26.json
4deleted file mode 10064420deleted file mode 100644
index 9cc8cef..0000000
--- a/build-aux/flatpak/org.gnome.Nautilus-v3.26.json
+++ /dev/null
@@ -1,113 +0,0 @@
1{
2 "app-id": "org.gnome.Nautilus",
3 "runtime": "org.gnome.Platform",
4 "runtime-version": "3.26",
5 "sdk": "org.gnome.Sdk",
6 "command": "nautilus",
7 "finish-args": [
8 "--share=ipc", "--socket=x11",
9 "--socket=wayland",
10 "--talk-name=org.gnome.OnlineAccounts",
11 "--talk-name=org.freedesktop.Tracker1",
12 "--filesystem=home",
13 "--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*",
14 "--filesystem=xdg-run/dconf", "--filesystem=~/.config/dconf:ro",
15 "--talk-name=ca.desrt.dconf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
16 ],
17 "build-options" : {
18 "cflags": "-Wno-deprecated-declarations -Og",
19 "cxxflags": "-Wno-deprecated-declarations -Og"
20 },
21 "cleanup": [ "/include", "/share/bash-completion" ],
22 "modules": [
23 {
24 "name": "libexif",
25 "sources": [
26 {
27 "type": "archive",
28 "url": "https://downloads.sourceforge.net/libexif/libexif-0.6.21.tar.bz2",
29 "sha256": "16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a"
30 },
31 {
32 "type": "shell",
33 "commands": [
34 "cp -f /usr/share/gnu-config/config.sub .",
35 "cp -f /usr/share/gnu-config/config.guess ."
36 ]
37 }
38 ]
39 },
40 {
41 "name": "exempi",
42 "config-opts": [
43 "--disable-unittest"
44 ],
45 "sources": [
46 {
47 "type": "git",
48 "branch": "tags/2.4.2",
49 "commit": "bee83d2636bc875286c22ea092b7f7efb8c222d8",
50 "url": "https://anongit.freedesktop.org/git/exempi.git"
51 }
52 ]
53
54 },
55 {
56 "name": "tracker",
57 "cleanup": [ "/bin", "/etc", "/libexec" ],
58 "config-opts": [ "--disable-miner-apps", "--disable-static",
59 "--disable-tracker-extract", "--disable-tracker-needle",
60 "--disable-tracker-preferences", "--disable-artwork",
61 "--disable-tracker-writeback", "--disable-miner-user-guides",
62 "--with-bash-completion-dir=no" ],
63 "sources": [
64 {
65 "type": "git",
66 "branch": "tracker-1.12",
67 "url": "https://git.gnome.org/browse/tracker"
68 }
69 ]
70 },
71 {
72 "name": "gnome-desktop",
73 "config-opts": ["--disable-debug-tools", "--disable-udev"],
74 "sources": [
75 {
76 "type": "git",
77 "branch": "gnome-3-26",
78 "url": "https://git.gnome.org/browse/gnome-desktop"
79 }
80 ]
81 },
82 {
83 "name": "gnome-autoar",
84 "sources": [
85 {
86 "type": "git",
87 "branch": "tags/0.2.2",
88 "commit": "6d21fd1b90afb468423b78696f4f0f432033dba5",
89 "url": "https://git.gnome.org/browse/gnome-autoar"
90 }
91 ]
92 },
93 {
94 "buildsystem": "meson",
95 "builddir": true,
96 "name": "nautilus",
97 "config-opts": [
98 "-Denable-desktop=false",
99 "-Denable-selinux=false",
100 "-Denable-xmp=true",
101 "-Denable-exif=true",
102 "--libdir=/app/lib"
103 ],
104 "sources": [
105 {
106 "type": "git",
107 "branch": "gnome-3-26",
108 "url": "https://gitlab.gnome.org/GNOME/nautilus.git"
109 }
110 ]
111 }
112 ]
113}
diff --git a/build-aux/flatpak/org.gnome.Nautilus.json b/build-aux/flatpak/org.gnome.Nautilus.json
114new file mode 1006440new file mode 100644
index 0000000..3f44aeb
--- /dev/null
+++ b/build-aux/flatpak/org.gnome.Nautilus.json
@@ -0,0 +1,138 @@
1{
2 "app-id" : "org.gnome.Nautilus",
3 "runtime" : "org.gnome.Platform",
4 "runtime-version" : "3.26",
5 "sdk" : "org.gnome.Sdk",
6 "command" : "nautilus",
7 "tags" : [
8 "devel",
9 "development",
10 "nightly"
11 ],
12 "desktop-file-name-prefix" : "(Development) ",
13 "finish-args" : [
14 "--share=ipc",
15 "--socket=x11",
16 "--socket=wayland",
17 "--talk-name=org.gnome.OnlineAccounts",
18 "--talk-name=org.freedesktop.Tracker1",
19 "--filesystem=home",
20 "--talk-name=org.gtk.vfs",
21 "--talk-name=org.gtk.vfs.*",
22 "--filesystem=xdg-run/dconf",
23 "--filesystem=~/.config/dconf:ro",
24 "--talk-name=ca.desrt.dconf",
25 "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
26 ],
27 "build-options" : {
28 "cflags" : "-Wno-deprecated-declarations -Og",
29 "cxxflags" : "-Wno-deprecated-declarations -Og",
30 "env" : {
31 }
32 },
33 "cleanup" : [
34 "/include",
35 "/share/bash-completion"
36 ],
37 "modules" : [
38 {
39 "name" : "libexif",
40 "sources" : [
41 {
42 "type" : "archive",
43 "url" : "https://downloads.sourceforge.net/libexif/libexif-0.6.21.tar.bz2",
44 "sha256" : "16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a"
45 },
46 {
47 "type" : "shell",
48 "commands" : [
49 "cp -f /usr/share/gnu-config/config.sub .",
50 "cp -f /usr/share/gnu-config/config.guess ."
51 ]
52 }
53 ]
54 },
55 {
56 "name" : "exempi",
57 "config-opts" : [
58 "--disable-unittest"
59 ],
60 "sources" : [
61 {
62 "type" : "git",
63 "url" : "https://anongit.freedesktop.org/git/exempi.git",
64 "tag" : "2.4.5"
65 }
66 ]
67 },
68 {
69 "name" : "tracker",
70 "cleanup" : [
71 "/bin",
72 "/etc",
73 "/libexec"
74 ],
75 "config-opts" : [
76 "--disable-miner-apps",
77 "--disable-static",
78 "--disable-tracker-extract",
79 "--disable-tracker-needle",
80 "--disable-tracker-preferences",
81 "--disable-artwork",
82 "--disable-tracker-writeback",
83 "--disable-miner-user-guides",
84 "--with-bash-completion-dir=no"
85 ],
86 "sources" : [
87 {
88 "type" : "git",
89 "url" : "https://gitlab.gnome.org/GNOME/tracker.git",
90 "tag" : "2.0.3"
91 }
92 ]
93 },
94 {
95 "name" : "gnome-desktop",
96 "config-opts" : [
97 "--disable-debug-tools",
98 "--disable-udev"
99 ],
100 "sources" : [
101 {
102 "type" : "git",
103 "url" : "https://gitlab.gnome.org/GNOME/gnome-desktop.git",
104 "tag" : "3.26.2"
105 }
106 ]
107 },
108 {
109 "name" : "gnome-autoar",
110 "sources" : [
111 {
112 "type" : "git",
113 "url" : "https://gitlab.gnome.org/GNOME/gnome-autoar.git",
114 "tag" : "0.2.3"
115 }
116 ]
117 },
118 {
119 "buildsystem" : "meson",
120 "builddir" : true,
121 "name" : "nautilus",
122 "config-opts" : [
123 "-Denable-desktop=false",
124 "-Denable-selinux=false",
125 "-Denable-xmp=true",
126 "-Denable-exif=true",
127 "--libdir=/app/lib"
128 ],
129 "sources" : [
130 {
131 "type" : "git",
132 "url" : "https://gitlab.gnome.org/GNOME/nautilus.git",
133 "branch" : "gnome-3-26"
134 }
135 ]
136 }
137 ]
138}
0\ No newline at end of file139\ No newline at end of file
diff --git a/debian/changelog b/debian/changelog
index 30d5e5b..935ba5d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,28 @@
1nautilus (1:3.26.4-0~ubuntu18.04.1) UNRELEASED; urgency=medium
2
3 * New upstream release: 3.26.4 (LP: #1782681, LP: #1765776)
4 * debian/patches/query-add-recursive-flags-and-use-it-in-search-engines.patch,
5 debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch,
6 debian/patches/0018-search-engine-add-locate-based-search-engine.patch:
7 - Follow nautilus settings to search only in current folder (LP: #1767027).
8 This doesn't apply to gnome-shell search provider for indexed searches.
9 * debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch:
10 - Updated to respect upstream requested changes
11 * debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mounted.patch:
12 - don't crash if selecting a volume that is not mounted (LP: #1764779)
13 * debian/patches/file-view-Always-unset-pending_selection-after-freeing-it.patch:
14 - don't crash when try to select a file multiple times in a single run
15 (LP: #1713581)
16 * debian/patches/Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch,
17 debian/patches/Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch:
18 - Reverts the reverts introduced in 2.26.3.1 as they are in ubuntu already
19 * debian/patches/clear_pending_selection.patch,
20 debian/patches/git_middle_tab.patch,
21 debian/patches/server_list_segfault.patch:
22 - Patches removed as they are already applied upstream
23
24 -- Marco Trevisan (Treviño) <marco@ubuntu.com> Fri, 20 Jul 2018 04:52:45 +0200
25
1nautilus (1:3.26.3-0ubuntu4) bionic; urgency=medium26nautilus (1:3.26.3-0ubuntu4) bionic; urgency=medium
227
3 * debian/patches/server_list_segfault.patch,28 * debian/patches/server_list_segfault.patch,
diff --git a/debian/control.in b/debian/control.in
index 0d5ed26..19b2ec4 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -33,7 +33,10 @@ Build-Depends: debhelper (>= 10.3),
33 libunity-dev (>= 5.0.0),33 libunity-dev (>= 5.0.0),
34 libzeitgeist-2.0-dev,34 libzeitgeist-2.0-dev,
35Homepage: https://wiki.gnome.org/action/show/Apps/Nautilus35Homepage: https://wiki.gnome.org/action/show/Apps/Nautilus
36Vcs-Bzr: http://code.launchpad.net/~ubuntu-desktop/nautilus/ubuntu36XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/nautilus
37XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/nautilus.git
38Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/nautilus
39Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/nautilus -b ubuntu/bionic
37Standards-Version: 3.9.840Standards-Version: 3.9.8
3841
39Package: nautilus42Package: nautilus
diff --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
index 0eda334..35706df 100644
--- 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
@@ -1,4 +1,3 @@
1From d4cd0806f62422fd54e6a77f9c8767388bcb4200 Mon Sep 17 00:00:00 2001
2From: Iain Lane <iain.lane@canonical.com>1From: Iain Lane <iain.lane@canonical.com>
3Date: Mon, 24 Nov 2014 10:43:18 +00002Date: Mon, 24 Nov 2014 10:43:18 +0000
4Subject: [PATCH 1/2] Respect gtk-dialogs-use-header for all dialogs3Subject: [PATCH 1/2] Respect gtk-dialogs-use-header for all dialogs
@@ -11,6 +10,17 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
11 src/nautilus-properties-window.c | 28 ++++++++++++++++++++++++--10 src/nautilus-properties-window.c | 28 ++++++++++++++++++++++++--
12 src/nautilus-search-popover.c | 18 ++++++++++++++++-11 src/nautilus-search-popover.c | 18 ++++++++++++++++-
13 6 files changed, 106 insertions(+), 9 deletions(-)12 6 files changed, 106 insertions(+), 9 deletions(-)
13---
14 src/meson.build | 1 +
15 src/nautilus-file-conflict-dialog.c | 10 +++++++++-
16 src/nautilus-files-view.c | 38 +++++++++++++++++++++++++++++++++----
17 src/nautilus-list-view.c | 20 ++++++++++++++++++-
18 src/nautilus-properties-window.c | 28 +++++++++++++++++++++++++--
19 src/nautilus-search-popover.c | 18 +++++++++++++++++-
20 6 files changed, 106 insertions(+), 9 deletions(-)
21
22diff --git a/src/meson.build b/src/meson.build
23index 59703df..a771d12 100644
14--- a/src/meson.build24--- a/src/meson.build
15+++ b/src/meson.build25+++ b/src/meson.build
16@@ -266,6 +266,7 @@ nautilus_deps = [glib,26@@ -266,6 +266,7 @@ nautilus_deps = [glib,
@@ -21,6 +31,8 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
21 gsettings_desktop_schemas,31 gsettings_desktop_schemas,
22 libgd_dep,32 libgd_dep,
23 gail,33 gail,
34diff --git a/src/nautilus-file-conflict-dialog.c b/src/nautilus-file-conflict-dialog.c
35index fdcaf2d..1b9595d 100644
24--- a/src/nautilus-file-conflict-dialog.c36--- a/src/nautilus-file-conflict-dialog.c
25+++ b/src/nautilus-file-conflict-dialog.c37+++ b/src/nautilus-file-conflict-dialog.c
26@@ -378,9 +378,17 @@ NautilusFileConflictDialog *38@@ -378,9 +378,17 @@ NautilusFileConflictDialog *
@@ -42,9 +54,11 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
42 "modal", TRUE,54 "modal", TRUE,
43 NULL));55 NULL));
44 56
57diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
58index 9b7b9b9..f916b05 100644
45--- a/src/nautilus-files-view.c59--- a/src/nautilus-files-view.c
46+++ b/src/nautilus-files-view.c60+++ b/src/nautilus-files-view.c
47@@ -1414,16 +1414,30 @@ choose_program (NautilusFilesView *view,61@@ -1442,16 +1442,30 @@ choose_program (NautilusFilesView *view,
48 GtkWidget *dialog;62 GtkWidget *dialog;
49 g_autofree gchar *mime_type = NULL;63 g_autofree gchar *mime_type = NULL;
50 GtkWindow *parent_window;64 GtkWindow *parent_window;
@@ -78,7 +92,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
78 mime_type);92 mime_type);
79 g_object_set_data_full (G_OBJECT (dialog),93 g_object_set_data_full (G_OBJECT (dialog),
80 "directory-view:files",94 "directory-view:files",
81@@ -1628,10 +1642,26 @@ select_pattern (NautilusFilesView *view)95@@ -1656,10 +1670,26 @@ select_pattern (NautilusFilesView *view)
82 GtkWidget *grid;96 GtkWidget *grid;
83 GtkWidget *entry;97 GtkWidget *entry;
84 char *example_pattern;98 char *example_pattern;
@@ -106,9 +120,11 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
106 _("_Cancel"),120 _("_Cancel"),
107 GTK_RESPONSE_CANCEL,121 GTK_RESPONSE_CANCEL,
108 _("_Select"),122 _("_Select"),
123diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
124index 2a0dfcd..e6b4693 100644
109--- a/src/nautilus-list-view.c125--- a/src/nautilus-list-view.c
110+++ b/src/nautilus-list-view.c126+++ b/src/nautilus-list-view.c
111@@ -1105,6 +1105,8 @@ sort_column_changed_callback (GtkTreeSor127@@ -1106,6 +1106,8 @@ sort_column_changed_callback (GtkTreeSortable *sortable,
112 char *reversed_attr, *default_reversed_attr;128 char *reversed_attr, *default_reversed_attr;
113 gboolean default_sort_reversed;129 gboolean default_sort_reversed;
114 130
@@ -117,7 +133,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
117 file = nautilus_files_view_get_directory_as_file (NAUTILUS_FILES_VIEW (view));133 file = nautilus_files_view_get_directory_as_file (NAUTILUS_FILES_VIEW (view));
118 134
119 gtk_tree_sortable_get_sort_column_id (sortable, &sort_column_id, &reversed);135 gtk_tree_sortable_get_sort_column_id (sortable, &sort_column_id, &reversed);
120@@ -3017,15 +3019,31 @@ create_column_editor (NautilusListView *136@@ -3035,15 +3037,31 @@ create_column_editor (NautilusListView *view)
121 char *str;137 char *str;
122 char *name;138 char *name;
123 const char *label_text;139 const char *label_text;
@@ -150,9 +166,11 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
150 NULL, NULL);166 NULL, NULL);
151 g_free (str);167 g_free (str);
152 g_signal_connect (window, "response",168 g_signal_connect (window, "response",
169diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
170index d9ccd22..d354780 100644
153--- a/src/nautilus-properties-window.c171--- a/src/nautilus-properties-window.c
154+++ b/src/nautilus-properties-window.c172+++ b/src/nautilus-properties-window.c
155@@ -4570,10 +4570,26 @@ on_change_permissions_clicked (GtkWidget173@@ -4570,10 +4570,26 @@ on_change_permissions_clicked (GtkWidget *button,
156 GtkWidget *label;174 GtkWidget *label;
157 GtkWidget *combo;175 GtkWidget *combo;
158 GtkGrid *grid;176 GtkGrid *grid;
@@ -180,7 +198,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
180 _("_Cancel"), GTK_RESPONSE_CANCEL,198 _("_Cancel"), GTK_RESPONSE_CANCEL,
181 _("Change"), GTK_RESPONSE_OK,199 _("Change"), GTK_RESPONSE_OK,
182 NULL);200 NULL);
183@@ -4994,9 +5010,17 @@ create_properties_window (StartupData *s201@@ -4994,9 +5010,17 @@ create_properties_window (StartupData *startup_data)
184 {202 {
185 NautilusPropertiesWindow *window;203 NautilusPropertiesWindow *window;
186 GList *l;204 GList *l;
@@ -199,9 +217,11 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
199 "type-hint", GDK_WINDOW_TYPE_HINT_DIALOG,217 "type-hint", GDK_WINDOW_TYPE_HINT_DIALOG,
200 "modal", TRUE,218 "modal", TRUE,
201 NULL));219 NULL));
220diff --git a/src/nautilus-search-popover.c b/src/nautilus-search-popover.c
221index 2401363..52bee08 100644
202--- a/src/nautilus-search-popover.c222--- a/src/nautilus-search-popover.c
203+++ b/src/nautilus-search-popover.c223+++ b/src/nautilus-search-popover.c
204@@ -539,6 +539,22 @@ show_other_types_dialog (NautilusSearchP224@@ -547,6 +547,22 @@ show_other_types_dialog (NautilusSearchPopover *popover)
205 GtkCellRenderer *renderer;225 GtkCellRenderer *renderer;
206 GtkWidget *toplevel;226 GtkWidget *toplevel;
207 GtkTreeSelection *selection;227 GtkTreeSelection *selection;
@@ -224,7 +244,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=740617
224 244
225 mime_infos = g_content_types_get_registered ();245 mime_infos = g_content_types_get_registered ();
226 246
227@@ -569,7 +585,7 @@ show_other_types_dialog (NautilusSearchP247@@ -577,7 +593,7 @@ show_other_types_dialog (NautilusSearchPopover *popover)
228 toplevel = gtk_widget_get_toplevel (GTK_WIDGET (popover));248 toplevel = gtk_widget_get_toplevel (GTK_WIDGET (popover));
229 dialog = gtk_dialog_new_with_buttons (_("Select type"),249 dialog = gtk_dialog_new_with_buttons (_("Select type"),
230 GTK_WINDOW (toplevel),250 GTK_WINDOW (toplevel),
diff --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
index 4fd9909..4cc55ed 100644
--- 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
@@ -7,7 +7,7 @@ Subject: tracker-search-engine: don't start it if not available on system
7 1 file changed, 20 insertions(+), 4 deletions(-)7 1 file changed, 20 insertions(+), 4 deletions(-)
88
9diff --git a/src/nautilus-search-engine-tracker.c b/src/nautilus-search-engine-tracker.c9diff --git a/src/nautilus-search-engine-tracker.c b/src/nautilus-search-engine-tracker.c
10index 4c917dd..8218ea3 10064410index 8885ca4..050716d 100644
11--- a/src/nautilus-search-engine-tracker.c11--- a/src/nautilus-search-engine-tracker.c
12+++ b/src/nautilus-search-engine-tracker.c12+++ b/src/nautilus-search-engine-tracker.c
13@@ -42,6 +42,7 @@ struct _NautilusSearchEngineTracker13@@ -42,6 +42,7 @@ struct _NautilusSearchEngineTracker
@@ -18,7 +18,7 @@ index 4c917dd..8218ea3 100644
18 gboolean recursive;18 gboolean recursive;
19 gboolean fts_enabled;19 gboolean fts_enabled;
20 20
21@@ -305,8 +306,15 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)21@@ -304,8 +305,15 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
22 return;22 return;
23 }23 }
24 24
@@ -35,16 +35,16 @@ index 4c917dd..8218ea3 100644
35 tracker->query_pending = TRUE;35 tracker->query_pending = TRUE;
36 36
37 g_object_notify (G_OBJECT (provider), "running");37 g_object_notify (G_OBJECT (provider), "running");
38@@ -472,6 +480,9 @@ nautilus_search_engine_tracker_set_query (NautilusSearchProvider *provider,38@@ -471,6 +479,9 @@ nautilus_search_engine_tracker_set_query (NautilusSearchProvider *provider,
39 39
40 tracker = NAUTILUS_SEARCH_ENGINE_TRACKER (provider);40 g_clear_object (&tracker->query);
41 41
42+ if (!tracker->available)42+ if (!tracker->available)
43+ return;43+ return;
44+44+
45 g_object_ref (query);45 tracker->query = g_object_ref (query);
46 g_clear_object (&tracker->query);46 tracker->recursive = is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED,
47 tracker->query = query;47 nautilus_query_get_recursive (query),
48@@ -539,16 +550,21 @@ static void48@@ -539,16 +550,21 @@ static void
49 nautilus_search_engine_tracker_init (NautilusSearchEngineTracker *engine)49 nautilus_search_engine_tracker_init (NautilusSearchEngineTracker *engine)
50 {50 {
diff --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
index 1a4ee1c..f80997f 100644
--- 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
@@ -1,25 +1,34 @@
1From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>1From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
2Date: Wed, 21 Feb 2018 17:05:51 +01002Date: Wed, 21 Feb 2018 17:05:51 +0100
3Subject: search-engine: add a recent-search-engine listing GtkRecentManager3Subject: search-engine: add a recent-search-engine listing GtkRecentManager
4 stuff4 entries
55
6Using GtkRecent items as search engine source in nautilus6Using GtkRecent items as search engine source in nautilus.
7The main reason for this, is being able to get fast results on recently-used
8files from the shell search provider.
9
10This is disabled when recursive searches are disabled, as there's no need to go
11through for recent files if no recursive (or indexed) search is enabled as the
12simple engine will be already fast enough, while running this engine could be
13just a waste.
14
15Origin: upstream
16Applied-Upstream: https://gitlab.gnome.org/GNOME/nautilus/commit/69686372fd6e6
7---17---
8 src/meson.build | 2 +18 src/meson.build | 2 +
9 src/nautilus-file.h | 1 +19 src/nautilus-search-engine-recent.c | 427 ++++++++++++++++++++++++++++++++++++
10 src/nautilus-search-engine-recent.c | 385 ++++++++++++++++++++++++++++++++++++20 src/nautilus-search-engine-recent.h | 36 +++
11 src/nautilus-search-engine-recent.h | 36 ++++21 src/nautilus-search-engine.c | 11 +
12 src/nautilus-search-engine.c | 11 ++22 4 files changed, 476 insertions(+)
13 5 files changed, 435 insertions(+)
14 create mode 100644 src/nautilus-search-engine-recent.c23 create mode 100644 src/nautilus-search-engine-recent.c
15 create mode 100644 src/nautilus-search-engine-recent.h24 create mode 100644 src/nautilus-search-engine-recent.h
1625
17diff --git a/src/meson.build b/src/meson.build26diff --git a/src/meson.build b/src/meson.build
18index a771d12..0ea9165 10064427index 73aafe9..213b35f 100644
19--- a/src/meson.build28--- a/src/meson.build
20+++ b/src/meson.build29+++ b/src/meson.build
21@@ -228,6 +228,8 @@ libnautilus_sources = [30@@ -229,6 +229,8 @@ libnautilus_sources = [
22 'nautilus-search-engine.h',31 'nautilus-search-engine-private.h',
23 'nautilus-search-engine-model.c',32 'nautilus-search-engine-model.c',
24 'nautilus-search-engine-model.h',33 'nautilus-search-engine-model.h',
25+ 'nautilus-search-engine-recent.c',34+ 'nautilus-search-engine-recent.c',
@@ -27,24 +36,12 @@ index a771d12..0ea9165 100644
27 'nautilus-search-engine-simple.c',36 'nautilus-search-engine-simple.c',
28 'nautilus-search-engine-simple.h',37 'nautilus-search-engine-simple.h',
29 'nautilus-search-hit.c',38 'nautilus-search-hit.c',
30diff --git a/src/nautilus-file.h b/src/nautilus-file.h
31index 3a83bd4..fd72d7a 100644
32--- a/src/nautilus-file.h
33+++ b/src/nautilus-file.h
34@@ -49,6 +49,7 @@ typedef struct NautilusFile NautilusFile;
35 (G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_FILE))
36 #define NAUTILUS_FILE_GET_CLASS(obj) \
37 (G_TYPE_INSTANCE_GET_CLASS ((obj), NAUTILUS_TYPE_FILE, NautilusFileClass))
38+G_DEFINE_AUTOPTR_CLEANUP_FUNC (NautilusFile, g_object_unref)
39
40 typedef enum {
41 NAUTILUS_FILE_SORT_NONE,
42diff --git a/src/nautilus-search-engine-recent.c b/src/nautilus-search-engine-recent.c39diff --git a/src/nautilus-search-engine-recent.c b/src/nautilus-search-engine-recent.c
43new file mode 10064440new file mode 100644
44index 0000000..f052e8f41index 0000000..bbd0d82
45--- /dev/null42--- /dev/null
46+++ b/src/nautilus-search-engine-recent.c43+++ b/src/nautilus-search-engine-recent.c
47@@ -0,0 +1,385 @@44@@ -0,0 +1,427 @@
48+/*45+/*
49+ * Copyright (C) 2018 Canonical Ltd46+ * Copyright (C) 2018 Canonical Ltd
50+ *47+ *
@@ -69,6 +66,7 @@ index 0000000..f052e8f
69+#include "nautilus-search-hit.h"66+#include "nautilus-search-hit.h"
70+#include "nautilus-search-provider.h"67+#include "nautilus-search-provider.h"
71+#include "nautilus-search-engine-recent.h"68+#include "nautilus-search-engine-recent.h"
69+#include "nautilus-search-engine-private.h"
72+#include "nautilus-ui-utilities.h"70+#include "nautilus-ui-utilities.h"
73+#define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH71+#define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
74+#include "nautilus-debug.h"72+#include "nautilus-debug.h"
@@ -161,6 +159,51 @@ index 0000000..f052e8f
161+ return FALSE;159+ return FALSE;
162+}160+}
163+161+
162+static gboolean
163+is_file_valid_recursive (NautilusSearchEngineRecent *self,
164+ GFile *file,
165+ GError **error)
166+{
167+ g_autofree gchar *path = NULL;
168+ g_autoptr (GFileInfo) file_info = NULL;
169+
170+ file_info = g_file_query_info (file, FILE_ATTRIBS,
171+ G_FILE_QUERY_INFO_NONE,
172+ self->cancellable, error);
173+ if (*error != NULL)
174+ {
175+ return FALSE;
176+ }
177+
178+ if (!g_file_info_get_attribute_boolean (file_info,
179+ G_FILE_ATTRIBUTE_ACCESS_CAN_READ))
180+ {
181+ return FALSE;
182+ }
183+
184+ path = g_file_get_path (file);
185+
186+ if (!nautilus_query_get_show_hidden_files (self->query))
187+ {
188+ if (!g_file_info_get_is_hidden (file_info) &&
189+ !g_file_info_get_is_backup (file_info))
190+ {
191+ g_autoptr (GFile) parent = g_file_get_parent (file);
192+
193+ if (parent)
194+ {
195+ return is_file_valid_recursive (self, parent, error);
196+ }
197+ }
198+ else
199+ {
200+ return FALSE;
201+ }
202+ }
203+
204+ return TRUE;
205+}
206+
164+static gpointer207+static gpointer
165+recent_thread_func (gpointer user_data)208+recent_thread_func (gpointer user_data)
166+{209+{
@@ -199,44 +242,24 @@ index 0000000..f052e8f
199+242+
200+ if (gtk_recent_info_is_local (info))243+ if (gtk_recent_info_is_local (info))
201+ {244+ {
202+ g_autofree gchar *path = NULL;
203+ g_autoptr (GFileInfo) file_info = NULL;
204+ g_autoptr (GError) error = NULL;245+ g_autoptr (GError) error = NULL;
205+246+
206+ file_info = g_file_query_info (file, FILE_ATTRIBS,247+ if (!is_file_valid_recursive (self, file, &error))
207+ G_FILE_QUERY_INFO_NONE,
208+ self->cancellable, &error);
209+ if (error != NULL)
210+ {248+ {
211+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))249+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
212+ {250+ {
213+ break;251+ break;
214+ }252+ }
215+253+
216+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS))254+ if (error != NULL &&
255+ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS))
217+ {256+ {
218+ g_debug("Impossible to read locate file info: %s",257+ g_debug("Impossible to read recent file info: %s",
219+ error->message);258+ error->message);
220+ }259+ }
221+260+
222+ continue;261+ continue;
223+ }262+ }
224+
225+ if (!g_file_info_get_attribute_boolean (file_info,
226+ G_FILE_ATTRIBUTE_ACCESS_CAN_READ))
227+ {
228+ continue;
229+ }
230+
231+ path = g_file_get_path (file);
232+
233+ if (!nautilus_query_get_show_hidden_files (self->query) &&
234+ (g_file_info_get_is_hidden (file_info) ||
235+ g_file_info_get_is_backup (file_info) ||
236+ g_strrstr (path, G_DIR_SEPARATOR_S ".") != NULL))
237+ {
238+ continue;
239+ }
240+ }263+ }
241+264+
242+ if (g_cancellable_is_cancelled (self->cancellable))265+ if (g_cancellable_is_cancelled (self->cancellable))
@@ -333,6 +356,7 @@ index 0000000..f052e8f
333+nautilus_search_engine_recent_start (NautilusSearchProvider *provider)356+nautilus_search_engine_recent_start (NautilusSearchProvider *provider)
334+{357+{
335+ NautilusSearchEngineRecent *self = NAUTILUS_SEARCH_ENGINE_RECENT (provider);358+ NautilusSearchEngineRecent *self = NAUTILUS_SEARCH_ENGINE_RECENT (provider);
359+ g_autoptr (GFile) location = NULL;
336+ GThread *thread;360+ GThread *thread;
337+361+
338+ g_return_if_fail (self->query);362+ g_return_if_fail (self->query);
@@ -340,6 +364,21 @@ index 0000000..f052e8f
340+364+
341+ g_object_ref (self);365+ g_object_ref (self);
342+ g_object_ref (self->query);366+ g_object_ref (self->query);
367+
368+ location = nautilus_query_get_location (self->query);
369+
370+ if (!is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED,
371+ nautilus_query_get_recursive (self->query),
372+ location))
373+ {
374+ SearchHitsData *search_hits;
375+ search_hits = g_new0 (SearchHitsData, 1);
376+ search_hits->recent = self;
377+
378+ g_idle_add (search_thread_add_hits_idle, search_hits);
379+ return;
380+ }
381+
343+ self->cancellable = g_cancellable_new ();382+ self->cancellable = g_cancellable_new ();
344+383+
345+ thread = g_thread_new ("nautilus-search-recent", recent_thread_func, self);384+ thread = g_thread_new ("nautilus-search-recent", recent_thread_func, self);
@@ -473,18 +512,16 @@ index 0000000..bcd73b9
473+512+
474+#endif /* __NAUTILUS_SEARCH_ENGINE_RECENT_H__ */513+#endif /* __NAUTILUS_SEARCH_ENGINE_RECENT_H__ */
475diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c514diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c
476index 209bd4f..aef91b7 100644515index 3a0c9d4..793b831 100644
477--- a/src/nautilus-search-engine.c516--- a/src/nautilus-search-engine.c
478+++ b/src/nautilus-search-engine.c517+++ b/src/nautilus-search-engine.c
479@@ -24,6 +24,7 @@518@@ -30,11 +30,13 @@
480 #include <glib/gi18n.h>
481 #include "nautilus-search-provider.h"
482 #include "nautilus-search-engine.h"
483+#include "nautilus-search-engine-recent.h"
484 #include "nautilus-search-engine-simple.h"
485 #include "nautilus-search-engine-model.h"
486 #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH519 #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
487@@ -33,6 +34,7 @@520 #include "nautilus-debug.h"
521 #include "nautilus-search-engine-simple.h"
522+#include "nautilus-search-engine-recent.h"
523 #include "nautilus-search-engine-tracker.h"
524
488 typedef struct525 typedef struct
489 {526 {
490 NautilusSearchEngineTracker *tracker;527 NautilusSearchEngineTracker *tracker;
@@ -492,7 +529,7 @@ index 209bd4f..aef91b7 100644
492 NautilusSearchEngineSimple *simple;529 NautilusSearchEngineSimple *simple;
493 NautilusSearchEngineModel *model;530 NautilusSearchEngineModel *model;
494 531
495@@ -74,6 +76,7 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider,532@@ -76,6 +78,7 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider,
496 priv = nautilus_search_engine_get_instance_private (engine);533 priv = nautilus_search_engine_get_instance_private (engine);
497 534
498 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->tracker), query);535 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->tracker), query);
@@ -500,7 +537,7 @@ index 209bd4f..aef91b7 100644
500 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->model), query);537 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->model), query);
501 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->simple), query);538 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->simple), query);
502 }539 }
503@@ -98,6 +101,9 @@ search_engine_start_real (NautilusSearchEngine *engine)540@@ -100,6 +103,9 @@ search_engine_start_real (NautilusSearchEngine *engine)
504 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->tracker));541 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->tracker));
505 priv->providers_running++;542 priv->providers_running++;
506 543
@@ -510,7 +547,7 @@ index 209bd4f..aef91b7 100644
510 if (nautilus_search_engine_model_get_model (priv->model))547 if (nautilus_search_engine_model_get_model (priv->model))
511 {548 {
512 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->model));549 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->model));
513@@ -159,6 +165,7 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider)550@@ -161,6 +167,7 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider)
514 DEBUG ("Search engine stop");551 DEBUG ("Search engine stop");
515 552
516 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->tracker));553 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->tracker));
@@ -518,7 +555,7 @@ index 209bd4f..aef91b7 100644
518 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->model));555 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->model));
519 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->simple));556 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->simple));
520 557
521@@ -334,6 +341,7 @@ nautilus_search_engine_finalize (GObject *object)558@@ -336,6 +343,7 @@ nautilus_search_engine_finalize (GObject *object)
522 g_hash_table_destroy (priv->uris);559 g_hash_table_destroy (priv->uris);
523 560
524 g_clear_object (&priv->tracker);561 g_clear_object (&priv->tracker);
@@ -526,7 +563,7 @@ index 209bd4f..aef91b7 100644
526 g_clear_object (&priv->model);563 g_clear_object (&priv->model);
527 g_clear_object (&priv->simple);564 g_clear_object (&priv->simple);
528 565
529@@ -395,6 +403,9 @@ nautilus_search_engine_init (NautilusSearchEngine *engine)566@@ -397,6 +405,9 @@ nautilus_search_engine_init (NautilusSearchEngine *engine)
530 567
531 priv->simple = nautilus_search_engine_simple_new ();568 priv->simple = nautilus_search_engine_simple_new ();
532 connect_provider_signals (engine, NAUTILUS_SEARCH_PROVIDER (priv->simple));569 connect_provider_signals (engine, NAUTILUS_SEARCH_PROVIDER (priv->simple));
diff --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
index 99abe37..e6185da 100644
--- 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
@@ -1,5 +1,5 @@
1From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>1From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
2Date: Wed, 11 Apr 2018 18:51:34 -04002Date: Thu, 12 Apr 2018 00:51:34 +0200
3Subject: recent: add function to update manager on file rename or move3Subject: recent: add function to update manager on file rename or move
44
5When files have been moved or renamed nautilus should inform5When files have been moved or renamed nautilus should inform
@@ -7,13 +7,13 @@ recent manager about this change for the files that
7are listed there.7are listed there.
8---8---
9 src/nautilus-directory.c | 8 +++9 src/nautilus-directory.c | 8 +++
10 src/nautilus-file.c | 25 +++++-----10 src/nautilus-file.c | 25 +++++----
11 src/nautilus-recent.c | 126 +++++++++++++++++++++++++++++++++++++++++++++++11 src/nautilus-recent.c | 132 +++++++++++++++++++++++++++++++++++++++++++++++
12 src/nautilus-recent.h | 8 ++-12 src/nautilus-recent.h | 8 ++-
13 4 files changed, 152 insertions(+), 15 deletions(-)13 4 files changed, 158 insertions(+), 15 deletions(-)
1414
15diff --git a/src/nautilus-directory.c b/src/nautilus-directory.c15diff --git a/src/nautilus-directory.c b/src/nautilus-directory.c
16index ad3bb03..f1a3bf8 10064416index 19316e8..9bb5460 100644
17--- a/src/nautilus-directory.c17--- a/src/nautilus-directory.c
18+++ b/src/nautilus-directory.c18+++ b/src/nautilus-directory.c
19@@ -33,6 +33,7 @@19@@ -33,6 +33,7 @@
@@ -24,7 +24,7 @@ index ad3bb03..f1a3bf8 100644
24 #include "nautilus-vfs-directory.h"24 #include "nautilus-vfs-directory.h"
25 #include <eel/eel-glib-extensions.h>25 #include <eel/eel-glib-extensions.h>
26 #include <eel/eel-string.h>26 #include <eel/eel-string.h>
27@@ -1546,9 +1547,14 @@ nautilus_directory_notify_files_moved (GList *file_pairs)27@@ -1560,9 +1561,14 @@ nautilus_directory_notify_files_moved (GList *file_pairs)
28 28
29 for (p = file_pairs; p != NULL; p = p->next)29 for (p = file_pairs; p != NULL; p = p->next)
30 {30 {
@@ -39,7 +39,7 @@ index ad3bb03..f1a3bf8 100644
39 39
40 /* Handle overwriting a file. */40 /* Handle overwriting a file. */
41 file = nautilus_file_get_existing (to_location);41 file = nautilus_file_get_existing (to_location);
42@@ -1626,6 +1632,8 @@ nautilus_directory_notify_files_moved (GList *file_pairs)42@@ -1645,6 +1651,8 @@ nautilus_directory_notify_files_moved (GList *file_pairs)
43 /* Unref each file once to balance out nautilus_file_get_by_uri. */43 /* Unref each file once to balance out nautilus_file_get_by_uri. */
44 unref_list = g_list_prepend (unref_list, file);44 unref_list = g_list_prepend (unref_list, file);
45 }45 }
@@ -49,7 +49,7 @@ index ad3bb03..f1a3bf8 100644
49 49
50 /* Now send out the changed and added signals for existing file objects. */50 /* Now send out the changed and added signals for existing file objects. */
51diff --git a/src/nautilus-file.c b/src/nautilus-file.c51diff --git a/src/nautilus-file.c b/src/nautilus-file.c
52index 2135801..15e5d05 10064452index 63413a6..9416214 100644
53--- a/src/nautilus-file.c53--- a/src/nautilus-file.c
54+++ b/src/nautilus-file.c54+++ b/src/nautilus-file.c
55@@ -34,6 +34,7 @@55@@ -34,6 +34,7 @@
@@ -60,7 +60,7 @@ index 2135801..15e5d05 100644
60 #include "nautilus-thumbnails.h"60 #include "nautilus-thumbnails.h"
61 #include "nautilus-ui-utilities.h"61 #include "nautilus-ui-utilities.h"
62 #include "nautilus-video-mime-types.h"62 #include "nautilus-video-mime-types.h"
63@@ -1952,14 +1953,12 @@ rename_get_info_callback (GObject *source_object,63@@ -1960,14 +1961,12 @@ rename_get_info_callback (GObject *source_object,
64 GAsyncResult *res,64 GAsyncResult *res,
65 gpointer callback_data)65 gpointer callback_data)
66 {66 {
@@ -77,7 +77,7 @@ index 2135801..15e5d05 100644
77 77
78 op = callback_data;78 op = callback_data;
79 79
80@@ -1967,8 +1966,12 @@ rename_get_info_callback (GObject *source_object,80@@ -1975,8 +1974,12 @@ rename_get_info_callback (GObject *source_object,
81 new_info = g_file_query_info_finish (G_FILE (source_object), res, &error);81 new_info = g_file_query_info_finish (G_FILE (source_object), res, &error);
82 if (new_info != NULL)82 if (new_info != NULL)
83 {83 {
@@ -91,7 +91,7 @@ index 2135801..15e5d05 100644
91 new_name = g_file_info_get_name (new_info);91 new_name = g_file_info_get_name (new_info);
92 92
93 /* If there was another file by the same name in this93 /* If there was another file by the same name in this
94@@ -1983,6 +1986,7 @@ rename_get_info_callback (GObject *source_object,94@@ -1991,6 +1994,7 @@ rename_get_info_callback (GObject *source_object,
95 }95 }
96 96
97 old_uri = nautilus_file_get_uri (op->file);97 old_uri = nautilus_file_get_uri (op->file);
@@ -99,7 +99,7 @@ index 2135801..15e5d05 100644
99 99
100 update_info_and_name (op->file, new_info);100 update_info_and_name (op->file, new_info);
101 101
102@@ -2010,9 +2014,10 @@ rename_get_info_callback (GObject *source_object,102@@ -2018,9 +2022,10 @@ rename_get_info_callback (GObject *source_object,
103 g_object_unref (subject);103 g_object_unref (subject);
104 g_free (origin);104 g_free (origin);
105 105
@@ -112,7 +112,7 @@ index 2135801..15e5d05 100644
112 112
113 /* the rename could have affected the display name if e.g.113 /* the rename could have affected the display name if e.g.
114 * we're in a vfolder where the name comes from a desktop file114 * we're in a vfolder where the name comes from a desktop file
115@@ -2024,14 +2029,8 @@ rename_get_info_callback (GObject *source_object,115@@ -2032,14 +2037,8 @@ rename_get_info_callback (GObject *source_object,
116 NAUTILUS_FILE_ATTRIBUTE_INFO |116 NAUTILUS_FILE_ATTRIBUTE_INFO |
117 NAUTILUS_FILE_ATTRIBUTE_LINK_INFO);117 NAUTILUS_FILE_ATTRIBUTE_LINK_INFO);
118 }118 }
@@ -128,17 +128,18 @@ index 2135801..15e5d05 100644
128 128
129 static void129 static void
130diff --git a/src/nautilus-recent.c b/src/nautilus-recent.c130diff --git a/src/nautilus-recent.c b/src/nautilus-recent.c
131index ab50fef..c69a3a7 100644131index ab50fef..6676465 100644
132--- a/src/nautilus-recent.c132--- a/src/nautilus-recent.c
133+++ b/src/nautilus-recent.c133+++ b/src/nautilus-recent.c
134@@ -1,5 +1,6 @@134@@ -1,5 +1,7 @@
135 /*135 /*
136 * Copyright (C) 2002 James Willcox136 * Copyright (C) 2002 James Willcox
137+ * Copyright (C) 2018 Canonical Ltd137+ * Copyright (C) 2018 Canonical Ltd
138+ * Copyright (C) 2018 Marco Trevisan
138 *139 *
139 * This program is free software; you can redistribute it and/or modify140 * This program is free software; you can redistribute it and/or modify
140 * it under the terms of the GNU General Public License as published by141 * it under the terms of the GNU General Public License as published by
141@@ -17,6 +18,7 @@142@@ -17,6 +19,7 @@
142 143
143 #include "config.h"144 #include "config.h"
144 #include "nautilus-recent.h"145 #include "nautilus-recent.h"
@@ -146,16 +147,16 @@ index ab50fef..c69a3a7 100644
146 147
147 #include <eel/eel-vfs-extensions.h>148 #include <eel/eel-vfs-extensions.h>
148 149
149@@ -85,3 +87,127 @@ nautilus_recent_add_file (NautilusFile *file,150@@ -85,3 +88,132 @@ nautilus_recent_add_file (NautilusFile *file,
150 151
151 g_free (uri);152 g_free (uri);
152 }153 }
153+154+
154+void155+void
155+nautilus_recent_update_file_moved (const gchar *old_uri,156+nautilus_recent_update_file_moved (const gchar *old_uri,
156+ const gchar *new_uri,157+ const gchar *new_uri,
157+ const gchar *old_display_name,158+ const gchar *old_display_name,
158+ const gchar *new_display_name)159+ const gchar *new_display_name)
159+{160+{
160+ GtkRecentManager *recent_manager = nautilus_recent_get_manager ();161+ GtkRecentManager *recent_manager = nautilus_recent_get_manager ();
161+ g_autoptr (NautilusFile) file = NULL;162+ g_autoptr (NautilusFile) file = NULL;
@@ -191,9 +192,11 @@ index ab50fef..c69a3a7 100644
191+192+
192+ if (nautilus_file_is_directory (file))193+ if (nautilus_file_is_directory (file))
193+ {194+ {
195+ g_autoptr (GFile) location = NULL;
194+ GList *recent_items;196+ GList *recent_items;
195+ GList *l;197+ GList *l;
196+198+
199+ location = g_file_new_for_uri (old_uri);
197+ recent_items = gtk_recent_manager_get_items (recent_manager);200+ recent_items = gtk_recent_manager_get_items (recent_manager);
198+201+
199+ for (l = recent_items; l; l = l->next)202+ for (l = recent_items; l; l = l->next)
@@ -203,9 +206,12 @@ index ab50fef..c69a3a7 100644
203+206+
204+ if (g_str_has_prefix (item_uri, old_uri))207+ if (g_str_has_prefix (item_uri, old_uri))
205+ {208+ {
206+ const gchar *relative_path = item_uri + strlen (old_uri);209+ g_autoptr (GFile) item_file = NULL;
210+ g_autofree gchar *relative_path = NULL;
207+ g_autofree gchar *new_item_uri = NULL;211+ g_autofree gchar *new_item_uri = NULL;
208+212+
213+ item_file = g_file_new_for_uri (item_uri);
214+ relative_path = g_file_get_relative_path (location, item_file);
209+ new_item_uri = g_build_filename (new_uri, relative_path, NULL);215+ new_item_uri = g_build_filename (new_uri, relative_path, NULL);
210+216+
211+ gtk_recent_manager_move_item (recent_manager,217+ gtk_recent_manager_move_item (recent_manager,
diff --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
index 5140963..91a7ec0 100644
--- a/debian/patches/0018-search-engine-add-locate-based-search-engine.patch
+++ b/debian/patches/0018-search-engine-add-locate-based-search-engine.patch
@@ -7,19 +7,19 @@ command line and parsing output to provide more and
7quicker results to the shell and nautilus7quicker results to the shell and nautilus
8---8---
9 src/meson.build | 2 +9 src/meson.build | 2 +
10 src/nautilus-search-engine-locate.c | 597 ++++++++++++++++++++++++++++++++++++10 src/nautilus-search-engine-locate.c | 601 ++++++++++++++++++++++++++++++++++++
11 src/nautilus-search-engine-locate.h | 37 +++11 src/nautilus-search-engine-locate.h | 37 +++
12 src/nautilus-search-engine.c | 11 +12 src/nautilus-search-engine.c | 11 +
13 4 files changed, 647 insertions(+)13 4 files changed, 651 insertions(+)
14 create mode 100644 src/nautilus-search-engine-locate.c14 create mode 100644 src/nautilus-search-engine-locate.c
15 create mode 100644 src/nautilus-search-engine-locate.h15 create mode 100644 src/nautilus-search-engine-locate.h
1616
17diff --git a/src/meson.build b/src/meson.build17diff --git a/src/meson.build b/src/meson.build
18index 0ea9165..06e6633 10064418index 213b35f..a0bf109 100644
19--- a/src/meson.build19--- a/src/meson.build
20+++ b/src/meson.build20+++ b/src/meson.build
21@@ -228,6 +228,8 @@ libnautilus_sources = [21@@ -229,6 +229,8 @@ libnautilus_sources = [
22 'nautilus-search-engine.h',22 'nautilus-search-engine-private.h',
23 'nautilus-search-engine-model.c',23 'nautilus-search-engine-model.c',
24 'nautilus-search-engine-model.h',24 'nautilus-search-engine-model.h',
25+ 'nautilus-search-engine-locate.c',25+ 'nautilus-search-engine-locate.c',
@@ -29,10 +29,10 @@ index 0ea9165..06e6633 100644
29 'nautilus-search-engine-simple.c',29 'nautilus-search-engine-simple.c',
30diff --git a/src/nautilus-search-engine-locate.c b/src/nautilus-search-engine-locate.c30diff --git a/src/nautilus-search-engine-locate.c b/src/nautilus-search-engine-locate.c
31new file mode 10064431new file mode 100644
32index 0000000..16f9f2132index 0000000..d152a23
33--- /dev/null33--- /dev/null
34+++ b/src/nautilus-search-engine-locate.c34+++ b/src/nautilus-search-engine-locate.c
35@@ -0,0 +1,597 @@35@@ -0,0 +1,601 @@
36+/*36+/*
37+ * Copyright (C) 2018 Canonical Ltd37+ * Copyright (C) 2018 Canonical Ltd
38+ *38+ *
@@ -57,6 +57,7 @@ index 0000000..16f9f21
57+#include "nautilus-search-hit.h"57+#include "nautilus-search-hit.h"
58+#include "nautilus-search-provider.h"58+#include "nautilus-search-provider.h"
59+#include "nautilus-search-engine-locate.h"59+#include "nautilus-search-engine-locate.h"
60+#include "nautilus-search-engine-private.h"
60+#include "nautilus-ui-utilities.h"61+#include "nautilus-ui-utilities.h"
61+#define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH62+#define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
62+#include "nautilus-debug.h"63+#include "nautilus-debug.h"
@@ -452,7 +453,12 @@ index 0000000..16f9f21
452+ sdata = g_new0 (LocateSearchData, 1);453+ sdata = g_new0 (LocateSearchData, 1);
453+ sdata->locate = g_object_ref (self);454+ sdata->locate = g_object_ref (self);
454+455+
455+ if (!(self->locate_features & LOCATE_INSTALLED))456+ query_location = nautilus_query_get_location (self->query);
457+
458+ if (!(self->locate_features & LOCATE_INSTALLED) ||
459+ !is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED,
460+ nautilus_query_get_recursive (self->query),
461+ query_location))
456+ {462+ {
457+ g_idle_add ((GSourceFunc) submit_results, sdata);463+ g_idle_add ((GSourceFunc) submit_results, sdata);
458+ return;464+ return;
@@ -493,8 +499,6 @@ index 0000000..16f9f21
493+ return;499+ return;
494+ }500+ }
495+501+
496+ query_location = nautilus_query_get_location (self->query);
497+
498+ sdata->query = g_object_ref (self->query);502+ sdata->query = g_object_ref (self->query);
499+ sdata->date_range = nautilus_query_get_date_range (self->query);503+ sdata->date_range = nautilus_query_get_date_range (self->query);
500+ sdata->mime_types = nautilus_query_get_mime_types (self->query);504+ sdata->mime_types = nautilus_query_get_mime_types (self->query);
@@ -674,18 +678,18 @@ index 0000000..ac5e3fc
674+678+
675+#endif /* __NAUTILUS_SEARCH_ENGINE_LOCATE_H__ */679+#endif /* __NAUTILUS_SEARCH_ENGINE_LOCATE_H__ */
676diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c680diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c
677index aef91b7..bf0e85d 100644681index 793b831..902d483 100644
678--- a/src/nautilus-search-engine.c682--- a/src/nautilus-search-engine.c
679+++ b/src/nautilus-search-engine.c683+++ b/src/nautilus-search-engine.c
680@@ -25,6 +25,7 @@684@@ -29,6 +29,7 @@
681 #include "nautilus-search-provider.h"685 #include <glib/gi18n.h>
682 #include "nautilus-search-engine.h"686 #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
683 #include "nautilus-search-engine-recent.h"687 #include "nautilus-debug.h"
684+#include "nautilus-search-engine-locate.h"688+#include "nautilus-search-engine-locate.h"
685 #include "nautilus-search-engine-simple.h"689 #include "nautilus-search-engine-simple.h"
686 #include "nautilus-search-engine-model.h"690 #include "nautilus-search-engine-recent.h"
687 #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH691 #include "nautilus-search-engine-tracker.h"
688@@ -35,6 +36,7 @@ typedef struct692@@ -37,6 +38,7 @@ typedef struct
689 {693 {
690 NautilusSearchEngineTracker *tracker;694 NautilusSearchEngineTracker *tracker;
691 NautilusSearchEngineRecent *recent;695 NautilusSearchEngineRecent *recent;
@@ -693,7 +697,7 @@ index aef91b7..bf0e85d 100644
693 NautilusSearchEngineSimple *simple;697 NautilusSearchEngineSimple *simple;
694 NautilusSearchEngineModel *model;698 NautilusSearchEngineModel *model;
695 699
696@@ -77,6 +79,7 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider,700@@ -79,6 +81,7 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider,
697 701
698 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->tracker), query);702 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->tracker), query);
699 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->recent), query);703 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->recent), query);
@@ -701,7 +705,7 @@ index aef91b7..bf0e85d 100644
701 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->model), query);705 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->model), query);
702 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->simple), query);706 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->simple), query);
703 }707 }
704@@ -104,6 +107,9 @@ search_engine_start_real (NautilusSearchEngine *engine)708@@ -106,6 +109,9 @@ search_engine_start_real (NautilusSearchEngine *engine)
705 priv->providers_running++;709 priv->providers_running++;
706 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->recent));710 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->recent));
707 711
@@ -711,7 +715,7 @@ index aef91b7..bf0e85d 100644
711 if (nautilus_search_engine_model_get_model (priv->model))715 if (nautilus_search_engine_model_get_model (priv->model))
712 {716 {
713 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->model));717 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->model));
714@@ -166,6 +172,7 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider)718@@ -168,6 +174,7 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider)
715 719
716 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->tracker));720 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->tracker));
717 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->recent));721 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->recent));
@@ -719,7 +723,7 @@ index aef91b7..bf0e85d 100644
719 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->model));723 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->model));
720 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->simple));724 nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->simple));
721 725
722@@ -342,6 +349,7 @@ nautilus_search_engine_finalize (GObject *object)726@@ -344,6 +351,7 @@ nautilus_search_engine_finalize (GObject *object)
723 727
724 g_clear_object (&priv->tracker);728 g_clear_object (&priv->tracker);
725 g_clear_object (&priv->recent);729 g_clear_object (&priv->recent);
@@ -727,7 +731,7 @@ index aef91b7..bf0e85d 100644
727 g_clear_object (&priv->model);731 g_clear_object (&priv->model);
728 g_clear_object (&priv->simple);732 g_clear_object (&priv->simple);
729 733
730@@ -406,6 +414,9 @@ nautilus_search_engine_init (NautilusSearchEngine *engine)734@@ -408,6 +416,9 @@ nautilus_search_engine_init (NautilusSearchEngine *engine)
731 735
732 priv->recent = nautilus_search_engine_recent_new ();736 priv->recent = nautilus_search_engine_recent_new ();
733 connect_provider_signals (engine, NAUTILUS_SEARCH_PROVIDER (priv->recent));737 connect_provider_signals (engine, NAUTILUS_SEARCH_PROVIDER (priv->recent));
diff --git a/debian/patches/03_translations_list_update.patch b/debian/patches/03_translations_list_update.patch
index bd2e0fd..7fc36f0 100644
--- a/debian/patches/03_translations_list_update.patch
+++ b/debian/patches/03_translations_list_update.patch
@@ -1,10 +1,16 @@
1From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
2Date: Fri, 20 Jul 2018 03:25:37 +0200
3Subject: _translations_list_update
4
1---5---
2 po/POTFILES.in | 2 ++6 po/POTFILES.in | 2 ++
3 1 file changed, 2 insertions(+)7 1 file changed, 2 insertions(+)
48
9diff --git a/po/POTFILES.in b/po/POTFILES.in
10index 277a7ff..2960c09 100644
5--- a/po/POTFILES.in11--- a/po/POTFILES.in
6+++ b/po/POTFILES.in12+++ b/po/POTFILES.in
7@@ -4,6 +4,8 @@ data/nautilus-autorun-software.desktop.i13@@ -4,6 +4,8 @@ data/nautilus-autorun-software.desktop.in
8 data/org.gnome.Nautilus.appdata.xml.in14 data/org.gnome.Nautilus.appdata.xml.in
9 data/org.gnome.Nautilus.desktop.in15 data/org.gnome.Nautilus.desktop.in
10 data/org.gnome.nautilus.gschema.xml16 data/org.gnome.nautilus.gschema.xml
diff --git a/debian/patches/04_suppress_umount_in_ltsp.patch b/debian/patches/04_suppress_umount_in_ltsp.patch
index bff103d..2bba6bb 100644
--- a/debian/patches/04_suppress_umount_in_ltsp.patch
+++ b/debian/patches/04_suppress_umount_in_ltsp.patch
@@ -1,4 +1,3 @@
1From 81825762ca8f8535f04f8e4ee273d443657ad121 Mon Sep 17 00:00:00 2001
2From: Jeremy Bicha <jbicha@ubuntu.com>1From: Jeremy Bicha <jbicha@ubuntu.com>
3Date: Thu, 27 Apr 2017 20:30:13 -04002Date: Thu, 27 Apr 2017 20:30:13 -0400
4Subject: file: Don't offer to eject or unmount LTSP volumes3Subject: file: Don't offer to eject or unmount LTSP volumes
@@ -11,10 +10,10 @@ Bug-Ubuntu: https://launchpad.net/bugs/220564
11 1 file changed, 10 insertions(+)10 1 file changed, 10 insertions(+)
1211
13diff --git a/src/nautilus-file.c b/src/nautilus-file.c12diff --git a/src/nautilus-file.c b/src/nautilus-file.c
14index e7e96dc86..89748973f 10064413index adbf081..3a7c9a4 100644
15--- a/src/nautilus-file.c14--- a/src/nautilus-file.c
16+++ b/src/nautilus-file.c15+++ b/src/nautilus-file.c
17@@ -1116,6 +1116,11 @@ nautilus_file_can_unmount (NautilusFile *file)16@@ -1128,6 +1128,11 @@ nautilus_file_can_unmount (NautilusFile *file)
18 {17 {
19 g_return_val_if_fail (NAUTILUS_IS_FILE (file), FALSE);18 g_return_val_if_fail (NAUTILUS_IS_FILE (file), FALSE);
20 19
@@ -26,7 +25,7 @@ index e7e96dc86..89748973f 100644
26 return file->details->can_unmount ||25 return file->details->can_unmount ||
27 (file->details->mount != NULL &&26 (file->details->mount != NULL &&
28 g_mount_can_unmount (file->details->mount));27 g_mount_can_unmount (file->details->mount));
29@@ -1126,6 +1131,11 @@ nautilus_file_can_eject (NautilusFile *file)28@@ -1138,6 +1143,11 @@ nautilus_file_can_eject (NautilusFile *file)
30 {29 {
31 g_return_val_if_fail (NAUTILUS_IS_FILE (file), FALSE);30 g_return_val_if_fail (NAUTILUS_IS_FILE (file), FALSE);
32 31
diff --git a/debian/patches/06_never_exec_nonexec_launchers.patch b/debian/patches/06_never_exec_nonexec_launchers.patch
index c1733b5..5aedf36 100644
--- a/debian/patches/06_never_exec_nonexec_launchers.patch
+++ b/debian/patches/06_never_exec_nonexec_launchers.patch
@@ -1,4 +1,3 @@
1From 75a0e1c62203ef362437ce4fdf1fc93ec5cf147c Mon Sep 17 00:00:00 2001
2From: Jeremy Bicha <jbicha@ubuntu.com>1From: Jeremy Bicha <jbicha@ubuntu.com>
3Date: Sun, 30 Apr 2017 21:28:31 -04002Date: Sun, 30 Apr 2017 21:28:31 -0400
4Subject: [PATCH] Require executable permission for launchers in home dir3Subject: [PATCH] Require executable permission for launchers in home dir
@@ -10,10 +9,10 @@ https://wiki.ubuntu.com/SecurityTeam/Policies#Execute-Permission_Bit_Required
10 1 file changed, 1 insertion(+), 1 deletion(-)9 1 file changed, 1 insertion(+), 1 deletion(-)
1110
12diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c11diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
13index 14fe44bc3..0c6364986 10064412index 8827160..894f0ea 100644
14--- a/src/nautilus-mime-actions.c13--- a/src/nautilus-mime-actions.c
15+++ b/src/nautilus-mime-actions.c14+++ b/src/nautilus-mime-actions.c
16@@ -1606,7 +1606,7 @@ activate_desktop_file (ActivateParameters *parameters,15@@ -1513,7 +1513,7 @@ activate_desktop_file (ActivateParameters *parameters,
17 _("_Cancel"), GTK_RESPONSE_CANCEL);16 _("_Cancel"), GTK_RESPONSE_CANCEL);
18 17
19 gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);18 gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
diff --git a/debian/patches/12_unity_launcher_support.patch b/debian/patches/12_unity_launcher_support.patch
index 2d9f54d..180934e 100644
--- a/debian/patches/12_unity_launcher_support.patch
+++ b/debian/patches/12_unity_launcher_support.patch
@@ -32,7 +32,7 @@ index 4f5cb58..9ddb88d 100644
32 #mesondefine ENABLE_PACKAGEKIT32 #mesondefine ENABLE_PACKAGEKIT
33 #mesondefine LOCALEDIR33 #mesondefine LOCALEDIR
34diff --git a/meson.build b/meson.build34diff --git a/meson.build b/meson.build
35index 18e645a..495101f 10064435index 0b8a6f1..4d2acf2 100644
36--- a/meson.build36--- a/meson.build
37+++ b/meson.build37+++ b/meson.build
38@@ -30,6 +30,8 @@ exempi_ver = '>=2.1.0'38@@ -30,6 +30,8 @@ exempi_ver = '>=2.1.0'
@@ -94,7 +94,7 @@ index cc08345..59703df 100644
94 nautilus_deps += exempi94 nautilus_deps += exempi
95 endif95 endif
96diff --git a/src/nautilus-application.c b/src/nautilus-application.c96diff --git a/src/nautilus-application.c b/src/nautilus-application.c
97index 98e6f35..ae19115 10064497index 3ccbf54..b62cfab 100644
98--- a/src/nautilus-application.c98--- a/src/nautilus-application.c
99+++ b/src/nautilus-application.c99+++ b/src/nautilus-application.c
100@@ -54,6 +54,10 @@100@@ -54,6 +54,10 @@
diff --git a/debian/patches/18_unity_icon_color.patch b/debian/patches/18_unity_icon_color.patch
index b476d5a..0956765 100644
--- a/debian/patches/18_unity_icon_color.patch
+++ b/debian/patches/18_unity_icon_color.patch
@@ -1,12 +1,17 @@
1Description: specify a background color for the unity launcher icon1From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
2Date: Fri, 20 Jul 2018 03:25:37 +0200
3Subject: specify a background color for the unity launcher icon
4
2Bug: https://launchpad.net/bugs/10816915Bug: https://launchpad.net/bugs/1081691
3---6---
4 data/org.gnome.Nautilus.desktop.in | 1 +7 data/org.gnome.Nautilus.desktop.in | 1 +
5 1 file changed, 1 insertion(+)8 1 file changed, 1 insertion(+)
69
10diff --git a/data/org.gnome.Nautilus.desktop.in b/data/org.gnome.Nautilus.desktop.in
11index b7be676..ad67456 100644
7--- a/data/org.gnome.Nautilus.desktop.in12--- a/data/org.gnome.Nautilus.desktop.in
8+++ b/data/org.gnome.Nautilus.desktop.in13+++ b/data/org.gnome.Nautilus.desktop.in
9@@ -14,6 +14,7 @@ Categories=GNOME;GTK;Utility;Core;FileMa14@@ -14,6 +14,7 @@ Categories=GNOME;GTK;Utility;Core;FileManager;
10 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;15 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;
11 X-GNOME-UsesNotifications=true16 X-GNOME-UsesNotifications=true
12 Actions=new-window;17 Actions=new-window;
diff --git a/debian/patches/19_unity_open_location_xid.patch b/debian/patches/19_unity_open_location_xid.patch
index 57403d0..bc37956 100644
--- a/debian/patches/19_unity_open_location_xid.patch
+++ b/debian/patches/19_unity_open_location_xid.patch
@@ -1,19 +1,22 @@
1Description: Add a new dbus property to the nautilus'1From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
2 "org.freedesktop.FileManager1" dbus interface where it stores the lists of2Date: Fri, 20 Jul 2018 03:25:37 +0200
3 opened locations referenced by their parent nautilus window XID.3Subject: Add a new dbus property to the nautilus'
44
5"org.freedesktop.FileManager1" dbus interface where it stores the lists of
6opened locations referenced by their parent nautilus window XID.
5Bug-Ubuntu: https://bugs.launchpad.net/unity/+bug/8874497Bug-Ubuntu: https://bugs.launchpad.net/unity/+bug/887449
6Forwarded: no8Forwarded: no
7Author: Marco Trevisan <marco@ubuntu.com>9Author: Marco Trevisan <marco@ubuntu.com>
8
9---10---
10 data/freedesktop-dbus-interfaces.xml | 1 11 data/freedesktop-dbus-interfaces.xml | 1 +
11 src/nautilus-application.c | 78 ++++++++++++++++++++++++++++++++---12 src/nautilus-application.c | 78 +++++++++++++++++++++++++++++++++---
12 src/nautilus-application.h | 2 13 src/nautilus-application.h | 2 +
13 src/nautilus-freedesktop-dbus.c | 21 ++++++++-14 src/nautilus-freedesktop-dbus.c | 21 +++++++++-
14 src/nautilus-freedesktop-dbus.h | 1 15 src/nautilus-freedesktop-dbus.h | 1 +
15 5 files changed, 96 insertions(+), 7 deletions(-)16 5 files changed, 96 insertions(+), 7 deletions(-)
1617
18diff --git a/data/freedesktop-dbus-interfaces.xml b/data/freedesktop-dbus-interfaces.xml
19index da37ca0..8d12720 100644
17--- a/data/freedesktop-dbus-interfaces.xml20--- a/data/freedesktop-dbus-interfaces.xml
18+++ b/data/freedesktop-dbus-interfaces.xml21+++ b/data/freedesktop-dbus-interfaces.xml
19@@ -31,5 +31,6 @@22@@ -31,5 +31,6 @@
@@ -23,9 +26,11 @@ Author: Marco Trevisan <marco@ubuntu.com>
23+ <property name="XUbuntuOpenLocationsXids" type="a{uas}" access="read"/>26+ <property name="XUbuntuOpenLocationsXids" type="a{uas}" access="read"/>
24 </interface>27 </interface>
25 </node>28 </node>
29diff --git a/src/nautilus-application.c b/src/nautilus-application.c
30index b62cfab..1ec0d22 100644
26--- a/src/nautilus-application.c31--- a/src/nautilus-application.c
27+++ b/src/nautilus-application.c32+++ b/src/nautilus-application.c
28@@ -1338,8 +1338,8 @@ nautilus_application_dbus_unregister (GA33@@ -1358,8 +1358,8 @@ nautilus_application_dbus_unregister (GApplication *app,
29 }34 }
30 }35 }
31 36
@@ -36,7 +41,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
36 {41 {
37 NautilusApplicationPrivate *priv;42 NautilusApplicationPrivate *priv;
38 gint i;43 gint i;
39@@ -1352,6 +1352,11 @@ update_dbus_opened_locations (NautilusAp44@@ -1372,6 +1372,11 @@ update_dbus_opened_locations (NautilusApplication *self)
40 45
41 g_return_if_fail (NAUTILUS_IS_APPLICATION (self));46 g_return_if_fail (NAUTILUS_IS_APPLICATION (self));
42 47
@@ -48,7 +53,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
48 priv = nautilus_application_get_instance_private (self);53 priv = nautilus_application_get_instance_private (self);
49 54
50 /* Children of nautilus application could not handle the dbus, so don't55 /* Children of nautilus application could not handle the dbus, so don't
51@@ -1365,6 +1370,22 @@ update_dbus_opened_locations (NautilusAp56@@ -1385,6 +1390,22 @@ update_dbus_opened_locations (NautilusApplication *self)
52 {57 {
53 window = l->data;58 window = l->data;
54 59
@@ -71,7 +76,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
71 for (sl = nautilus_window_get_slots (window); sl; sl = sl->next)76 for (sl = nautilus_window_get_slots (window); sl; sl = sl->next)
72 {77 {
73 NautilusWindowSlot *slot = sl->data;78 NautilusWindowSlot *slot = sl->data;
74@@ -1373,6 +1394,12 @@ update_dbus_opened_locations (NautilusAp79@@ -1393,6 +1414,12 @@ update_dbus_opened_locations (NautilusApplication *self)
75 if (location != NULL)80 if (location != NULL)
76 {81 {
77 gchar *uri = g_file_get_uri (location);82 gchar *uri = g_file_get_uri (location);
@@ -84,7 +89,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
84 GList *found = g_list_find_custom (locations, uri, (GCompareFunc) g_strcmp0);89 GList *found = g_list_find_custom (locations, uri, (GCompareFunc) g_strcmp0);
85 90
86 if (!found)91 if (!found)
87@@ -1386,6 +1413,26 @@ update_dbus_opened_locations (NautilusAp92@@ -1406,6 +1433,26 @@ update_dbus_opened_locations (NautilusApplication *self)
88 }93 }
89 }94 }
90 }95 }
@@ -111,7 +116,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
111 }116 }
112 117
113 locations_array = g_new (gchar *, locations_size + 1);118 locations_array = g_new (gchar *, locations_size + 1);
114@@ -1401,6 +1448,9 @@ update_dbus_opened_locations (NautilusAp119@@ -1421,6 +1468,9 @@ update_dbus_opened_locations (NautilusApplication *self)
115 nautilus_freedesktop_dbus_set_open_locations (priv->fdb_manager,120 nautilus_freedesktop_dbus_set_open_locations (priv->fdb_manager,
116 (const gchar **) locations_array);121 (const gchar **) locations_array);
117 122
@@ -121,7 +126,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
121 g_free (locations_array);126 g_free (locations_array);
122 g_list_free_full (locations, g_free);127 g_list_free_full (locations, g_free);
123 }128 }
124@@ -1410,7 +1460,14 @@ on_slot_location_changed (NautilusWindow129@@ -1430,7 +1480,14 @@ on_slot_location_changed (NautilusWindowSlot *slot,
125 GParamSpec *pspec,130 GParamSpec *pspec,
126 NautilusApplication *self)131 NautilusApplication *self)
127 {132 {
@@ -137,7 +142,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
137 }142 }
138 143
139 static void144 static void
140@@ -1420,7 +1477,7 @@ on_slot_added (NautilusWindow *wind145@@ -1440,7 +1497,7 @@ on_slot_added (NautilusWindow *window,
141 {146 {
142 if (nautilus_window_slot_get_location (slot))147 if (nautilus_window_slot_get_location (slot))
143 {148 {
@@ -146,17 +151,17 @@ Author: Marco Trevisan <marco@ubuntu.com>
146 }151 }
147 152
148 g_signal_connect (slot, "notify::location", G_CALLBACK (on_slot_location_changed), self);153 g_signal_connect (slot, "notify::location", G_CALLBACK (on_slot_location_changed), self);
149@@ -1431,9 +1488,16 @@ on_slot_removed (NautilusWindow *wi154@@ -1451,9 +1508,16 @@ on_slot_removed (NautilusWindow *window,
150 NautilusWindowSlot *slot,155 NautilusWindowSlot *slot,
151 NautilusApplication *self)156 NautilusApplication *self)
152 {157 {
153- update_dbus_opened_locations (self);158- update_dbus_opened_locations (self);
154+ nautilus_application_update_dbus_opened_locations (self);159+ nautilus_application_update_dbus_opened_locations (self);
155+
156+ g_signal_handlers_disconnect_by_func (slot, on_slot_active_changed, self);
157+}
158 160
159- g_signal_handlers_disconnect_by_func (slot, on_slot_location_changed, self);161- g_signal_handlers_disconnect_by_func (slot, on_slot_location_changed, self);
162+ g_signal_handlers_disconnect_by_func (slot, on_slot_active_changed, self);
163+}
164+
160+static void165+static void
161+on_realize (GtkWidget *widget,166+on_realize (GtkWidget *widget,
162+ NautilusApplication *self)167+ NautilusApplication *self)
@@ -165,7 +170,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
165 }170 }
166 171
167 static void172 static void
168@@ -1449,6 +1513,7 @@ nautilus_application_window_added (GtkAp173@@ -1469,6 +1533,7 @@ nautilus_application_window_added (GtkApplication *app,
169 if (NAUTILUS_IS_WINDOW (window))174 if (NAUTILUS_IS_WINDOW (window))
170 {175 {
171 priv->windows = g_list_prepend (priv->windows, window);176 priv->windows = g_list_prepend (priv->windows, window);
@@ -173,7 +178,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
173 g_signal_connect (window, "slot-added", G_CALLBACK (on_slot_added), app);178 g_signal_connect (window, "slot-added", G_CALLBACK (on_slot_added), app);
174 g_signal_connect (window, "slot-removed", G_CALLBACK (on_slot_removed), app);179 g_signal_connect (window, "slot-removed", G_CALLBACK (on_slot_removed), app);
175 }180 }
176@@ -1468,6 +1533,7 @@ nautilus_application_window_removed (Gtk181@@ -1488,6 +1553,7 @@ nautilus_application_window_removed (GtkApplication *app,
177 if (NAUTILUS_IS_WINDOW (window))182 if (NAUTILUS_IS_WINDOW (window))
178 {183 {
179 priv->windows = g_list_remove_all (priv->windows, window);184 priv->windows = g_list_remove_all (priv->windows, window);
@@ -181,9 +186,11 @@ Author: Marco Trevisan <marco@ubuntu.com>
181 g_signal_handlers_disconnect_by_func (window, on_slot_added, app);186 g_signal_handlers_disconnect_by_func (window, on_slot_added, app);
182 g_signal_handlers_disconnect_by_func (window, on_slot_removed, app);187 g_signal_handlers_disconnect_by_func (window, on_slot_removed, app);
183 }188 }
189diff --git a/src/nautilus-application.h b/src/nautilus-application.h
190index 197a276..9cb32c8 100644
184--- a/src/nautilus-application.h191--- a/src/nautilus-application.h
185+++ b/src/nautilus-application.h192+++ b/src/nautilus-application.h
186@@ -89,6 +89,8 @@ void nautilus_application_search (Nautil193@@ -89,6 +89,8 @@ void nautilus_application_search (NautilusApplication *application,
187 const gchar *uri,194 const gchar *uri,
188 const gchar *text);195 const gchar *text);
189 void nautilus_application_startup_common (NautilusApplication *application);196 void nautilus_application_startup_common (NautilusApplication *application);
@@ -192,6 +199,8 @@ Author: Marco Trevisan <marco@ubuntu.com>
192 G_END_DECLS199 G_END_DECLS
193 200
194 #endif /* __NAUTILUS_APPLICATION_H__ */201 #endif /* __NAUTILUS_APPLICATION_H__ */
202diff --git a/src/nautilus-freedesktop-dbus.c b/src/nautilus-freedesktop-dbus.c
203index c4657ab..601e0c9 100644
195--- a/src/nautilus-freedesktop-dbus.c204--- a/src/nautilus-freedesktop-dbus.c
196+++ b/src/nautilus-freedesktop-dbus.c205+++ b/src/nautilus-freedesktop-dbus.c
197@@ -160,6 +160,9 @@ bus_acquired_cb (GDBusConnection *conn,206@@ -160,6 +160,9 @@ bus_acquired_cb (GDBusConnection *conn,
@@ -204,7 +213,7 @@ Author: Marco Trevisan <marco@ubuntu.com>
204 }213 }
205 214
206 static void215 static void
207@@ -226,7 +229,23 @@ nautilus_freedesktop_dbus_set_open_locat216@@ -226,7 +229,23 @@ nautilus_freedesktop_dbus_set_open_locations (NautilusFreedesktopDBus *fdb,
208 {217 {
209 g_return_if_fail (NAUTILUS_IS_FREEDESKTOP_DBUS (fdb));218 g_return_if_fail (NAUTILUS_IS_FREEDESKTOP_DBUS (fdb));
210 219
@@ -229,9 +238,11 @@ Author: Marco Trevisan <marco@ubuntu.com>
229 }238 }
230 239
231 /* Tries to own the org.freedesktop.FileManager1 service name */240 /* Tries to own the org.freedesktop.FileManager1 service name */
241diff --git a/src/nautilus-freedesktop-dbus.h b/src/nautilus-freedesktop-dbus.h
242index 410c420..e277e55 100644
232--- a/src/nautilus-freedesktop-dbus.h243--- a/src/nautilus-freedesktop-dbus.h
233+++ b/src/nautilus-freedesktop-dbus.h244+++ b/src/nautilus-freedesktop-dbus.h
234@@ -47,5 +47,6 @@ GType nautilus_freedesktop_dbus_get_type245@@ -47,5 +47,6 @@ GType nautilus_freedesktop_dbus_get_type (void);
235 NautilusFreedesktopDBus * nautilus_freedesktop_dbus_new (void);246 NautilusFreedesktopDBus * nautilus_freedesktop_dbus_new (void);
236 247
237 void nautilus_freedesktop_dbus_set_open_locations (NautilusFreedesktopDBus *fdb, const gchar **locations);248 void nautilus_freedesktop_dbus_set_open_locations (NautilusFreedesktopDBus *fdb, const gchar **locations);
diff --git a/debian/patches/20_add_timestamp_to_operations.patch b/debian/patches/20_add_timestamp_to_operations.patch
index 9cbfbc3..f1203e5 100644
--- a/debian/patches/20_add_timestamp_to_operations.patch
+++ b/debian/patches/20_add_timestamp_to_operations.patch
@@ -1,6 +1,8 @@
1Description: Add *WithTimestamp dbus methods for file operations that1From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
2 might trigger a dialog, that should be presented with event time.2Date: Fri, 20 Jul 2018 03:25:37 +0200
3Subject: Add *WithTimestamp dbus methods for file operations that
34
5 might trigger a dialog, that should be presented with event time.
4Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/14455956Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1445595
5Bug: https://bugzilla.gnome.org/show_bug.cgi?id=7588337Bug: https://bugzilla.gnome.org/show_bug.cgi?id=758833
6Forwarded: yes8Forwarded: yes
@@ -9,16 +11,15 @@ From 13b0e898fbc80230333bb53dfffaa26a32889279 Mon Sep 17 00:00:00 2001
9From: Tim Lunn <tim@feathertop.org>11From: Tim Lunn <tim@feathertop.org>
10Date: Sat, 20 Feb 2016 08:26:51 +110012Date: Sat, 20 Feb 2016 08:26:51 +1100
11Subject: [PATCH] 20_timestamp13Subject: [PATCH] 20_timestamp
12
13---
14
15---14---
16 data/dbus-interfaces.xml | 15 ++++++15 data/dbus-interfaces.xml | 15 +++++++
17 src/nautilus-dbus-manager.c | 97 +++++++++++++++++++++++++++++++++++------16 src/nautilus-dbus-manager.c | 97 ++++++++++++++++++++++++++++++++++++------
18 src/nautilus-file-operations.c | 52 +++++++++++++++++++++17 src/nautilus-file-operations.c | 52 ++++++++++++++++++++++
19 src/nautilus-file-operations.h | 17 +++++++18 src/nautilus-file-operations.h | 17 ++++++++
20 4 files changed, 167 insertions(+), 14 deletions(-)19 4 files changed, 167 insertions(+), 14 deletions(-)
2120
21diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
22index 35fb994..c1b2cab 100644
22--- a/data/dbus-interfaces.xml23--- a/data/dbus-interfaces.xml
23+++ b/data/dbus-interfaces.xml24+++ b/data/dbus-interfaces.xml
24@@ -27,13 +27,28 @@25@@ -27,13 +27,28 @@
@@ -50,9 +51,11 @@ Subject: [PATCH] 20_timestamp
50+ </method>51+ </method>
51 </interface>52 </interface>
52 </node>53 </node>
54diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
55index 77d00d6..b6dc4e1 100644
53--- a/src/nautilus-dbus-manager.c56--- a/src/nautilus-dbus-manager.c
54+++ b/src/nautilus-dbus-manager.c57+++ b/src/nautilus-dbus-manager.c
55@@ -60,13 +60,13 @@ nautilus_dbus_manager_dispose (GObject *58@@ -60,13 +60,13 @@ nautilus_dbus_manager_dispose (GObject *object)
56 G_OBJECT_CLASS (nautilus_dbus_manager_parent_class)->dispose (object);59 G_OBJECT_CLASS (nautilus_dbus_manager_parent_class)->dispose (object);
57 }60 }
58 61
@@ -73,7 +76,7 @@ Subject: [PATCH] 20_timestamp
73 {76 {
74 GFile *source_file, *target_dir;77 GFile *source_file, *target_dir;
75 const gchar *target_name = NULL, *source_name = NULL;78 const gchar *target_name = NULL, *source_name = NULL;
76@@ -89,16 +89,41 @@ handle_copy_file (NautilusDBusFileOperat79@@ -89,16 +89,41 @@ handle_copy_file (NautilusDBusFileOperations *object,
77 80
78 g_object_unref (source_file);81 g_object_unref (source_file);
79 g_object_unref (target_dir);82 g_object_unref (target_dir);
@@ -119,7 +122,7 @@ Subject: [PATCH] 20_timestamp
119 {122 {
120 GList *source_files = NULL;123 GList *source_files = NULL;
121 GFile *dest_dir;124 GFile *dest_dir;
122@@ -112,18 +137,39 @@ handle_copy_uris (NautilusDBusFileOperat125@@ -112,17 +137,38 @@ handle_copy_uris (NautilusDBusFileOperations *object,
123 g_file_new_for_uri (sources[idx]));126 g_file_new_for_uri (sources[idx]));
124 }127 }
125 128
@@ -146,7 +149,7 @@ Subject: [PATCH] 20_timestamp
146 return TRUE; /* invocation was handled */149 return TRUE; /* invocation was handled */
147 }150 }
148 151
149 static gboolean152+static gboolean
150+handle_copy_uris_with_timestamp (NautilusDBusFileOperations *object,153+handle_copy_uris_with_timestamp (NautilusDBusFileOperations *object,
151+ GDBusMethodInvocation *invocation,154+ GDBusMethodInvocation *invocation,
152+ const gchar **sources,155+ const gchar **sources,
@@ -158,11 +161,10 @@ Subject: [PATCH] 20_timestamp
158+ return TRUE;161+ return TRUE;
159+}162+}
160+163+
161+static gboolean164 static gboolean
162 handle_empty_trash (NautilusDBusFileOperations *object,165 handle_empty_trash (NautilusDBusFileOperations *object,
163 GDBusMethodInvocation *invocation)166 GDBusMethodInvocation *invocation)
164 {167@@ -133,6 +179,17 @@ handle_empty_trash (NautilusDBusFileOperations *object,
165@@ -133,6 +179,17 @@ handle_empty_trash (NautilusDBusFileOper
166 return TRUE; /* invocation was handled */168 return TRUE; /* invocation was handled */
167 }169 }
168 170
@@ -180,7 +182,7 @@ Subject: [PATCH] 20_timestamp
180 static void182 static void
181 nautilus_dbus_manager_init (NautilusDBusManager *self)183 nautilus_dbus_manager_init (NautilusDBusManager *self)
182 {184 {
183@@ -150,6 +207,18 @@ nautilus_dbus_manager_init (NautilusDBus185@@ -150,6 +207,18 @@ nautilus_dbus_manager_init (NautilusDBusManager *self)
184 "handle-empty-trash",186 "handle-empty-trash",
185 G_CALLBACK (handle_empty_trash),187 G_CALLBACK (handle_empty_trash),
186 self);188 self);
@@ -199,6 +201,8 @@ Subject: [PATCH] 20_timestamp
199 }201 }
200 202
201 static void203 static void
204diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
205index 546acf8..c641ec5 100644
202--- a/src/nautilus-file-operations.c206--- a/src/nautilus-file-operations.c
203+++ b/src/nautilus-file-operations.c207+++ b/src/nautilus-file-operations.c
204@@ -69,6 +69,7 @@ typedef struct208@@ -69,6 +69,7 @@ typedef struct
@@ -209,7 +213,7 @@ Subject: [PATCH] 20_timestamp
209 NautilusProgressInfo *progress;213 NautilusProgressInfo *progress;
210 GCancellable *cancellable;214 GCancellable *cancellable;
211 GHashTable *skip_files;215 GHashTable *skip_files;
212@@ -1167,6 +1168,7 @@ typedef struct216@@ -1172,6 +1173,7 @@ typedef struct
213 const char *details_text;217 const char *details_text;
214 const char **button_titles;218 const char **button_titles;
215 gboolean show_all;219 gboolean show_all;
@@ -217,7 +221,7 @@ Subject: [PATCH] 20_timestamp
217 int result;221 int result;
218 /* Dialogs are ran from operation threads, which need to be blocked until222 /* Dialogs are ran from operation threads, which need to be blocked until
219 * the user gives a valid response223 * the user gives a valid response
220@@ -1227,6 +1229,7 @@ do_run_simple_dialog (gpointer _data)224@@ -1232,6 +1234,7 @@ do_run_simple_dialog (gpointer _data)
221 }225 }
222 226
223 /* Run it. */227 /* Run it. */
@@ -225,7 +229,7 @@ Subject: [PATCH] 20_timestamp
225 result = gtk_dialog_run (GTK_DIALOG (dialog));229 result = gtk_dialog_run (GTK_DIALOG (dialog));
226 230
227 while ((result == GTK_RESPONSE_NONE || result == GTK_RESPONSE_DELETE_EVENT) && data->ignore_close_box)231 while ((result == GTK_RESPONSE_NONE || result == GTK_RESPONSE_DELETE_EVENT) && data->ignore_close_box)
228@@ -1273,6 +1276,7 @@ run_simple_dialog_va (CommonJob *jo232@@ -1278,6 +1281,7 @@ run_simple_dialog_va (CommonJob *job,
229 data->secondary_text = secondary_text;233 data->secondary_text = secondary_text;
230 data->details_text = details_text;234 data->details_text = details_text;
231 data->show_all = show_all;235 data->show_all = show_all;
@@ -233,10 +237,11 @@ Subject: [PATCH] 20_timestamp
233 data->completed = FALSE;237 data->completed = FALSE;
234 g_mutex_init (&data->mutex);238 g_mutex_init (&data->mutex);
235 g_cond_init (&data->cond);239 g_cond_init (&data->cond);
236@@ -5862,6 +5866,26 @@ nautilus_file_operations_copy_file (GFil240@@ -5779,6 +5783,26 @@ nautilus_file_operations_copy_file (GFile *source_file,
241 GtkWindow *parent_window,
237 NautilusCopyCallback done_callback,242 NautilusCopyCallback done_callback,
238 gpointer done_callback_data)243 gpointer done_callback_data)
239 {244+{
240+ nautilus_file_operations_copy_file_with_time (source_file,245+ nautilus_file_operations_copy_file_with_time (source_file,
241+ target_dir,246+ target_dir,
242+ source_display_name,247+ source_display_name,
@@ -256,11 +261,10 @@ Subject: [PATCH] 20_timestamp
256+ guint32 timestamp,261+ guint32 timestamp,
257+ NautilusCopyCallback done_callback,262+ NautilusCopyCallback done_callback,
258+ gpointer done_callback_data)263+ gpointer done_callback_data)
259+{264 {
260 GTask *task;265 GTask *task;
261 CopyMoveJob *job;266 CopyMoveJob *job;
262 267@@ -5793,6 +5817,7 @@ nautilus_file_operations_copy_file (GFile *source_file,
263@@ -5875,6 +5899,7 @@ nautilus_file_operations_copy_file (GFil
264 nautilus_progress_info_set_destination (((CommonJob *) job)->progress, target_dir);268 nautilus_progress_info_set_destination (((CommonJob *) job)->progress, target_dir);
265 job->target_name = g_strdup (new_name);269 job->target_name = g_strdup (new_name);
266 job->debuting_files = g_hash_table_new_full (g_file_hash, (GEqualFunc) g_file_equal, g_object_unref, NULL);270 job->debuting_files = g_hash_table_new_full (g_file_hash, (GEqualFunc) g_file_equal, g_object_unref, NULL);
@@ -268,10 +272,11 @@ Subject: [PATCH] 20_timestamp
268 272
269 if (source_display_name != NULL)273 if (source_display_name != NULL)
270 {274 {
271@@ -5902,6 +5927,24 @@ nautilus_file_operations_copy (GList275@@ -5819,6 +5844,24 @@ nautilus_file_operations_copy (GList *files,
276 GtkWindow *parent_window,
272 NautilusCopyCallback done_callback,277 NautilusCopyCallback done_callback,
273 gpointer done_callback_data)278 gpointer done_callback_data)
274 {279+{
275+ nautilus_file_operations_copy_with_time (files,280+ nautilus_file_operations_copy_with_time (files,
276+ relative_item_points,281+ relative_item_points,
277+ target_dir,282+ target_dir,
@@ -289,11 +294,10 @@ Subject: [PATCH] 20_timestamp
289+ guint32 timestamp,294+ guint32 timestamp,
290+ NautilusCopyCallback done_callback,295+ NautilusCopyCallback done_callback,
291+ gpointer done_callback_data)296+ gpointer done_callback_data)
292+{297 {
293 GTask *task;298 GTask *task;
294 CopyMoveJob *job;299 CopyMoveJob *job;
295 300@@ -5829,6 +5872,7 @@ nautilus_file_operations_copy (GList *files,
296@@ -5911,6 +5954,7 @@ nautilus_file_operations_copy (GList
297 job->done_callback_data = done_callback_data;301 job->done_callback_data = done_callback_data;
298 job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);302 job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
299 job->destination = g_object_ref (target_dir);303 job->destination = g_object_ref (target_dir);
@@ -301,21 +305,21 @@ Subject: [PATCH] 20_timestamp
301 /* Need to indicate the destination for the operation notification open305 /* Need to indicate the destination for the operation notification open
302 * button. */306 * button. */
303 nautilus_progress_info_set_destination (((CommonJob *) job)->progress, target_dir);307 nautilus_progress_info_set_destination (((CommonJob *) job)->progress, target_dir);
304@@ -7934,6 +7978,13 @@ empty_trash_thread_func (GTask *t308@@ -7886,6 +7930,13 @@ empty_trash_thread_func (GTask *task,
309
305 void310 void
306 nautilus_file_operations_empty_trash (GtkWidget *parent_view)311 nautilus_file_operations_empty_trash (GtkWidget *parent_view)
307 {312+{
308+ nautilus_file_operations_empty_trash_with_time (parent_view, GDK_CURRENT_TIME);313+ nautilus_file_operations_empty_trash_with_time (parent_view, GDK_CURRENT_TIME);
309+}314+}
310+315+
311+void316+void
312+nautilus_file_operations_empty_trash_with_time (GtkWidget *parent_view,317+nautilus_file_operations_empty_trash_with_time (GtkWidget *parent_view,
313+ guint32 timestamp)318+ guint32 timestamp)
314+{319 {
315 g_autoptr (GTask) task = NULL;320 g_autoptr (GTask) task = NULL;
316 EmptyTrashJob *job;321 EmptyTrashJob *job;
317 GtkWindow *parent_window;322@@ -7901,6 +7952,7 @@ nautilus_file_operations_empty_trash (GtkWidget *parent_view)
318@@ -7948,6 +7999,7 @@ nautilus_file_operations_empty_trash (Gt
319 job->trash_dirs = g_list_prepend (job->trash_dirs,323 job->trash_dirs = g_list_prepend (job->trash_dirs,
320 g_file_new_for_uri ("trash:"));324 g_file_new_for_uri ("trash:"));
321 job->should_confirm = TRUE;325 job->should_confirm = TRUE;
@@ -323,9 +327,11 @@ Subject: [PATCH] 20_timestamp
323 327
324 inhibit_power_manager ((CommonJob *) job, _("Emptying Trash"));328 inhibit_power_manager ((CommonJob *) job, _("Emptying Trash"));
325 329
330diff --git a/src/nautilus-file-operations.h b/src/nautilus-file-operations.h
331index a479ee6..321fbc6 100644
326--- a/src/nautilus-file-operations.h332--- a/src/nautilus-file-operations.h
327+++ b/src/nautilus-file-operations.h333+++ b/src/nautilus-file-operations.h
328@@ -65,7 +65,17 @@ void nautilus_file_operations_copy_file334@@ -65,7 +65,17 @@ void nautilus_file_operations_copy_file (GFile *source_file,
329 GtkWindow *parent_window,335 GtkWindow *parent_window,
330 NautilusCopyCallback done_callback,336 NautilusCopyCallback done_callback,
331 gpointer done_callback_data);337 gpointer done_callback_data);
@@ -343,7 +349,7 @@ Subject: [PATCH] 20_timestamp
343 void nautilus_file_operations_new_folder (GtkWidget *parent_view,349 void nautilus_file_operations_new_folder (GtkWidget *parent_view,
344 GdkPoint *target_point,350 GdkPoint *target_point,
345 const char *parent_dir_uri,351 const char *parent_dir_uri,
346@@ -129,6 +139,13 @@ void nautilus_file_operations_copy352@@ -129,6 +139,13 @@ void nautilus_file_operations_copy (GList *files,
347 GtkWindow *parent_window,353 GtkWindow *parent_window,
348 NautilusCopyCallback done_callback,354 NautilusCopyCallback done_callback,
349 gpointer done_callback_data);355 gpointer done_callback_data);
diff --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
350new file mode 100644356new file mode 100644
index 0000000..d7c9a12
--- /dev/null
+++ b/debian/patches/Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch
@@ -0,0 +1,53 @@
1From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
2Date: Wed, 18 Jul 2018 18:46:28 +0200
3Subject: Revert "Revert "files-view: Remove new empty folder name
4 suggestion""
5
6This reverts commit 945c32dec747855047aa9b380d53588c5fcfb57a.
7
8This feature was already provided in Ubuntu, so would be a regression if we drop it
9---
10 src/nautilus-files-view.c | 15 ++++++++-------
11 1 file changed, 8 insertions(+), 7 deletions(-)
12
13diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
14index 8784f63..9b7b9b9 100644
15--- a/src/nautilus-files-view.c
16+++ b/src/nautilus-files-view.c
17@@ -2047,9 +2047,8 @@ static void
18 nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,
19 gboolean with_selection)
20 {
21- NautilusDirectory *containing_directory;
22+ g_autoptr (NautilusDirectory) containing_directory = NULL;
23 NautilusFilesViewPrivate *priv;
24- GList *selection;
25 g_autofree char *uri = NULL;
26 g_autofree char *common_prefix = NULL;
27
28@@ -2063,8 +2062,13 @@ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,
29 uri = nautilus_files_view_get_backing_uri (view);
30 containing_directory = nautilus_directory_get_by_uri (uri);
31
32- selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
33- common_prefix = nautilus_get_common_filename_prefix (selection, MIN_COMMON_FILENAME_PREFIX_LENGTH);
34+ if (with_selection)
35+ {
36+ GList *selection;
37+ selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
38+ common_prefix = nautilus_get_common_filename_prefix (selection, MIN_COMMON_FILENAME_PREFIX_LENGTH);
39+ nautilus_file_list_free (selection);
40+ }
41
42 priv->new_folder_controller =
43 nautilus_new_folder_dialog_controller_new (nautilus_files_view_get_containing_window (view),
44@@ -2080,9 +2084,6 @@ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,
45 "cancelled",
46 (GCallback) new_folder_dialog_controller_on_cancelled,
47 view);
48-
49- nautilus_file_list_free (selection);
50- nautilus_directory_unref (containing_directory);
51 }
52
53 typedef struct
diff --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
0new file mode 10064454new file mode 100644
index 0000000..8f4fa62
--- /dev/null
+++ b/debian/patches/Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch
@@ -0,0 +1,25 @@
1From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
2Date: Wed, 18 Jul 2018 18:46:16 +0200
3Subject: Revert "Revert "nautilus-file: Don't show thumbnails for the first 2
4 zoom levels""
5
6This reverts commit d62c0899f34665bdc4752ce8b6844328889f4638.
7
8This feature was already provided in Ubuntu, so would be a regression if we drop it
9---
10 src/nautilus-file.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/src/nautilus-file.c b/src/nautilus-file.c
14index 0ac5398..adbf081 100644
15--- a/src/nautilus-file.c
16+++ b/src/nautilus-file.c
17@@ -5511,7 +5511,7 @@ nautilus_thumbnail_is_limited_by_zoom (int size,
18
19 zoom_level = size * scale;
20
21- if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_SMALL)
22+ if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_STANDARD)
23 {
24 return TRUE;
25 }
diff --git a/debian/patches/appstream-compulsory.patch b/debian/patches/appstream-compulsory.patch
index 4260814..19c6d0b 100644
--- a/debian/patches/appstream-compulsory.patch
+++ b/debian/patches/appstream-compulsory.patch
@@ -1,5 +1,5 @@
1From: Jeremy Bicha <jbicha@ubuntu.com>1From: Jeremy Bicha <jbicha@ubuntu.com>
2Date: Fri, 13 Apr 2018 14:57:30 -04002Date: Fri, 13 Apr 2018 20:57:30 +0200
3Subject: Set nautilus as unremovable in GNOME Software3Subject: Set nautilus as unremovable in GNOME Software
44
5for GNOME and Unity users since it is a depends of ubuntu-desktop5for GNOME and Unity users since it is a depends of ubuntu-desktop
diff --git a/debian/patches/clear_pending_selection.patch b/debian/patches/clear_pending_selection.patch
6deleted file mode 1006446deleted file mode 100644
index f964dc9..0000000
--- a/debian/patches/clear_pending_selection.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1Origin; https://gitlab.gnome.org/GNOME/nautilus/merge_requests/195
2From 416dfb1815fe83f73e335199eea5216e604a6fd6 Mon Sep 17 00:00:00 2001
3From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
4Date: Thu, 19 Apr 2018 04:19:51 -0500
5Subject: [PATCH] window-slot: Clear pending_selection after freeing it
6
7This might not be the case when handling archive files
8---
9 src/nautilus-window-slot.c | 6 +-----
10 1 file changed, 1 insertion(+), 5 deletions(-)
11
12diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
13index 2fa9c3339..541dd24a8 100644
14--- a/src/nautilus-window-slot.c
15+++ b/src/nautilus-window-slot.c
16@@ -1611,11 +1611,7 @@ handle_regular_file_if_needed (NautilusWindowSlot *self,
17 if ((parent_file != NULL) &&
18 nautilus_file_get_file_type (file) == G_FILE_TYPE_REGULAR)
19 {
20- if (priv->pending_selection != NULL)
21- {
22- nautilus_file_list_free (priv->pending_selection);
23- }
24-
25+ g_clear_pointer (&priv->pending_selection, nautilus_file_list_free);
26 g_clear_object (&priv->pending_location);
27 g_clear_object (&priv->pending_file_to_activate);
28 g_free (priv->pending_scroll_to);
diff --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
29new file mode 1006440new file mode 100644
index 0000000..4191e7e
--- /dev/null
+++ b/debian/patches/file-view-Always-unset-pending_selection-after-freeing-it.patch
@@ -0,0 +1,80 @@
1From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
2Date: Thu, 26 Jul 2018 04:55:19 +0200
3Subject: file-view: Always unset pending_selection after freeing it
4
5When a file view was loaded with a pending selection, and not all the files were
6seen yet, the private pending_selection list was properly free'd, but the pointer
7was not cleared, causing a crash when `nautilus_files_view_set_selection` was
8called again, as it was trying to deeply copy a list pointed by this invalid
9reference.
10
11So, removing the unneeded `pending_selection` temporary pointer from the main
12function scope, as it only confuses, while use it (with an autolist) when we
13need to pass the previous `priv->pending_selection` (stealing its ownership)
14to set_selection again.
15
16Eventually use a g_clear_pointer to free the list and nullify its priv reference
17
18Fixes #295
19
20(cherry picked from commit ae3382a281b018337a8032ef13663ec2d9c7fd6c)
21
22Bug-GNOME: https://gitlab.gnome.org/GNOME/nautilus/issues/295
23Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1713581
24Applied-Upstream: commit: https://gitlab.gnome.org/GNOME/nautilus/commit/834c4e7f
25---
26 src/nautilus-files-view.c | 16 +++++++---------
27 1 file changed, 7 insertions(+), 9 deletions(-)
28
29diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
30index f916b05..87a4a42 100644
31--- a/src/nautilus-files-view.c
32+++ b/src/nautilus-files-view.c
33@@ -3587,7 +3587,6 @@ done_loading (NautilusFilesView *view,
34 gboolean all_files_seen)
35 {
36 NautilusFilesViewPrivate *priv;
37- GList *pending_selection;
38 GList *selection;
39 gboolean do_reveal = FALSE;
40
41@@ -3608,21 +3607,23 @@ done_loading (NautilusFilesView *view,
42 nautilus_files_view_update_toolbar_menus (view);
43 reset_update_interval (view);
44
45- pending_selection = priv->pending_selection;
46 selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
47
48 if (nautilus_view_is_searching (NAUTILUS_VIEW (view)) &&
49- all_files_seen && !selection && !pending_selection)
50+ all_files_seen && selection == NULL && priv->pending_selection == NULL)
51 {
52 nautilus_files_view_select_first (view);
53 do_reveal = TRUE;
54 }
55- else if (pending_selection != NULL && all_files_seen)
56+ else if (priv->pending_selection != NULL && all_files_seen)
57 {
58- priv->pending_selection = NULL;
59+ GList *pending_selection;
60+ pending_selection = g_steal_pointer (&priv->pending_selection);
61
62 nautilus_files_view_call_set_selection (view, pending_selection);
63 do_reveal = TRUE;
64+
65+ nautilus_file_list_free (pending_selection);
66 }
67
68 if (selection)
69@@ -3630,10 +3631,7 @@ done_loading (NautilusFilesView *view,
70 g_list_free_full (selection, g_object_unref);
71 }
72
73- if (pending_selection)
74- {
75- g_list_free_full (pending_selection, g_object_unref);
76- }
77+ g_clear_pointer (&priv->pending_selection, nautilus_file_list_free);
78
79 if (do_reveal)
80 {
diff --git a/debian/patches/multiarch_fallback.patch b/debian/patches/multiarch_fallback.patch
index 0cc4b8f..42edf6e 100644
--- a/debian/patches/multiarch_fallback.patch
+++ b/debian/patches/multiarch_fallback.patch
@@ -1,12 +1,13 @@
1From 54592574c3cb951085c747680046b4787daca7f2 Mon Sep 17 00:00:00 2001
2From: Jeremy Bicha <jbicha@ubuntu.com>1From: Jeremy Bicha <jbicha@ubuntu.com>
3Date: Tue, 13 Sep 2016 21:33:50 -04002Date: Tue, 13 Sep 2016 21:33:50 -0400
4Subject: [PATCH] Load extensions from non-multiarch directory too3Subject: [PATCH] Load extensions from non-multiarch directory too
54
6---5---
7 src/nautilus-module.c | 1 +6 src/nautilus-module.c | 1 +
8 1 file changed, 1 insertion(+)7 1 file changed, 1 insertion(+)
98
9diff --git a/src/nautilus-module.c b/src/nautilus-module.c
10index bf474bd..bd74cc7 100644
10--- a/src/nautilus-module.c11--- a/src/nautilus-module.c
11+++ b/src/nautilus-module.c12+++ b/src/nautilus-module.c
12@@ -260,6 +260,7 @@ nautilus_module_setup (void)13@@ -260,6 +260,7 @@ nautilus_module_setup (void)
diff --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
13new file mode 10064414new file mode 100644
index 0000000..e43f1d3
--- /dev/null
+++ b/debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mo.patch
@@ -0,0 +1,45 @@
1From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
2Date: Tue, 17 Jul 2018 04:23:58 +0200
3Subject: nautilusgtkplacesview: show error if volume is not mounted
4
5Fixes crash as location would be NULL afterwards.
6
7Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1764779
8Forwarded: not-needed
9---
10 src/gtk/nautilusgtkplacesview.c | 20 +++++++++++++++-----
11 1 file changed, 15 insertions(+), 5 deletions(-)
12
13diff --git a/src/gtk/nautilusgtkplacesview.c b/src/gtk/nautilusgtkplacesview.c
14index b72085b..c5e98a5 100644
15--- a/src/gtk/nautilusgtkplacesview.c
16+++ b/src/gtk/nautilusgtkplacesview.c
17@@ -1329,13 +1329,23 @@ volume_mount_ready_cb (GObject *source_volume,
18 GFile *root;
19
20 mount = g_volume_get_mount (volume);
21- root = g_mount_get_default_location (mount);
22
23- if (priv->should_open_location)
24- emit_open_location (NAUTILUS_GTK_PLACES_VIEW (user_data), root, priv->open_flags);
25+ if (G_IS_MOUNT (mount))
26+ {
27+ root = g_mount_get_default_location (mount);
28
29- g_object_unref (mount);
30- g_object_unref (root);
31+ if (priv->should_open_location)
32+ emit_open_location (NAUTILUS_GTK_PLACES_VIEW (user_data), root, priv->open_flags);
33+
34+ g_object_unref (mount);
35+ g_object_unref (root);
36+ }
37+ else
38+ {
39+ emit_show_error_message (NAUTILUS_GTK_PLACES_VIEW(user_data),
40+ _("Unable to access location"),
41+ _("volume not mounted"));
42+ }
43 }
44
45 update_places (view);
diff --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
0new file mode 10064446new file mode 100644
index 0000000..fddae3e
--- /dev/null
+++ b/debian/patches/query-add-recursive-flags-and-use-it-in-search-engines.patch
@@ -0,0 +1,1022 @@
1From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
2Date: Thu, 26 Jul 2018 22:01:57 +0200
3Subject: query: add recursive flags and use it in search-engines
4
5Forwarded: yes, https://gitlab.gnome.org/GNOME/nautilus/merge_requests/249
6Bug-Ubuntu: https://bugs.launchpad.net/bugs/1767027
7Applied-Upstream: 3.29
8---
9 src/meson.build | 1 +
10 src/nautilus-application.c | 11 ++----
11 src/nautilus-application.h | 3 +-
12 src/nautilus-directory-async.c | 4 +-
13 src/nautilus-file-private.h | 3 +-
14 src/nautilus-file-utilities.c | 48 +++++++++++++++++++++++
15 src/nautilus-file-utilities.h | 6 +++
16 src/nautilus-file.c | 28 ++++++++++++++
17 src/nautilus-file.h | 2 +
18 src/nautilus-query-editor.c | 20 +++++-----
19 src/nautilus-query.c | 28 +++++++-------
20 src/nautilus-query.h | 14 +++++--
21 src/nautilus-search-directory.c | 6 ---
22 src/nautilus-search-engine-private.h | 31 +++++++++++++++
23 src/nautilus-search-engine-simple.c | 74 +++++++++---------------------------
24 src/nautilus-search-engine-simple.h | 2 +
25 src/nautilus-search-engine-tracker.c | 16 ++++----
26 src/nautilus-search-engine.c | 36 +++++++++++++-----
27 src/nautilus-search-engine.h | 2 -
28 src/nautilus-shell-search-provider.c | 50 ++++++++++++++++--------
29 src/nautilus-window-slot.c | 19 ++++-----
30 src/nautilus-window-slot.h | 2 +-
31 src/nautilus-window.c | 4 +-
32 src/nautilus-window.h | 2 +-
33 24 files changed, 261 insertions(+), 151 deletions(-)
34 create mode 100644 src/nautilus-search-engine-private.h
35
36diff --git a/src/meson.build b/src/meson.build
37index a771d12..73aafe9 100644
38--- a/src/meson.build
39+++ b/src/meson.build
40@@ -226,6 +226,7 @@ libnautilus_sources = [
41 'nautilus-search-provider.h',
42 'nautilus-search-engine.c',
43 'nautilus-search-engine.h',
44+ 'nautilus-search-engine-private.h',
45 'nautilus-search-engine-model.c',
46 'nautilus-search-engine-model.h',
47 'nautilus-search-engine-simple.c',
48diff --git a/src/nautilus-application.c b/src/nautilus-application.c
49index 1ec0d22..26ce836 100644
50--- a/src/nautilus-application.c
51+++ b/src/nautilus-application.c
52@@ -1621,15 +1621,12 @@ nautilus_application_new (void)
53
54 void
55 nautilus_application_search (NautilusApplication *self,
56- const gchar *uri,
57- const gchar *text)
58+ NautilusQuery *query)
59 {
60+ g_autoptr (GFile) location = NULL;
61 NautilusWindow *window;
62- GFile *location;
63
64- location = g_file_new_for_uri (uri);
65+ location = nautilus_query_get_location (query);
66 window = open_window (self, location);
67- nautilus_window_search (window, text);
68-
69- g_object_unref (location);
70+ nautilus_window_search (window, query);
71 }
72diff --git a/src/nautilus-application.h b/src/nautilus-application.h
73index 9cb32c8..47adcc4 100644
74--- a/src/nautilus-application.h
75+++ b/src/nautilus-application.h
76@@ -86,8 +86,7 @@ GtkWidget * nautilus_application_connect_server (NautilusApplication *applicatio
77 NautilusWindow *window);
78
79 void nautilus_application_search (NautilusApplication *application,
80- const gchar *uri,
81- const gchar *text);
82+ NautilusQuery *query);
83 void nautilus_application_startup_common (NautilusApplication *application);
84
85 void nautilus_application_update_dbus_opened_locations (NautilusApplication *app);
86diff --git a/src/nautilus-directory-async.c b/src/nautilus-directory-async.c
87index 05a87e3..a1a27de 100644
88--- a/src/nautilus-directory-async.c
89+++ b/src/nautilus-directory-async.c
90@@ -4383,6 +4383,7 @@ got_filesystem_info (FilesystemInfoState *state,
91 file->details->filesystem_readonly =
92 g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY);
93 filesystem_type = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE);
94+ file->details->filesystem_remote = g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE);
95 if (g_strcmp0 (eel_ref_str_peek (file->details->filesystem_type), filesystem_type) != 0)
96 {
97 eel_ref_str_unref (file->details->filesystem_type);
98@@ -4465,7 +4466,8 @@ filesystem_info_start (NautilusDirectory *directory,
99 g_file_query_filesystem_info_async (location,
100 G_FILE_ATTRIBUTE_FILESYSTEM_READONLY ","
101 G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW ","
102- G_FILE_ATTRIBUTE_FILESYSTEM_TYPE,
103+ G_FILE_ATTRIBUTE_FILESYSTEM_TYPE ","
104+ G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE,
105 G_PRIORITY_DEFAULT,
106 state->cancellable,
107 query_filesystem_info_callback,
108diff --git a/src/nautilus-file-private.h b/src/nautilus-file-private.h
109index cb2bebb..5f6b209 100644
110--- a/src/nautilus-file-private.h
111+++ b/src/nautilus-file-private.h
112@@ -202,7 +202,8 @@ struct NautilusFileDetails
113 eel_boolean_bit filesystem_readonly : 1;
114 eel_boolean_bit filesystem_use_preview : 2; /* GFilesystemPreviewType */
115 eel_boolean_bit filesystem_info_is_up_to_date : 1;
116- eel_ref_str filesystem_type;
117+ eel_boolean_bit filesystem_remote : 1;
118+ eel_ref_str filesystem_type;
119
120 time_t trash_time; /* 0 is unknown */
121 time_t recency; /* 0 is unknown */
122diff --git a/src/nautilus-file-utilities.c b/src/nautilus-file-utilities.c
123index e79f37b..f8d8476 100644
124--- a/src/nautilus-file-utilities.c
125+++ b/src/nautilus-file-utilities.c
126@@ -1517,3 +1517,51 @@ nautilus_uri_to_native_uri (const gchar *uri)
127 return NULL;
128 }
129
130+NautilusQueryRecursive
131+location_settings_search_get_recursive (void)
132+{
133+ switch (g_settings_get_enum (nautilus_preferences, "recursive-search"))
134+ {
135+ case NAUTILUS_SPEED_TRADEOFF_ALWAYS:
136+ {
137+ return NAUTILUS_QUERY_RECURSIVE_ALWAYS;
138+ }
139+ break;
140+
141+ case NAUTILUS_SPEED_TRADEOFF_LOCAL_ONLY:
142+ {
143+ return NAUTILUS_QUERY_RECURSIVE_LOCAL_ONLY;
144+ }
145+ break;
146+
147+ case NAUTILUS_SPEED_TRADEOFF_NEVER:
148+ {
149+ return NAUTILUS_QUERY_RECURSIVE_NEVER;
150+ }
151+ break;
152+ }
153+
154+ return NAUTILUS_QUERY_RECURSIVE_ALWAYS;
155+}
156+
157+NautilusQueryRecursive
158+location_settings_search_get_recursive_for_location (GFile *location)
159+{
160+ NautilusQueryRecursive recursive = location_settings_search_get_recursive ();
161+
162+ g_return_val_if_fail (location, recursive);
163+
164+ if (recursive == NAUTILUS_QUERY_RECURSIVE_LOCAL_ONLY)
165+ {
166+ g_autoptr (NautilusFile) file = nautilus_file_get_existing (location);
167+
168+ g_return_val_if_fail (file != NULL, recursive);
169+
170+ if (nautilus_file_is_remote (file))
171+ {
172+ recursive = NAUTILUS_QUERY_RECURSIVE_NEVER;
173+ }
174+ }
175+
176+ return recursive;
177+}
178diff --git a/src/nautilus-file-utilities.h b/src/nautilus-file-utilities.h
179index b567611..b165d63 100644
180--- a/src/nautilus-file-utilities.h
181+++ b/src/nautilus-file-utilities.h
182@@ -25,6 +25,9 @@
183
184 #include <gio/gio.h>
185 #include <gtk/gtk.h>
186+#include <config.h>
187+
188+#include "nautilus-query.h"
189
190 #define NAUTILUS_DESKTOP_ID "org.gnome.Nautilus.desktop"
191
192@@ -127,4 +130,7 @@ GList * nautilus_file_list_from_uri_list (GList *uris);
193
194 gchar * nautilus_uri_to_native_uri (const gchar *uri);
195
196+NautilusQueryRecursive location_settings_search_get_recursive (void);
197+NautilusQueryRecursive location_settings_search_get_recursive_for_location (GFile *location);
198+
199 #endif /* NAUTILUS_FILE_UTILITIES_H */
200diff --git a/src/nautilus-file.c b/src/nautilus-file.c
201index 3f6a69f..63413a6 100644
202--- a/src/nautilus-file.c
203+++ b/src/nautilus-file.c
204@@ -4975,6 +4975,29 @@ nautilus_file_get_filesystem_type (NautilusFile *file)
205 return filesystem_type;
206 }
207
208+gboolean
209+nautilus_file_get_filesystem_remote (NautilusFile *file)
210+{
211+ NautilusFile *parent;
212+
213+ g_assert (NAUTILUS_IS_FILE (file));
214+
215+ if (nautilus_file_is_directory (file))
216+ {
217+ return file->details->filesystem_remote;
218+ }
219+ else
220+ {
221+ parent = nautilus_file_get_parent (file);
222+ if (parent != NULL)
223+ {
224+ return parent->details->filesystem_remote;
225+ }
226+ }
227+
228+ return FALSE;
229+}
230+
231 gboolean
232 nautilus_file_should_show_thumbnail (NautilusFile *file)
233 {
234@@ -8376,6 +8399,11 @@ nautilus_file_is_remote (NautilusFile *file)
235
236 g_assert (NAUTILUS_IS_FILE (file));
237
238+ if (nautilus_file_get_filesystem_remote (file))
239+ {
240+ return TRUE;
241+ }
242+
243 filesystem_type = nautilus_file_get_filesystem_type (file);
244
245 return filesystem_type != NULL && g_strv_contains (remote_types, filesystem_type);
246diff --git a/src/nautilus-file.h b/src/nautilus-file.h
247index 5b319f9..54fdcb3 100644
248--- a/src/nautilus-file.h
249+++ b/src/nautilus-file.h
250@@ -253,6 +253,8 @@ char * nautilus_file_get_filesystem_id (Nautilu
251
252 char * nautilus_file_get_filesystem_type (NautilusFile *file);
253
254+gboolean nautilus_file_get_filesystem_remote (NautilusFile *file);
255+
256 NautilusFile * nautilus_file_get_trash_original_file (NautilusFile *file);
257
258 /* Permissions. */
259diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
260index 94b9c4d..8398ad4 100644
261--- a/src/nautilus-query-editor.c
262+++ b/src/nautilus-query-editor.c
263@@ -144,12 +144,12 @@ update_information_label (NautilusQueryEditor *editor)
264 fts_sensitive = FALSE;
265 }
266 else if (nautilus_file_is_remote (file) &&
267- !settings_search_is_recursive (editor))
268+ location_settings_search_get_recursive_for_location (priv->location) == NAUTILUS_QUERY_RECURSIVE_NEVER)
269 {
270 label = _("Remote location — only searching the current folder");
271 fts_sensitive = FALSE;
272 }
273- else if (!settings_search_is_recursive (editor))
274+ else if (location_settings_search_get_recursive_for_location (priv->location) == NAUTILUS_QUERY_RECURSIVE_NEVER)
275 {
276 label = _("Only searching the current folder");
277 }
278@@ -170,17 +170,18 @@ recursive_search_preferences_changed (GSettings *settings,
279 gchar *key,
280 NautilusQueryEditor *editor)
281 {
282+
283 NautilusQueryEditorPrivate *priv;
284- gboolean recursive;
285+ NautilusQueryRecursive recursive;
286
287 priv = nautilus_query_editor_get_instance_private (editor);
288
289- if (!priv->location || !priv->query)
290+ if (!priv->query)
291 {
292 return;
293 }
294
295- recursive = settings_search_is_recursive (editor);
296+ recursive = location_settings_search_get_recursive ();
297 if (recursive != nautilus_query_get_recursive (priv->query))
298 {
299 nautilus_query_set_recursive (priv->query, recursive);
300@@ -382,7 +383,6 @@ create_query (NautilusQueryEditor *editor)
301 NautilusQueryEditorPrivate *priv;
302 NautilusQuery *query;
303 NautilusFile *file;
304- gboolean recursive;
305 gboolean fts_enabled;
306
307 priv = nautilus_query_editor_get_instance_private (editor);
308@@ -396,11 +396,13 @@ create_query (NautilusQueryEditor *editor)
309
310 nautilus_query_set_search_content (query, fts_enabled);
311
312- recursive = settings_search_is_recursive (editor);
313-
314 nautilus_query_set_text (query, gtk_entry_get_text (GTK_ENTRY (priv->entry)));
315 nautilus_query_set_location (query, priv->location);
316- nautilus_query_set_recursive (query, recursive);
317+
318+ /* We only set the query using the global setting for recursivity here,
319+ * it's up to the search engine to check weather it can proceed with
320+ * deep search in the current directory or not. */
321+ nautilus_query_set_recursive (query, location_settings_search_get_recursive ());
322
323 nautilus_query_editor_set_query (editor, query);
324
325diff --git a/src/nautilus-query.c b/src/nautilus-query.c
326index 59600d1..c3e4ef4 100644
327--- a/src/nautilus-query.c
328+++ b/src/nautilus-query.c
329@@ -44,11 +44,11 @@ struct _NautilusQuery
330 GList *mime_types;
331 gboolean show_hidden;
332 GPtrArray *date_range;
333+ NautilusQueryRecursive recursive;
334 NautilusQuerySearchType search_type;
335 NautilusQuerySearchContent search_content;
336
337 gboolean searching;
338- gboolean recursive;
339 char **prepared_words;
340 GMutex prepared_words_mutex;
341 };
342@@ -118,7 +118,7 @@ nautilus_query_get_property (GObject *object,
343
344 case PROP_RECURSIVE:
345 {
346- g_value_set_boolean (value, self->recursive);
347+ g_value_set_enum (value, self->recursive);
348 }
349 break;
350
351@@ -181,7 +181,7 @@ nautilus_query_set_property (GObject *object,
352
353 case PROP_RECURSIVE:
354 {
355- nautilus_query_set_recursive (self, g_value_get_boolean (value));
356+ nautilus_query_set_recursive (self, g_value_get_enum (value));
357 }
358 break;
359
360@@ -272,11 +272,12 @@ nautilus_query_class_init (NautilusQueryClass *class)
361 */
362 g_object_class_install_property (gobject_class,
363 PROP_RECURSIVE,
364- g_param_spec_boolean ("recursive",
365- "Whether the query is being performed on subdirectories",
366- "Whether the query is being performed on subdirectories or not",
367- FALSE,
368- G_PARAM_READWRITE));
369+ g_param_spec_enum ("recursive",
370+ "Whether the query is being performed on subdirectories",
371+ "Whether the query is being performed on subdirectories or not",
372+ NAUTILUS_TYPE_QUERY_RECURSIVE,
373+ NAUTILUS_QUERY_RECURSIVE_ALWAYS,
374+ G_PARAM_READWRITE));
375
376 /**
377 * NautilusQuery::search-type:
378@@ -636,22 +637,21 @@ nautilus_query_set_searching (NautilusQuery *query,
379 }
380 }
381
382-gboolean
383+NautilusQueryRecursive
384 nautilus_query_get_recursive (NautilusQuery *query)
385 {
386- g_return_val_if_fail (NAUTILUS_IS_QUERY (query), FALSE);
387+ g_return_val_if_fail (NAUTILUS_IS_QUERY (query),
388+ NAUTILUS_QUERY_RECURSIVE_ALWAYS);
389
390 return query->recursive;
391 }
392
393 void
394-nautilus_query_set_recursive (NautilusQuery *query,
395- gboolean recursive)
396+nautilus_query_set_recursive (NautilusQuery *query,
397+ NautilusQueryRecursive recursive)
398 {
399 g_return_if_fail (NAUTILUS_IS_QUERY (query));
400
401- recursive = !!recursive;
402-
403 if (query->recursive != recursive)
404 {
405 query->recursive = recursive;
406diff --git a/src/nautilus-query.h b/src/nautilus-query.h
407index 2264f50..0e04061 100644
408--- a/src/nautilus-query.h
409+++ b/src/nautilus-query.h
410@@ -35,6 +35,13 @@ typedef enum {
411 NAUTILUS_QUERY_SEARCH_CONTENT_FULL_TEXT,
412 } NautilusQuerySearchContent;
413
414+typedef enum {
415+ NAUTILUS_QUERY_RECURSIVE_NEVER,
416+ NAUTILUS_QUERY_RECURSIVE_ALWAYS,
417+ NAUTILUS_QUERY_RECURSIVE_LOCAL_ONLY,
418+ NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY,
419+} NautilusQueryRecursive;
420+
421 #define NAUTILUS_TYPE_QUERY (nautilus_query_get_type ())
422
423 G_DECLARE_FINAL_TYPE (NautilusQuery, nautilus_query, NAUTILUS, QUERY, GObject)
424@@ -67,10 +74,9 @@ GPtrArray* nautilus_query_get_date_range (NautilusQuery *query);
425 void nautilus_query_set_date_range (NautilusQuery *query,
426 GPtrArray *date_range);
427
428-gboolean nautilus_query_get_recursive (NautilusQuery *query);
429-
430-void nautilus_query_set_recursive (NautilusQuery *query,
431- gboolean recursive);
432+NautilusQueryRecursive nautilus_query_get_recursive (NautilusQuery *query);
433+void nautilus_query_set_recursive (NautilusQuery *query,
434+ NautilusQueryRecursive recursive);
435
436 gboolean nautilus_query_get_searching (NautilusQuery *query);
437
438diff --git a/src/nautilus-search-directory.c b/src/nautilus-search-directory.c
439index ae710f3..d86fda2 100644
440--- a/src/nautilus-search-directory.c
441+++ b/src/nautilus-search-directory.c
442@@ -176,8 +176,6 @@ static void
443 start_search (NautilusSearchDirectory *self)
444 {
445 NautilusSearchEngineModel *model_provider;
446- NautilusSearchEngineSimple *simple_provider;
447- gboolean recursive;
448
449 if (!self->query)
450 {
451@@ -205,10 +203,6 @@ start_search (NautilusSearchDirectory *self)
452 model_provider = nautilus_search_engine_get_model_provider (self->engine);
453 nautilus_search_engine_model_set_model (model_provider, self->base_model);
454
455- simple_provider = nautilus_search_engine_get_simple_provider (self->engine);
456- recursive = nautilus_query_get_recursive (self->query);
457- g_object_set (simple_provider, "recursive", recursive, NULL);
458-
459 reset_file_list (self);
460
461 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (self->engine));
462diff --git a/src/nautilus-search-engine-private.h b/src/nautilus-search-engine-private.h
463new file mode 100644
464index 0000000..e5f989f
465--- /dev/null
466+++ b/src/nautilus-search-engine-private.h
467@@ -0,0 +1,31 @@
468+/*
469+ * Copyright (C) 2018 Canonical Ltd.
470+ *
471+ * Nautilus is free software; you can redistribute it and/or
472+ * modify it under the terms of the GNU General Public License as
473+ * published by the Free Software Foundation; either version 2 of the
474+ * License, or (at your option) any later version.
475+ *
476+ * Nautilus is distributed in the hope that it will be useful,
477+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
478+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
479+ * General Public License for more details.
480+ *
481+ * You should have received a copy of the GNU General Public
482+ * License along with this program; see the file COPYING. If not,
483+ * see <http://www.gnu.org/licenses/>.
484+ *
485+ * Author: Marco Trevisan <marco@ubuntu.com>
486+ *
487+ */
488+
489+#pragma once
490+
491+#include "nautilus-query.h"
492+
493+typedef enum {
494+ NAUTILUS_SEARCH_ENGINE_TYPE_NON_INDEXED,
495+ NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED,
496+} NautilusSearchEngineType;
497+
498+gboolean is_recursive_search (NautilusSearchEngineType engine_type, NautilusQueryRecursive recursive, GFile *location);
499diff --git a/src/nautilus-search-engine-simple.c b/src/nautilus-search-engine-simple.c
500index 3ec9eb3..19a8616 100644
501--- a/src/nautilus-search-engine-simple.c
502+++ b/src/nautilus-search-engine-simple.c
503@@ -20,9 +20,11 @@
504 */
505
506 #include <config.h>
507+#include "nautilus-search-engine-simple.h"
508+
509+#include "nautilus-search-engine-private.h"
510 #include "nautilus-search-hit.h"
511 #include "nautilus-search-provider.h"
512-#include "nautilus-search-engine-simple.h"
513 #include "nautilus-ui-utilities.h"
514 #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
515 #include "nautilus-debug.h"
516@@ -35,7 +37,7 @@
517
518 enum
519 {
520- PROP_RECURSIVE = 1,
521+ PROP_0,
522 PROP_RUNNING,
523 NUM_PROPERTIES
524 };
525@@ -52,7 +54,6 @@ typedef struct
526
527 GHashTable *visited;
528
529- gboolean recursive;
530 gint n_processed_files;
531 GList *hits;
532
533@@ -66,8 +67,6 @@ struct _NautilusSearchEngineSimple
534 NautilusQuery *query;
535
536 SearchThreadData *active_search;
537-
538- gboolean recursive;
539 };
540
541 static void nautilus_search_provider_init (NautilusSearchProviderInterface *iface);
542@@ -208,6 +207,9 @@ static void
543 visit_directory (GFile *dir,
544 SearchThreadData *data)
545 {
546+ g_autoptr (GPtrArray) date_range = NULL;
547+ NautilusQuerySearchType type;
548+ NautilusQueryRecursive recursive;
549 GFileEnumerator *enumerator;
550 GFileInfo *info;
551 GFile *child;
552@@ -238,10 +240,12 @@ visit_directory (GFile *dir,
553 return;
554 }
555
556+ type = nautilus_query_get_search_type (data->query);
557+ recursive = nautilus_query_get_recursive (data->query);
558+ date_range = nautilus_query_get_date_range (data->query);
559+
560 while ((info = g_file_enumerator_next_file (enumerator, data->cancellable, NULL)) != NULL)
561 {
562- g_autoptr (GPtrArray) date_range = NULL;
563-
564 display_name = g_file_info_get_display_name (info);
565 if (display_name == NULL)
566 {
567@@ -276,15 +280,12 @@ visit_directory (GFile *dir,
568 mtime = g_file_info_get_attribute_uint64 (info, "time::modified");
569 atime = g_file_info_get_attribute_uint64 (info, "time::access");
570
571- date_range = nautilus_query_get_date_range (data->query);
572 if (found && date_range != NULL)
573 {
574- NautilusQuerySearchType type;
575 guint64 current_file_time;
576
577 initial_date = g_ptr_array_index (date_range, 0);
578 end_date = g_ptr_array_index (date_range, 1);
579- type = nautilus_query_get_search_type (data->query);
580
581 if (type == NAUTILUS_QUERY_SEARCH_TYPE_LAST_ACCESS)
582 {
583@@ -322,7 +323,10 @@ visit_directory (GFile *dir,
584 send_batch (data);
585 }
586
587- if (data->engine->recursive && g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
588+ if (recursive != NAUTILUS_QUERY_RECURSIVE_NEVER &&
589+ g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY &&
590+ is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_NON_INDEXED,
591+ recursive, child))
592 {
593 id = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_ID_FILE);
594 visited = FALSE;
595@@ -438,9 +442,9 @@ nautilus_search_engine_simple_set_query (NautilusSearchProvider *provider,
596 {
597 NautilusSearchEngineSimple *simple = NAUTILUS_SEARCH_ENGINE_SIMPLE (provider);
598
599- g_object_ref (query);
600 g_clear_object (&simple->query);
601- simple->query = query;
602+
603+ simple->query = g_object_ref (query);
604 }
605
606 static gboolean
607@@ -453,30 +457,6 @@ nautilus_search_engine_simple_is_running (NautilusSearchProvider *provider)
608 return simple->active_search != NULL;
609 }
610
611-static void
612-nautilus_search_engine_simple_set_property (GObject *object,
613- guint arg_id,
614- const GValue *value,
615- GParamSpec *pspec)
616-{
617- NautilusSearchEngineSimple *engine = NAUTILUS_SEARCH_ENGINE_SIMPLE (object);
618-
619- switch (arg_id)
620- {
621- case PROP_RECURSIVE:
622- {
623- engine->recursive = g_value_get_boolean (value);
624- }
625- break;
626-
627- default:
628- {
629- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, arg_id, pspec);
630- }
631- break;
632- }
633-}
634-
635 static void
636 nautilus_search_engine_simple_get_property (GObject *object,
637 guint arg_id,
638@@ -492,12 +472,6 @@ nautilus_search_engine_simple_get_property (GObject *object,
639 g_value_set_boolean (value, nautilus_search_engine_simple_is_running (NAUTILUS_SEARCH_PROVIDER (engine)));
640 }
641 break;
642-
643- case PROP_RECURSIVE:
644- {
645- g_value_set_boolean (value, engine->recursive);
646- }
647- break;
648 }
649 }
650
651@@ -518,20 +492,6 @@ nautilus_search_engine_simple_class_init (NautilusSearchEngineSimpleClass *class
652 gobject_class = G_OBJECT_CLASS (class);
653 gobject_class->finalize = finalize;
654 gobject_class->get_property = nautilus_search_engine_simple_get_property;
655- gobject_class->set_property = nautilus_search_engine_simple_set_property;
656-
657- /**
658- * NautilusSearchEngineSimple::recursive:
659- *
660- * Whether the search is recursive or not.
661- */
662- g_object_class_install_property (gobject_class,
663- PROP_RECURSIVE,
664- g_param_spec_boolean ("recursive",
665- "recursive",
666- "recursive",
667- FALSE,
668- G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
669
670 /**
671 * NautilusSearchEngine::running:
672diff --git a/src/nautilus-search-engine-simple.h b/src/nautilus-search-engine-simple.h
673index dd6953f..d50b36d 100644
674--- a/src/nautilus-search-engine-simple.h
675+++ b/src/nautilus-search-engine-simple.h
676@@ -22,6 +22,8 @@
677 #ifndef NAUTILUS_SEARCH_ENGINE_SIMPLE_H
678 #define NAUTILUS_SEARCH_ENGINE_SIMPLE_H
679
680+#include <glib-object.h>
681+
682 G_BEGIN_DECLS
683
684 #define NAUTILUS_TYPE_SEARCH_ENGINE_SIMPLE (nautilus_search_engine_simple_get_type ())
685diff --git a/src/nautilus-search-engine-tracker.c b/src/nautilus-search-engine-tracker.c
686index 4c917dd..8885ca4 100644
687--- a/src/nautilus-search-engine-tracker.c
688+++ b/src/nautilus-search-engine-tracker.c
689@@ -22,7 +22,7 @@
690 #include <config.h>
691 #include "nautilus-search-engine-tracker.h"
692
693-#include "nautilus-global-preferences.h"
694+#include "nautilus-search-engine-private.h"
695 #include "nautilus-search-hit.h"
696 #include "nautilus-search-provider.h"
697 #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
698@@ -295,7 +295,6 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
699 GString *sparql;
700 GList *mimetypes, *l;
701 gint mime_count;
702- gboolean recursive;
703 GPtrArray *date_range;
704
705 tracker = NAUTILUS_SEARCH_ENGINE_TRACKER (provider);
706@@ -317,10 +316,6 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
707 return;
708 }
709
710- recursive = g_settings_get_enum (nautilus_preferences, "recursive-search") == NAUTILUS_SPEED_TRADEOFF_LOCAL_ONLY ||
711- g_settings_get_enum (nautilus_preferences, "recursive-search") == NAUTILUS_SPEED_TRADEOFF_ALWAYS;
712- tracker->recursive = recursive;
713-
714 tracker->fts_enabled = nautilus_query_get_search_content (tracker->query);
715
716 query_text = nautilus_query_get_text (tracker->query);
717@@ -468,13 +463,18 @@ static void
718 nautilus_search_engine_tracker_set_query (NautilusSearchProvider *provider,
719 NautilusQuery *query)
720 {
721+ g_autoptr(GFile) location = NULL;
722 NautilusSearchEngineTracker *tracker;
723
724 tracker = NAUTILUS_SEARCH_ENGINE_TRACKER (provider);
725+ location = nautilus_query_get_location (query);
726
727- g_object_ref (query);
728 g_clear_object (&tracker->query);
729- tracker->query = query;
730+
731+ tracker->query = g_object_ref (query);
732+ tracker->recursive = is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED,
733+ nautilus_query_get_recursive (query),
734+ location);
735 }
736
737 static gboolean
738diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c
739index 209bd4f..3a0c9d4 100644
740--- a/src/nautilus-search-engine.c
741+++ b/src/nautilus-search-engine.c
742@@ -20,14 +20,16 @@
743 */
744
745 #include <config.h>
746-
747-#include <glib/gi18n.h>
748-#include "nautilus-search-provider.h"
749 #include "nautilus-search-engine.h"
750-#include "nautilus-search-engine-simple.h"
751+#include "nautilus-search-engine-private.h"
752+
753+#include "nautilus-file.h"
754 #include "nautilus-search-engine-model.h"
755+#include "nautilus-search-provider.h"
756+#include <glib/gi18n.h>
757 #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH
758 #include "nautilus-debug.h"
759+#include "nautilus-search-engine-simple.h"
760 #include "nautilus-search-engine-tracker.h"
761
762 typedef struct
763@@ -417,12 +419,28 @@ nautilus_search_engine_get_model_provider (NautilusSearchEngine *engine)
764 return priv->model;
765 }
766
767-NautilusSearchEngineSimple *
768-nautilus_search_engine_get_simple_provider (NautilusSearchEngine *engine)
769+gboolean
770+is_recursive_search (NautilusSearchEngineType engine_type,
771+ NautilusQueryRecursive recursive,
772+ GFile *location)
773 {
774- NautilusSearchEnginePrivate *priv;
775+ switch (recursive)
776+ {
777+ case NAUTILUS_QUERY_RECURSIVE_NEVER:
778+ return FALSE;
779
780- priv = nautilus_search_engine_get_instance_private (engine);
781+ case NAUTILUS_QUERY_RECURSIVE_ALWAYS:
782+ return TRUE;
783+
784+ case NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY:
785+ return engine_type == NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED;
786+
787+ case NAUTILUS_QUERY_RECURSIVE_LOCAL_ONLY:
788+ {
789+ g_autoptr (NautilusFile) file = nautilus_file_get (location);
790+ return !nautilus_file_is_remote (file);
791+ }
792+ }
793
794- return priv->simple;
795+ return TRUE;
796 }
797diff --git a/src/nautilus-search-engine.h b/src/nautilus-search-engine.h
798index 0416e83..435908a 100644
799--- a/src/nautilus-search-engine.h
800+++ b/src/nautilus-search-engine.h
801@@ -42,8 +42,6 @@ struct _NautilusSearchEngineClass
802 NautilusSearchEngine *nautilus_search_engine_new (void);
803 NautilusSearchEngineModel *
804 nautilus_search_engine_get_model_provider (NautilusSearchEngine *engine);
805-NautilusSearchEngineSimple *
806- nautilus_search_engine_get_simple_provider (NautilusSearchEngine *engine);
807
808 G_END_DECLS
809
810diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
811index cdadc08..ffc2b7f 100644
812--- a/src/nautilus-shell-search-provider.c
813+++ b/src/nautilus-shell-search-provider.c
814@@ -426,15 +426,30 @@ search_add_volumes_and_bookmarks (PendingSearch *search)
815 g_object_unref (volume_monitor);
816 }
817
818+static NautilusQuery*
819+shell_query_new (gchar **terms)
820+{
821+ NautilusQuery *query;
822+ g_autoptr (GFile) home = NULL;
823+ g_autofree gchar *terms_joined = NULL;
824+
825+ terms_joined = g_strjoinv (" ", terms);
826+ home = g_file_new_for_path (g_get_home_dir ());
827+
828+ query = nautilus_query_new ();
829+ nautilus_query_set_text (query, terms_joined);
830+ nautilus_query_set_location (query, home);
831+
832+ return query;
833+}
834+
835 static void
836 execute_search (NautilusShellSearchProvider *self,
837 GDBusMethodInvocation *invocation,
838 gchar **terms)
839 {
840- gchar *terms_joined;
841 NautilusQuery *query;
842 PendingSearch *pending_search;
843- GFile *home;
844
845 cancel_current_search (self);
846
847@@ -446,13 +461,9 @@ execute_search (NautilusShellSearchProvider *self,
848 return;
849 }
850
851- terms_joined = g_strjoinv (" ", terms);
852- home = g_file_new_for_path (g_get_home_dir ());
853-
854- query = nautilus_query_new ();
855+ query = shell_query_new (terms);
856+ nautilus_query_set_recursive (query, NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY);
857 nautilus_query_set_show_hidden_files (query, FALSE);
858- nautilus_query_set_text (query, terms_joined);
859- nautilus_query_set_location (query, home);
860
861 pending_search = g_slice_new0 (PendingSearch);
862 pending_search->invocation = g_object_ref (invocation);
863@@ -479,9 +490,6 @@ execute_search (NautilusShellSearchProvider *self,
864 nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (pending_search->engine),
865 query);
866 nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (pending_search->engine));
867-
868- g_clear_object (&home);
869- g_free (terms_joined);
870 }
871
872 static gboolean
873@@ -713,13 +721,23 @@ handle_launch_search (NautilusShellSearchProvider2 *skeleton,
874 gpointer user_data)
875 {
876 GApplication *app = g_application_get_default ();
877- gchar *string = g_strjoinv (" ", terms);
878- gchar *uri = nautilus_get_home_directory_uri ();
879+ g_autoptr (NautilusQuery) query = shell_query_new (terms);
880
881- nautilus_application_search (NAUTILUS_APPLICATION (app), uri, string);
882+ if (location_settings_search_get_recursive () == NAUTILUS_QUERY_RECURSIVE_NEVER)
883+ {
884+ /*
885+ * If no recursive search is enabled, we still want to be able to
886+ * show the same results we presented in the overview when nautilus
887+ * is explicitly launched to access to more results, and thus we perform
888+ * a query showing results coming from index-based search engines.
889+ * Otherwise we just respect the user settings.
890+ * See: https://gitlab.gnome.org/GNOME/nautilus/merge_requests/249
891+ */
892+ nautilus_query_set_recursive (query,
893+ NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY);
894+ }
895
896- g_free (string);
897- g_free (uri);
898+ nautilus_application_search (NAUTILUS_APPLICATION (app), query);
899
900 nautilus_shell_search_provider2_complete_launch_search (skeleton, invocation);
901 return TRUE;
902diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
903index 7b27244..9b9a7aa 100644
904--- a/src/nautilus-window-slot.c
905+++ b/src/nautilus-window-slot.c
906@@ -100,6 +100,7 @@ typedef struct
907
908 /* Query editor */
909 NautilusQueryEditor *query_editor;
910+ NautilusQuery *pending_search_query;
911 gulong qe_changed_id;
912 gulong qe_cancel_id;
913 gulong qe_activated_id;
914@@ -110,7 +111,6 @@ typedef struct
915 * finish. Used for showing a spinner to provide feedback to the user. */
916 gboolean allow_stop;
917 gboolean needs_reload;
918- gchar *pending_search_text;
919
920 /* New location. */
921 GFile *pending_location;
922@@ -361,9 +361,9 @@ update_search_visible (NautilusWindowSlot *self)
923 g_object_unref (query);
924 }
925
926- if (priv->pending_search_text)
927+ if (priv->pending_search_query)
928 {
929- nautilus_window_slot_search (self, g_strdup (priv->pending_search_text));
930+ nautilus_window_slot_search (self, g_object_ref (priv->pending_search_query));
931 }
932 }
933
934@@ -589,17 +589,13 @@ nautilus_window_slot_get_search_visible (NautilusWindowSlot *self)
935
936 void
937 nautilus_window_slot_search (NautilusWindowSlot *self,
938- const gchar *text)
939+ NautilusQuery *query)
940 {
941 NautilusWindowSlotPrivate *priv;
942 NautilusView *view;
943
944 priv = nautilus_window_slot_get_instance_private (self);
945- if (priv->pending_search_text)
946- {
947- g_free (priv->pending_search_text);
948- priv->pending_search_text = NULL;
949- }
950+ g_clear_object (&priv->pending_search_query);
951
952 view = nautilus_window_slot_get_current_view (self);
953 /* We could call this when the location is still being checked in the
954@@ -608,11 +604,11 @@ nautilus_window_slot_search (NautilusWindowSlot *self,
955 if (view)
956 {
957 nautilus_window_slot_set_search_visible (self, TRUE);
958- nautilus_query_editor_set_text (priv->query_editor, text);
959+ nautilus_query_editor_set_query (priv->query_editor, query);
960 }
961 else
962 {
963- priv->pending_search_text = g_strdup (text);
964+ priv->pending_search_query = g_object_ref (query);
965 }
966 }
967
968@@ -2812,6 +2808,7 @@ nautilus_window_slot_dispose (GObject *object)
969 g_clear_object (&priv->current_location_bookmark);
970 g_clear_object (&priv->last_location_bookmark);
971 g_clear_object (&priv->slot_action_group);
972+ g_clear_object (&priv->pending_search_query);
973
974 g_clear_pointer (&priv->find_mount_cancellable, g_cancellable_cancel);
975
976diff --git a/src/nautilus-window-slot.h b/src/nautilus-window-slot.h
977index 573357d..f67b6ab 100644
978--- a/src/nautilus-window-slot.h
979+++ b/src/nautilus-window-slot.h
980@@ -112,7 +112,7 @@ void nautilus_window_slot_set_active (NautilusWindowSlot *
981 gboolean nautilus_window_slot_get_loading (NautilusWindowSlot *slot);
982
983 void nautilus_window_slot_search (NautilusWindowSlot *slot,
984- const gchar *text);
985+ NautilusQuery *query);
986
987 gboolean nautilus_window_slot_handles_location (NautilusWindowSlot *self,
988 GFile *location);
989diff --git a/src/nautilus-window.c b/src/nautilus-window.c
990index d355e1e..b10c623 100644
991--- a/src/nautilus-window.c
992+++ b/src/nautilus-window.c
993@@ -3107,14 +3107,14 @@ nautilus_window_show_about_dialog (NautilusWindow *window)
994
995 void
996 nautilus_window_search (NautilusWindow *window,
997- const gchar *text)
998+ NautilusQuery *query)
999 {
1000 NautilusWindowSlot *active_slot;
1001
1002 active_slot = nautilus_window_get_active_slot (window);
1003 if (active_slot)
1004 {
1005- nautilus_window_slot_search (active_slot, text);
1006+ nautilus_window_slot_search (active_slot, query);
1007 }
1008 else
1009 {
1010diff --git a/src/nautilus-window.h b/src/nautilus-window.h
1011index 39b16e7..c1196d3 100644
1012--- a/src/nautilus-window.h
1013+++ b/src/nautilus-window.h
1014@@ -135,7 +135,7 @@ void nautilus_window_end_dnd (NautilusWindow *window,
1015 GdkDragContext *context);
1016
1017 void nautilus_window_search (NautilusWindow *window,
1018- const gchar *text);
1019+ NautilusQuery *query);
1020
1021 void nautilus_window_initialize_slot (NautilusWindow *window,
1022 NautilusWindowSlot *slot,
diff --git a/debian/patches/series b/debian/patches/series
index d6c50a8..41a35d1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
1Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch
2Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch
1multiarch_fallback.patch3multiarch_fallback.patch
203_translations_list_update.patch403_translations_list_update.patch
304_suppress_umount_in_ltsp.patch504_suppress_umount_in_ltsp.patch
@@ -14,10 +16,11 @@ ubuntu_backspace_behaviour.patch
140001-Respect-gtk-dialogs-use-header-for-all-dialogs.patch160001-Respect-gtk-dialogs-use-header-for-all-dialogs.patch
15#Needs updating17#Needs updating
16#16_unity_new_documents.patch18#16_unity_new_documents.patch
19query-add-recursive-flags-and-use-it-in-search-engines.patch
170015-tracker-search-engine-don-t-start-it-if-not-availabl.patch200015-tracker-search-engine-don-t-start-it-if-not-availabl.patch
180016-search-engine-add-a-recent-search-engine-listing-Gtk.patch210016-search-engine-add-a-recent-search-engine-listing-Gtk.patch
190017-recent-add-function-to-update-manager-on-file-rename.patch220017-recent-add-function-to-update-manager-on-file-rename.patch
200018-search-engine-add-locate-based-search-engine.patch230018-search-engine-add-locate-based-search-engine.patch
21appstream-compulsory.patch24appstream-compulsory.patch
22server_list_segfault.patch25nautilusgtkplacesview-show-error-if-volume-is-not-mo.patch
23clear_pending_selection.patch26file-view-Always-unset-pending_selection-after-freeing-it.patch
diff --git a/debian/patches/server_list_segfault.patch b/debian/patches/server_list_segfault.patch
24deleted file mode 10064427deleted file mode 100644
index 28e0784..0000000
--- a/debian/patches/server_list_segfault.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From 5a5ce0e210a97fbde85a37d24269415b11dcf5d8 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
3Date: Thu, 19 Apr 2018 03:04:58 -0500
4Subject: [PATCH 1/2] nautilusgtkplacesview: unset entry_pulse_timeout_id
5 before removing it
6
7Fixes a warning on widget finalize, when trying to remove an invalid
8source.
9---
10 src/gtk/nautilusgtkplacesview.c | 1 +
11 1 file changed, 1 insertion(+)
12
13diff --git a/src/gtk/nautilusgtkplacesview.c b/src/gtk/nautilusgtkplacesview.c
14index de0610e52..e00576658 100644
15--- a/src/gtk/nautilusgtkplacesview.c
16+++ b/src/gtk/nautilusgtkplacesview.c
17@@ -1405,6 +1405,7 @@ pulse_entry_cb (gpointer user_data)
18 {
19 gtk_entry_set_progress_pulse_step (GTK_ENTRY (priv->address_entry), 0.0);
20 gtk_entry_set_progress_fraction (GTK_ENTRY (priv->address_entry), 0.0);
21+ priv->entry_pulse_timeout_id = 0;
22
23 return G_SOURCE_REMOVE;
24 }
25--
262.14.3
27
28
29From 8571e5735d4237d98f286f9d9fce59d8519826a7 Mon Sep 17 00:00:00 2001
30From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
31Date: Thu, 19 Apr 2018 03:06:31 -0500
32Subject: [PATCH 2/2] nautilusgtkplacesview: disconnect from server list
33 monitor changes on destroy
34
35It might happen otherwise that a change is recorded in between the
36widget dispose and finalization, causing a crash when setting
37the visible name for the GtkStack (as that will be NULL at that point)
38
39Fixes #140
40---
41 src/gtk/nautilusgtkplacesview.c | 3 +++
42 1 file changed, 3 insertions(+)
43
44diff --git a/src/gtk/nautilusgtkplacesview.c b/src/gtk/nautilusgtkplacesview.c
45index e00576658..041849f60 100644
46--- a/src/gtk/nautilusgtkplacesview.c
47+++ b/src/gtk/nautilusgtkplacesview.c
48@@ -401,6 +401,9 @@ nautilus_gtk_places_view_destroy (GtkWidget *widget)
49 if (priv->network_monitor)
50 g_signal_handlers_disconnect_by_func (priv->network_monitor, update_places, widget);
51
52+ if (priv->server_list_monitor)
53+ g_signal_handlers_disconnect_by_func (priv->server_list_monitor, server_file_changed_cb, widget);
54+
55 g_cancellable_cancel (priv->cancellable);
56 g_cancellable_cancel (priv->networks_fetching_cancellable);
57
diff --git a/debian/patches/ubuntu_backspace_behaviour.patch b/debian/patches/ubuntu_backspace_behaviour.patch
index 097c06f..25573ce 100644
--- a/debian/patches/ubuntu_backspace_behaviour.patch
+++ b/debian/patches/ubuntu_backspace_behaviour.patch
@@ -1,17 +1,17 @@
1From b97f085565bac06d90a8577c3e3b9c2969ab3456 Mon Sep 17 00:00:00 20011From: =?utf-8?q?Sebastien_No=C3=ABl?= <sebastien@twolife.be>
2From: Sebastien Noël <sebastien@twolife.be>
3Date: Tue, 28 Jan 2014 19:08:31 +00002Date: Tue, 28 Jan 2014 19:08:31 +0000
4Subject: Restore backspace for going to parent folder3Subject: Restore backspace for going to parent folder
54
6This restores the behaviour from nautilus <= 3.4.5This restores the behaviour from nautilus <= 3.4.
7---6---
8---7 src/nautilus-window.c | 2 ++
9 src/nautilus-window.c | 2 ++
10 1 file changed, 2 insertions(+)8 1 file changed, 2 insertions(+)
119
10diff --git a/src/nautilus-window.c b/src/nautilus-window.c
11index 0bff4e0..d355e1e 100644
12--- a/src/nautilus-window.c12--- a/src/nautilus-window.c
13+++ b/src/nautilus-window.c13+++ b/src/nautilus-window.c
14@@ -2291,6 +2291,7 @@ const GActionEntry win_entries[] =14@@ -2244,6 +2244,7 @@ const GActionEntry win_entries[] =
15 {15 {
16 { "back", action_back },16 { "back", action_back },
17 { "forward", action_forward },17 { "forward", action_forward },
@@ -19,9 +19,9 @@ This restores the behaviour from nautilus <= 3.4.
19 { "up", action_up },19 { "up", action_up },
20 { "view-menu", action_toggle_state_view_button, NULL, "false", NULL },20 { "view-menu", action_toggle_state_view_button, NULL, "false", NULL },
21 { "reload", action_reload },21 { "reload", action_reload },
22@@ -2359,6 +2360,7 @@ nautilus_window_initialize_actions (Naut22@@ -2319,6 +2320,7 @@ nautilus_window_initialize_actions (NautilusWindow *window)
23 nautilus_application_set_accelerator (app, "win.prompt-root-location", "slash");23 /* Support keyboard layouts which have a dead tilde key but not a tilde key. */
24 nautilus_application_set_accelerator (app, "win.prompt-home-location", "asciitilde");24 nautilus_application_set_accelerators (app, "win.prompt-home-location", prompt_home_location_accels);
25 nautilus_application_set_accelerator (app, "win.view-menu", "F10");25 nautilus_application_set_accelerator (app, "win.view-menu", "F10");
26+ nautilus_application_set_accelerator (app, "win.backspaceup", "BackSpace");26+ nautilus_application_set_accelerator (app, "win.backspaceup", "BackSpace");
27 nautilus_application_set_accelerator (app, "win.restore-tab", "<shift><control>t");27 nautilus_application_set_accelerator (app, "win.restore-tab", "<shift><control>t");
diff --git a/debian/patches/ubuntu_infobars_color.patch b/debian/patches/ubuntu_infobars_color.patch
index 6cb9cbe..edbbe7f 100644
--- a/debian/patches/ubuntu_infobars_color.patch
+++ b/debian/patches/ubuntu_infobars_color.patch
@@ -1,15 +1,20 @@
1Description: set the infobars type to "other" rather than "question"1From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
2 to avoid blue cluebars2Date: Fri, 20 Jul 2018 03:25:37 +0200
3Subject: set the infobars type to "other" rather than "question"
4
5to avoid blue cluebars
3Bug-Ubuntu: https://launchpad.net/bugs/12590596Bug-Ubuntu: https://launchpad.net/bugs/1259059
4---7---
5 src/nautilus-special-location-bar.c | 2 +-8 src/nautilus-special-location-bar.c | 2 +-
6 src/nautilus-trash-bar.c | 2 +-9 src/nautilus-trash-bar.c | 2 +-
7 src/nautilus-x-content-bar.c | 2 +-10 src/nautilus-x-content-bar.c | 2 +-
8 3 files changed, 3 insertions(+), 3 deletions(-)11 3 files changed, 3 insertions(+), 3 deletions(-)
912
13diff --git a/src/nautilus-special-location-bar.c b/src/nautilus-special-location-bar.c
14index dc10a82..2f9e7b6 100644
10--- a/src/nautilus-special-location-bar.c15--- a/src/nautilus-special-location-bar.c
11+++ b/src/nautilus-special-location-bar.c16+++ b/src/nautilus-special-location-bar.c
12@@ -191,7 +191,7 @@ GtkWidget *17@@ -188,7 +188,7 @@ GtkWidget *
13 nautilus_special_location_bar_new (NautilusSpecialLocation location)18 nautilus_special_location_bar_new (NautilusSpecialLocation location)
14 {19 {
15 return g_object_new (NAUTILUS_TYPE_SPECIAL_LOCATION_BAR,20 return g_object_new (NAUTILUS_TYPE_SPECIAL_LOCATION_BAR,
@@ -18,9 +23,11 @@ Bug-Ubuntu: https://launchpad.net/bugs/1259059
18 "special-location", location,23 "special-location", location,
19 NULL);24 NULL);
20 }25 }
26diff --git a/src/nautilus-trash-bar.c b/src/nautilus-trash-bar.c
27index 798a023..2c2cdeb 100644
21--- a/src/nautilus-trash-bar.c28--- a/src/nautilus-trash-bar.c
22+++ b/src/nautilus-trash-bar.c29+++ b/src/nautilus-trash-bar.c
23@@ -242,6 +242,6 @@ nautilus_trash_bar_new (NautilusFilesVie30@@ -242,6 +242,6 @@ nautilus_trash_bar_new (NautilusFilesView *view)
24 {31 {
25 return g_object_new (NAUTILUS_TYPE_TRASH_BAR,32 return g_object_new (NAUTILUS_TYPE_TRASH_BAR,
26 "view", view,33 "view", view,
@@ -28,9 +35,11 @@ Bug-Ubuntu: https://launchpad.net/bugs/1259059
28+ "message-type", GTK_MESSAGE_OTHER,35+ "message-type", GTK_MESSAGE_OTHER,
29 NULL);36 NULL);
30 }37 }
38diff --git a/src/nautilus-x-content-bar.c b/src/nautilus-x-content-bar.c
39index f37c846..2c41e97 100644
31--- a/src/nautilus-x-content-bar.c40--- a/src/nautilus-x-content-bar.c
32+++ b/src/nautilus-x-content-bar.c41+++ b/src/nautilus-x-content-bar.c
33@@ -345,7 +345,7 @@ nautilus_x_content_bar_new (GMount42@@ -345,7 +345,7 @@ nautilus_x_content_bar_new (GMount *mount,
34 const char * const *x_content_types)43 const char * const *x_content_types)
35 {44 {
36 return g_object_new (NAUTILUS_TYPE_X_CONTENT_BAR,45 return g_object_new (NAUTILUS_TYPE_X_CONTENT_BAR,
diff --git a/debian/patches/ubuntu_revert_no_wallpaper.patch b/debian/patches/ubuntu_revert_no_wallpaper.patch
index ae64e63..8c750ef 100644
--- a/debian/patches/ubuntu_revert_no_wallpaper.patch
+++ b/debian/patches/ubuntu_revert_no_wallpaper.patch
@@ -1,18 +1,19 @@
1From 90625221ec1ef82fe221c3d376d92f40154cae69 Mon Sep 17 00:00:00 2001
2From: Lars Uebernickel <lars.uebernickel@canonical.com>1From: Lars Uebernickel <lars.uebernickel@canonical.com>
3Date: Fri, 30 Oct 2015 10:42:23 +01002Date: Fri, 30 Oct 2015 10:42:23 +0100
4Subject: [PATCH] Restore background drawing3Subject: [PATCH] Restore background drawing
54
6---5---
7 nautilus-desktop/meson.build | 2 6 nautilus-desktop/meson.build | 2 +
8 nautilus-desktop/nautilus-desktop-background.c | 627 ++++++++++++++++++++++++7 nautilus-desktop/nautilus-desktop-background.c | 627 ++++++++++++++++++++++++
9 nautilus-desktop/nautilus-desktop-background.h | 68 ++8 nautilus-desktop/nautilus-desktop-background.h | 68 +++
10 nautilus-desktop/nautilus-desktop-canvas-view.c | 40 -9 nautilus-desktop/nautilus-desktop-canvas-view.c | 40 +-
11 nautilus-desktop/nautilus-desktop-window.c | 12 10 nautilus-desktop/nautilus-desktop-window.c | 12 +
12 5 files changed, 735 insertions(+), 14 deletions(-)11 5 files changed, 735 insertions(+), 14 deletions(-)
13 create mode 100644 nautilus-desktop/nautilus-desktop-background.c12 create mode 100644 nautilus-desktop/nautilus-desktop-background.c
14 create mode 100644 nautilus-desktop/nautilus-desktop-background.h13 create mode 100644 nautilus-desktop/nautilus-desktop-background.h
1514
15diff --git a/nautilus-desktop/meson.build b/nautilus-desktop/meson.build
16index a5e207d..d853982 100644
16--- a/nautilus-desktop/meson.build17--- a/nautilus-desktop/meson.build
17+++ b/nautilus-desktop/meson.build18+++ b/nautilus-desktop/meson.build
18@@ -2,6 +2,8 @@ nautilus_desktop_sources = [19@@ -2,6 +2,8 @@ nautilus_desktop_sources = [
@@ -24,6 +25,9 @@ Subject: [PATCH] Restore background drawing
24 'nautilus-desktop-canvas-view.c',25 'nautilus-desktop-canvas-view.c',
25 'nautilus-desktop-canvas-view.h',26 'nautilus-desktop-canvas-view.h',
26 'nautilus-desktop-canvas-view-container.c',27 'nautilus-desktop-canvas-view-container.c',
28diff --git a/nautilus-desktop/nautilus-desktop-background.c b/nautilus-desktop/nautilus-desktop-background.c
29new file mode 100644
30index 0000000..8d1d174
27--- /dev/null31--- /dev/null
28+++ b/nautilus-desktop/nautilus-desktop-background.c32+++ b/nautilus-desktop/nautilus-desktop-background.c
29@@ -0,0 +1,627 @@33@@ -0,0 +1,627 @@
@@ -654,6 +658,9 @@ Subject: [PATCH] Restore background drawing
654+ "widget", container,658+ "widget", container,
655+ NULL);659+ NULL);
656+}660+}
661diff --git a/nautilus-desktop/nautilus-desktop-background.h b/nautilus-desktop/nautilus-desktop-background.h
662new file mode 100644
663index 0000000..29b342e
657--- /dev/null664--- /dev/null
658+++ b/nautilus-desktop/nautilus-desktop-background.h665+++ b/nautilus-desktop/nautilus-desktop-background.h
659@@ -0,0 +1,68 @@666@@ -0,0 +1,68 @@
@@ -725,6 +732,8 @@ Subject: [PATCH] Restore background drawing
725+};732+};
726+733+
727+#endif /* __NAUTILIUS_DESKTOP_BACKGROUND_H__ */734+#endif /* __NAUTILIUS_DESKTOP_BACKGROUND_H__ */
735diff --git a/nautilus-desktop/nautilus-desktop-canvas-view.c b/nautilus-desktop/nautilus-desktop-canvas-view.c
736index 16a285f..b281a28 100644
728--- a/nautilus-desktop/nautilus-desktop-canvas-view.c737--- a/nautilus-desktop/nautilus-desktop-canvas-view.c
729+++ b/nautilus-desktop/nautilus-desktop-canvas-view.c738+++ b/nautilus-desktop/nautilus-desktop-canvas-view.c
730@@ -26,6 +26,7 @@739@@ -26,6 +26,7 @@
@@ -743,7 +752,7 @@ Subject: [PATCH] Restore background drawing
743 };752 };
744 753
745 static void default_zoom_level_changed (gpointer user_data);754 static void default_zoom_level_changed (gpointer user_data);
746@@ -243,6 +245,23 @@ desktop_canvas_view_property_filter (Gdk755@@ -243,6 +245,23 @@ desktop_canvas_view_property_filter (GdkXEvent *gdk_xevent,
747 return GDK_FILTER_CONTINUE;756 return GDK_FILTER_CONTINUE;
748 }757 }
749 758
@@ -767,7 +776,7 @@ Subject: [PATCH] Restore background drawing
767 static guint776 static guint
768 real_get_id (NautilusFilesView *view)777 real_get_id (NautilusFilesView *view)
769 {778 {
770@@ -266,6 +285,12 @@ nautilus_desktop_canvas_view_dispose (GO779@@ -266,6 +285,12 @@ nautilus_desktop_canvas_view_dispose (GObject *object)
771 nautilus_files_view_update_context_menus,780 nautilus_files_view_update_context_menus,
772 canvas_view);781 canvas_view);
773 782
@@ -780,7 +789,7 @@ Subject: [PATCH] Restore background drawing
780 G_OBJECT_CLASS (nautilus_desktop_canvas_view_parent_class)->dispose (object);789 G_OBJECT_CLASS (nautilus_desktop_canvas_view_parent_class)->dispose (object);
781 }790 }
782 791
783@@ -328,6 +353,7 @@ nautilus_desktop_canvas_view_class_init792@@ -328,6 +353,7 @@ nautilus_desktop_canvas_view_class_init (NautilusDesktopCanvasViewClass *class)
784 793
785 canvas_class->create_canvas_container = real_create_canvas_container;794 canvas_class->create_canvas_container = real_create_canvas_container;
786 795
@@ -788,7 +797,7 @@ Subject: [PATCH] Restore background drawing
788 vclass->update_context_menus = real_update_context_menus;797 vclass->update_context_menus = real_update_context_menus;
789 vclass->get_view_id = real_get_id;798 vclass->get_view_id = real_get_id;
790 vclass->end_loading = nautilus_desktop_canvas_view_end_loading;799 vclass->end_loading = nautilus_desktop_canvas_view_end_loading;
791@@ -374,17 +400,6 @@ realized_callback (GtkWidget800@@ -374,17 +400,6 @@ realized_callback (GtkWidget *widget,
792 desktop_canvas_view);801 desktop_canvas_view);
793 }802 }
794 803
@@ -806,7 +815,7 @@ Subject: [PATCH] Restore background drawing
806 static NautilusCanvasZoomLevel815 static NautilusCanvasZoomLevel
807 get_default_zoom_level (void)816 get_default_zoom_level (void)
808 {817 {
809@@ -737,9 +752,6 @@ nautilus_desktop_canvas_view_init (Nauti818@@ -737,9 +752,6 @@ nautilus_desktop_canvas_view_init (NautilusDesktopCanvasView *desktop_canvas_vie
810 nautilus_files_view_set_show_foreign (NAUTILUS_FILES_VIEW (desktop_canvas_view),819 nautilus_files_view_set_show_foreign (NAUTILUS_FILES_VIEW (desktop_canvas_view),
811 FALSE);820 FALSE);
812 821
@@ -816,6 +825,8 @@ Subject: [PATCH] Restore background drawing
816 g_signal_connect_object (desktop_canvas_view, "realize",825 g_signal_connect_object (desktop_canvas_view, "realize",
817 G_CALLBACK (realized_callback), desktop_canvas_view, 0);826 G_CALLBACK (realized_callback), desktop_canvas_view, 0);
818 g_signal_connect_object (desktop_canvas_view, "unrealize",827 g_signal_connect_object (desktop_canvas_view, "unrealize",
828diff --git a/nautilus-desktop/nautilus-desktop-window.c b/nautilus-desktop/nautilus-desktop-window.c
829index f35c849..cc557c8 100644
819--- a/nautilus-desktop/nautilus-desktop-window.c830--- a/nautilus-desktop/nautilus-desktop-window.c
820+++ b/nautilus-desktop/nautilus-desktop-window.c831+++ b/nautilus-desktop/nautilus-desktop-window.c
821@@ -44,6 +44,7 @@832@@ -44,6 +44,7 @@
diff --git a/debian/patches/ubuntu_sync_background_to_accountsservice.patch b/debian/patches/ubuntu_sync_background_to_accountsservice.patch
index 9953d85..56e6b5e 100644
--- a/debian/patches/ubuntu_sync_background_to_accountsservice.patch
+++ b/debian/patches/ubuntu_sync_background_to_accountsservice.patch
@@ -1,14 +1,19 @@
1Description: Sync chosen background filename to accountsservice1From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
2 used in lightdm by unity-greeter2Date: Fri, 20 Jul 2018 03:25:37 +0200
3Subject: Sync chosen background filename to accountsservice
4
5used in lightdm by unity-greeter
3Bug: https://launchpad.net/bugs/11284926Bug: https://launchpad.net/bugs/1128492
4Bug: https://launchpad.net/bugs/9285537Bug: https://launchpad.net/bugs/928553
5---8---
6 nautilus-desktop/nautilus-desktop-background.c | 81 +++++++++++++++++++++++++9 nautilus-desktop/nautilus-desktop-background.c | 81 ++++++++++++++++++++++++++
7 1 file changed, 81 insertions(+)10 1 file changed, 81 insertions(+)
811
12diff --git a/nautilus-desktop/nautilus-desktop-background.c b/nautilus-desktop/nautilus-desktop-background.c
13index 8d1d174..1f0668b 100644
9--- a/nautilus-desktop/nautilus-desktop-background.c14--- a/nautilus-desktop/nautilus-desktop-background.c
10+++ b/nautilus-desktop/nautilus-desktop-background.c15+++ b/nautilus-desktop/nautilus-desktop-background.c
11@@ -75,6 +75,85 @@ struct NautilusDesktopBackgroundDetails16@@ -75,6 +75,85 @@ struct NautilusDesktopBackgroundDetails {
12 };17 };
13 18
14 19
@@ -94,7 +99,7 @@ Bug: https://launchpad.net/bugs/928553
94 static gboolean99 static gboolean
95 background_settings_change_event_cb (GSettings *settings,100 background_settings_change_event_cb (GSettings *settings,
96 gpointer keys,101 gpointer keys,
97@@ -460,6 +539,8 @@ background_change_event_idle_cb (Nautilu102@@ -460,6 +539,8 @@ background_change_event_idle_cb (NautilusDesktopBackground *self)
98 gnome_bg_load_from_preferences (self->details->bg,103 gnome_bg_load_from_preferences (self->details->bg,
99 gnome_background_preferences);104 gnome_background_preferences);
100 105
diff --git a/debian/patches/zg_activity_logging.patch b/debian/patches/zg_activity_logging.patch
index c0ac76a..c713a3f 100644
--- a/debian/patches/zg_activity_logging.patch
+++ b/debian/patches/zg_activity_logging.patch
@@ -1,22 +1,23 @@
1From 7ebf2ec608b69d4e3f8cb39d8c55af7f32744c74 Mon Sep 17 00:00:00 2001
2From: Rico Tzschichholz <ricotz@ubuntu.com>1From: Rico Tzschichholz <ricotz@ubuntu.com>
3Date: Wed, 2 Dec 2015 15:31:19 +01002Date: Wed, 2 Dec 2015 15:31:19 +0100
4Subject: [PATCH] Add zeitgeist activity logging3Subject: [PATCH] Add zeitgeist activity logging
54
6---5---
7 meson.build | 2 6 meson.build | 2 +
8 src/nautilus-file-operations.c | 198 +++++++++++++++++++++++7 src/nautilus-file-operations.c | 198 ++++++++++++++++++++++++
9 src/nautilus-file.c | 26 +++8 src/nautilus-file.c | 26 ++++
10 test/meson.build | 5 9 test/meson.build | 5 +
11 test/run-zeitgeist-test.sh | 50 +++++10 test/run-zeitgeist-test.sh | 50 ++++++
12 test/test-nautilus-zeitgeist.c | 343 +++++++++++++++++++++++++++++++++++++++++11 test/test-nautilus-zeitgeist.c | 343 +++++++++++++++++++++++++++++++++++++++++
13 6 files changed, 624 insertions(+)12 6 files changed, 624 insertions(+)
14 create mode 100755 test/run-zeitgeist-test.sh13 create mode 100644 test/run-zeitgeist-test.sh
15 create mode 100644 test/test-nautilus-zeitgeist.c14 create mode 100644 test/test-nautilus-zeitgeist.c
1615
16diff --git a/meson.build b/meson.build
17index 4d2acf2..21991e9 100644
17--- a/meson.build18--- a/meson.build
18+++ b/meson.build19+++ b/meson.build
19@@ -58,6 +58,8 @@ gio_unix = dependency ('gio-unix-2.0', v20@@ -55,6 +55,8 @@ gio_unix = dependency ('gio-unix-2.0', version: glib_ver)
20 gsettings_desktop_schemas = dependency ('gsettings-desktop-schemas',21 gsettings_desktop_schemas = dependency ('gsettings-desktop-schemas',
21 version: schemas_ver)22 version: schemas_ver)
22 23
@@ -25,6 +26,8 @@ Subject: [PATCH] Add zeitgeist activity logging
25 libm = cc.find_library ('libm')26 libm = cc.find_library ('libm')
26 27
27 conf = configuration_data ()28 conf = configuration_data ()
29diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
30index c641ec5..93ff3fe 100644
28--- a/src/nautilus-file-operations.c31--- a/src/nautilus-file-operations.c
29+++ b/src/nautilus-file-operations.c32+++ b/src/nautilus-file-operations.c
30@@ -61,6 +61,8 @@33@@ -61,6 +61,8 @@
@@ -36,7 +39,7 @@ Subject: [PATCH] Add zeitgeist activity logging
36 /* TODO: TESTING!!! */39 /* TODO: TESTING!!! */
37 40
38 typedef struct41 typedef struct
39@@ -234,6 +236,112 @@ typedef struct42@@ -235,6 +237,112 @@ typedef struct
40 #define MERGE_ALL _("Merge _All")43 #define MERGE_ALL _("Merge _All")
41 #define COPY_FORCE _("Copy _Anyway")44 #define COPY_FORCE _("Copy _Anyway")
42 45
@@ -149,7 +152,7 @@ Subject: [PATCH] Add zeitgeist activity logging
149 static void152 static void
150 mark_desktop_file_executable (CommonJob *common,153 mark_desktop_file_executable (CommonJob *common,
151 GCancellable *cancellable,154 GCancellable *cancellable,
152@@ -2355,6 +2463,37 @@ delete_task_done (GObject *source_o155@@ -2364,6 +2472,37 @@ delete_task_done (GObject *source_object,
153 156
154 job = user_data;157 job = user_data;
155 158
@@ -187,7 +190,7 @@ Subject: [PATCH] Add zeitgeist activity logging
187 g_list_free_full (job->files, g_object_unref);190 g_list_free_full (job->files, g_object_unref);
188 191
189 if (job->done_callback)192 if (job->done_callback)
190@@ -5776,6 +5915,25 @@ copy_task_done (GObject *source_obj193@@ -5698,6 +5837,25 @@ copy_task_done (GObject *source_object,
191 job->done_callback_data);194 job->done_callback_data);
192 }195 }
193 196
@@ -213,7 +216,7 @@ Subject: [PATCH] Add zeitgeist activity logging
213 g_list_free_full (job->files, g_object_unref);216 g_list_free_full (job->files, g_object_unref);
214 if (job->destination)217 if (job->destination)
215 {218 {
216@@ -6422,6 +6580,20 @@ move_task_done (GObject *source_obj219@@ -6394,6 +6552,20 @@ move_task_done (GObject *source_object,
217 job->done_callback_data);220 job->done_callback_data);
218 }221 }
219 222
@@ -234,7 +237,7 @@ Subject: [PATCH] Add zeitgeist activity logging
234 g_list_free_full (job->files, g_object_unref);237 g_list_free_full (job->files, g_object_unref);
235 g_object_unref (job->destination);238 g_object_unref (job->destination);
236 g_hash_table_unref (job->debuting_files);239 g_hash_table_unref (job->debuting_files);
237@@ -6807,6 +6979,25 @@ link_task_done (GObject *source_obj240@@ -6779,6 +6951,25 @@ link_task_done (GObject *source_object,
238 job->done_callback_data);241 job->done_callback_data);
239 }242 }
240 243
@@ -260,7 +263,7 @@ Subject: [PATCH] Add zeitgeist activity logging
260 g_list_free_full (job->files, g_object_unref);263 g_list_free_full (job->files, g_object_unref);
261 g_object_unref (job->destination);264 g_object_unref (job->destination);
262 g_hash_table_unref (job->debuting_files);265 g_hash_table_unref (job->debuting_files);
263@@ -7310,6 +7501,13 @@ create_task_done (GObject *source_o266@@ -7282,6 +7473,13 @@ create_task_done (GObject *source_object,
264 job->done_callback_data);267 job->done_callback_data);
265 }268 }
266 269
@@ -274,19 +277,21 @@ Subject: [PATCH] Add zeitgeist activity logging
274 g_object_unref (job->dest_dir);277 g_object_unref (job->dest_dir);
275 if (job->src)278 if (job->src)
276 {279 {
280diff --git a/src/nautilus-file.c b/src/nautilus-file.c
281index 3a7c9a4..3f6a69f 100644
277--- a/src/nautilus-file.c282--- a/src/nautilus-file.c
278+++ b/src/nautilus-file.c283+++ b/src/nautilus-file.c
279@@ -85,6 +85,9 @@284@@ -87,6 +87,9 @@
280 285
281 #define MEGA_TO_BASE_RATE 1048576286 #define MEGA_TO_BASE_RATE 1048576
282287
283+#include <zeitgeist.h>288+#include <zeitgeist.h>
284+#define ZEITGEIST_NAUTILUS_ACTOR "application://nautilus.desktop"289+#define ZEITGEIST_NAUTILUS_ACTOR "application://nautilus.desktop"
285+290+
286 /* Files that start with these characters sort after files that don't. */291 /* Files that start with these characters sort after files that don't. */
287 #define SORT_LAST_CHAR1 '.'292 #define SORT_LAST_CHAR1 '.'
288 #define SORT_LAST_CHAR2 '#'293 #define SORT_LAST_CHAR2 '#'
289@@ -1980,6 +1983,29 @@ rename_get_info_callback (GObject *294@@ -1992,6 +1995,29 @@ rename_get_info_callback (GObject *source_object,
290 update_info_and_name (op->file, new_info);295 update_info_and_name (op->file, new_info);
291 296
292 new_uri = nautilus_file_get_uri (op->file);297 new_uri = nautilus_file_get_uri (op->file);
@@ -316,9 +321,11 @@ Subject: [PATCH] Add zeitgeist activity logging
316 nautilus_directory_moved (old_uri, new_uri);321 nautilus_directory_moved (old_uri, new_uri);
317 g_free (new_uri);322 g_free (new_uri);
318 g_free (old_uri);323 g_free (old_uri);
324diff --git a/test/meson.build b/test/meson.build
325index f6ad5b0..5f8a1ea 100644
319--- a/test/meson.build326--- a/test/meson.build
320+++ b/test/meson.build327+++ b/test/meson.build
321@@ -16,6 +16,10 @@ test_file_utilities_get_common_filename_328@@ -16,6 +16,10 @@ test_file_utilities_get_common_filename_prefix = executable ('test-file-utilitie
322 'test-file-utilities-get-common-filename-prefix.c',329 'test-file-utilities-get-common-filename-prefix.c',
323 dependencies: libnautilus_dep)330 dependencies: libnautilus_dep)
324 331
@@ -329,12 +336,15 @@ Subject: [PATCH] Add zeitgeist activity logging
329 test_eel_string_get_common_prefix = executable ('test-eel-string-get-common-prefix',336 test_eel_string_get_common_prefix = executable ('test-eel-string-get-common-prefix',
330 'test-eel-string-get-common-prefix.c',337 'test-eel-string-get-common-prefix.c',
331 dependencies: libnautilus_dep)338 dependencies: libnautilus_dep)
332@@ -23,4 +27,5 @@ test_eel_string_get_common_prefix = exec339@@ -23,4 +27,5 @@ test_eel_string_get_common_prefix = executable ('test-eel-string-get-common-pref
333 test ('test-nautilus-search-engine', test_nautilus_search_engine)340 test ('test-nautilus-search-engine', test_nautilus_search_engine)
334 test ('test-nautilus-directory-async', test_nautilus_directory_async)341 test ('test-nautilus-directory-async', test_nautilus_directory_async)
335 test ('test-file-utilities-get-common-filename-prefix', test_file_utilities_get_common_filename_prefix)342 test ('test-file-utilities-get-common-filename-prefix', test_file_utilities_get_common_filename_prefix)
336+test ('test-nautilus-zeitgeist', test_nautilus_zeitgeist)343+test ('test-nautilus-zeitgeist', test_nautilus_zeitgeist)
337 test ('test-eel-string-get-common-prefix', test_eel_string_get_common_prefix)344 test ('test-eel-string-get-common-prefix', test_eel_string_get_common_prefix)
345diff --git a/test/run-zeitgeist-test.sh b/test/run-zeitgeist-test.sh
346new file mode 100644
347index 0000000..1f3ab19
338--- /dev/null348--- /dev/null
339+++ b/test/run-zeitgeist-test.sh349+++ b/test/run-zeitgeist-test.sh
340@@ -0,0 +1,50 @@350@@ -0,0 +1,50 @@
@@ -388,6 +398,9 @@ Subject: [PATCH] Add zeitgeist activity logging
388+echo "Cleaning up..."398+echo "Cleaning up..."
389+zeitgeist-daemon --quit399+zeitgeist-daemon --quit
390+rm -r "${TMP_PATH}"400+rm -r "${TMP_PATH}"
401diff --git a/test/test-nautilus-zeitgeist.c b/test/test-nautilus-zeitgeist.c
402new file mode 100644
403index 0000000..b0fea03
391--- /dev/null404--- /dev/null
392+++ b/test/test-nautilus-zeitgeist.c405+++ b/test/test-nautilus-zeitgeist.c
393@@ -0,0 +1,343 @@406@@ -0,0 +1,343 @@
diff --git a/meson.build b/meson.build
index 18e645a..0b8a6f1 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
1project ('nautilus', 'c',1project ('nautilus', 'c',
2 version: '3.26.3',2 version: '3.26.4',
3 meson_version: '>=0.40.0',3 meson_version: '>=0.40.0',
4 license: 'GPL3+')4 license: 'GPL3+')
55
diff --git a/org.gnome.Nautilus.json b/org.gnome.Nautilus.json
6deleted file mode 1006446deleted file mode 100644
index 2ed1cbc..0000000
--- a/org.gnome.Nautilus.json
+++ /dev/null
@@ -1,108 +0,0 @@
1{
2 "app-id": "org.gnome.Nautilus",
3 "runtime": "org.gnome.Platform",
4 "runtime-version": "master",
5 "sdk": "org.gnome.Sdk",
6 "command": "nautilus",
7 "tags": ["devel", "development", "nightly"],
8 "desktop-file-name-prefix": "(Development) ",
9 "finish-args": [
10 "--share=ipc", "--socket=x11",
11 "--socket=wayland",
12 "--talk-name=org.gnome.OnlineAccounts",
13 "--talk-name=org.freedesktop.Tracker1",
14 "--filesystem=home",
15 "--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*",
16 "--filesystem=xdg-run/dconf", "--filesystem=~/.config/dconf:ro",
17 "--talk-name=ca.desrt.dconf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
18 ],
19 "build-options" : {
20 "cflags": "-Wno-deprecated-declarations -Og",
21 "cxxflags": "-Wno-deprecated-declarations -Og"
22 },
23 "cleanup": [ "/include", "/share/bash-completion" ],
24 "modules": [
25 {
26 "name": "libexif",
27 "sources": [
28 {
29 "type": "archive",
30 "url": "https://downloads.sourceforge.net/libexif/libexif-0.6.21.tar.bz2",
31 "sha256": "16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a"
32 },
33 {
34 "type": "shell",
35 "commands": [
36 "cp -f /usr/share/gnu-config/config.sub .",
37 "cp -f /usr/share/gnu-config/config.guess ."
38 ]
39 }
40 ]
41 },
42 {
43 "name": "exempi",
44 "config-opts": [
45 "--disable-unittest"
46 ],
47 "sources": [
48 {
49 "type": "git",
50 "url": "https://anongit.freedesktop.org/git/exempi.git"
51 }
52 ]
53
54 },
55 {
56 "name": "tracker",
57 "cleanup": [ "/bin", "/etc", "/libexec" ],
58 "config-opts": [ "--disable-miner-apps", "--disable-static",
59 "--disable-tracker-extract", "--disable-tracker-needle",
60 "--disable-tracker-preferences", "--disable-artwork",
61 "--disable-tracker-writeback", "--disable-miner-user-guides",
62 "--with-bash-completion-dir=no" ],
63 "sources": [
64 {
65 "type": "git",
66 "url": "https://git.gnome.org/browse/tracker"
67 }
68 ]
69 },
70 {
71 "name": "gnome-desktop",
72 "config-opts": ["--disable-debug-tools", "--disable-udev"],
73 "sources": [
74 {
75 "type": "git",
76 "url": "https://git.gnome.org/browse/gnome-desktop"
77 }
78 ]
79 },
80 {
81 "name": "gnome-autoar",
82 "sources": [
83 {
84 "type": "git",
85 "url": "https://git.gnome.org/browse/gnome-autoar"
86 }
87 ]
88 },
89 {
90 "buildsystem": "meson",
91 "builddir": true,
92 "name": "nautilus",
93 "config-opts": [
94 "-Denable-desktop=false",
95 "-Denable-selinux=false",
96 "-Denable-xmp=true",
97 "-Denable-exif=true",
98 "--libdir=/app/lib"
99 ],
100 "sources": [
101 {
102 "type": "git",
103 "url": "https://gitlab.gnome.org/GNOME/nautilus.git"
104 }
105 ]
106 }
107 ]
108}
diff --git a/po/zh_TW.po b/po/zh_TW.po
index e10497e..60df1bc 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -10,9 +10,8 @@
10msgid ""10msgid ""
11msgstr ""11msgstr ""
12"Project-Id-Version: nautilus 3.1.90\n"12"Project-Id-Version: nautilus 3.1.90\n"
13"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"13"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/nautilus/issues\n"
14"product=nautilus&keywords=I18N+L10N&component=Internationalization (i18n)\n"14"POT-Creation-Date: 2018-01-05 19:22+0000\n"
15"POT-Creation-Date: 2017-09-08 11:04+0000\n"
16"PO-Revision-Date: 2017-09-12 01:44+0800\n"15"PO-Revision-Date: 2017-09-12 01:44+0800\n"
17"Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"16"Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"
18"Language-Team: Chinese(Taiwan) <zh-l10n@lists.linux.org.tw>\n"17"Language-Team: Chinese(Taiwan) <zh-l10n@lists.linux.org.tw>\n"
@@ -694,8 +693,8 @@ msgstr "顯示更多訊息(_D)"
694#. Add buttons693#. Add buttons
695#: eel/eel-stock-dialogs.c:204 src/nautilus-file-conflict-dialog.c:325694#: eel/eel-stock-dialogs.c:204 src/nautilus-file-conflict-dialog.c:325
696#: src/nautilus-file-operations.c:225 src/nautilus-files-view.c:1114695#: src/nautilus-file-operations.c:225 src/nautilus-files-view.c:1114
697#: src/nautilus-files-view.c:1635 src/nautilus-files-view.c:5941696#: src/nautilus-files-view.c:1635 src/nautilus-files-view.c:5947
698#: src/nautilus-files-view.c:6445 src/nautilus-location-entry.c:282697#: src/nautilus-files-view.c:6451 src/nautilus-location-entry.c:282
699#: src/nautilus-mime-actions.c:564 src/nautilus-mime-actions.c:568698#: src/nautilus-mime-actions.c:564 src/nautilus-mime-actions.c:568
700#: src/nautilus-mime-actions.c:650 src/nautilus-mime-actions.c:956699#: src/nautilus-mime-actions.c:650 src/nautilus-mime-actions.c:956
701#: src/nautilus-mime-actions.c:1508 src/nautilus-properties-window.c:4577700#: src/nautilus-mime-actions.c:1508 src/nautilus-properties-window.c:4577
@@ -726,7 +725,7 @@ msgid "Unable to rename desktop icon"
726msgstr "無法重新命名桌面圖示"725msgstr "無法重新命名桌面圖示"
727726
728#: nautilus-desktop/nautilus-desktop-link.c:142 src/nautilus-bookmark.c:116727#: nautilus-desktop/nautilus-desktop-link.c:142 src/nautilus-bookmark.c:116
729#: src/nautilus-file-utilities.c:304 src/nautilus-list-view.c:1739728#: src/nautilus-file-utilities.c:304 src/nautilus-list-view.c:1742
730#: src/nautilus-pathbar.c:449 src/nautilus-shell-search-provider.c:315729#: src/nautilus-pathbar.c:449 src/nautilus-shell-search-provider.c:315
731#: src/nautilus-window.c:193730#: src/nautilus-window.c:193
732msgid "Home"731msgid "Home"
@@ -1015,7 +1014,7 @@ msgstr "重設為預設值(_F)"
1015msgid "Replace the current List Columns settings with the default settings"1014msgid "Replace the current List Columns settings with the default settings"
1016msgstr "使用預設設定值取代目前的清單欄設定值"1015msgstr "使用預設設定值取代目前的清單欄設定值"
10171016
1018#: src/nautilus-column-utilities.c:57 src/nautilus-list-view.c:19861017#: src/nautilus-column-utilities.c:57 src/nautilus-list-view.c:1989
1019#: src/resources/ui/nautilus-rename-file-popover.ui:141018#: src/resources/ui/nautilus-rename-file-popover.ui:14
1020msgid "Name"1019msgid "Name"
1021msgstr "名稱"1020msgstr "名稱"
@@ -1990,7 +1989,7 @@ msgid "Do _not Empty Trash"
1990msgstr "不要清空回收筒(_N)"1989msgstr "不要清空回收筒(_N)"
19911990
1992#. Translators: %s is a file name formatted for display1991#. Translators: %s is a file name formatted for display
1993#: src/nautilus-file-operations.c:2909 src/nautilus-files-view.c:66741992#: src/nautilus-file-operations.c:2909 src/nautilus-files-view.c:6680
1994#, c-format1993#, c-format
1995msgid "Unable to access “%s”"1994msgid "Unable to access “%s”"
1996msgstr "無法存取 「%s」"1995msgstr "無法存取 「%s」"
@@ -2518,8 +2517,8 @@ msgstr "確定(_O)"
2518msgid "Select Items Matching"2517msgid "Select Items Matching"
2519msgstr "選擇項目比對"2518msgstr "選擇項目比對"
25202519
2521#: src/nautilus-files-view.c:1637 src/nautilus-files-view.c:59422520#: src/nautilus-files-view.c:1637 src/nautilus-files-view.c:5948
2522#: src/nautilus-files-view.c:64462521#: src/nautilus-files-view.c:6452
2523msgid "_Select"2522msgid "_Select"
2524msgstr "選擇(_S)"2523msgstr "選擇(_S)"
25252524
@@ -2596,109 +2595,109 @@ msgstr "(%s)"
2596msgid "%s %s, %s %s"2595msgid "%s %s, %s %s"
2597msgstr "%s %s, %s %s"2596msgstr "%s %s, %s %s"
25982597
2599#: src/nautilus-files-view.c:59292598#: src/nautilus-files-view.c:5935
2600msgid "Select Move Destination"2599msgid "Select Move Destination"
2601msgstr "選擇移動的目的地"2600msgstr "選擇移動的目的地"
26022601
2603#: src/nautilus-files-view.c:59332602#: src/nautilus-files-view.c:5939
2604msgid "Select Copy Destination"2603msgid "Select Copy Destination"
2605msgstr "選擇複製的目的地"2604msgstr "選擇複製的目的地"
26062605
2607#: src/nautilus-files-view.c:64422606#: src/nautilus-files-view.c:6448
2608msgid "Select Extract Destination"2607msgid "Select Extract Destination"
2609msgstr "選擇解開的目的地"2608msgstr "選擇解開的目的地"
26102609
2611#. Translators: %s is a file name formatted for display2610#. Translators: %s is a file name formatted for display
2612#: src/nautilus-files-view.c:67022611#: src/nautilus-files-view.c:6708
2613#, c-format2612#, c-format
2614msgid "Unable to remove “%s”"2613msgid "Unable to remove “%s”"
2615msgstr "無法移除「%s」"2614msgstr "無法移除「%s」"
26162615
2617#. Translators: %s is a file name formatted for display2616#. Translators: %s is a file name formatted for display
2618#: src/nautilus-files-view.c:67302617#: src/nautilus-files-view.c:6736
2619#, c-format2618#, c-format
2620msgid "Unable to eject “%s”"2619msgid "Unable to eject “%s”"
2621msgstr "無法退出「%s」"2620msgstr "無法退出「%s」"
26222621
2623#: src/nautilus-files-view.c:67532622#: src/nautilus-files-view.c:6759
2624msgid "Unable to stop drive"2623msgid "Unable to stop drive"
2625msgstr "無法停止裝置"2624msgstr "無法停止裝置"
26262625
2627#. Translators: %s is a file name formatted for display2626#. Translators: %s is a file name formatted for display
2628#: src/nautilus-files-view.c:68652627#: src/nautilus-files-view.c:6871
2629#, c-format2628#, c-format
2630msgid "Unable to start “%s”"2629msgid "Unable to start “%s”"
2631msgstr "無法啟動「%s」"2630msgstr "無法啟動「%s」"
26322631
2633#: src/nautilus-files-view.c:77762632#: src/nautilus-files-view.c:7782
2634#, c-format2633#, c-format
2635msgid "New Folder with Selection (%'d Item)"2634msgid "New Folder with Selection (%'d Item)"
2636msgid_plural "New Folder with Selection (%'d Items)"2635msgid_plural "New Folder with Selection (%'d Items)"
2637msgstr[0] "以選取範圍新增資料夾 (%'d 個項目)"2636msgstr[0] "以選取範圍新增資料夾 (%'d 個項目)"
26382637
2639#: src/nautilus-files-view.c:78362638#: src/nautilus-files-view.c:7842
2640#, c-format2639#, c-format
2641msgid "Open With %s"2640msgid "Open With %s"
2642msgstr "以 %s 開啟"2641msgstr "以 %s 開啟"
26432642
2644#: src/nautilus-files-view.c:78482643#: src/nautilus-files-view.c:7854
2645msgid "Run"2644msgid "Run"
2646msgstr "執行"2645msgstr "執行"
26472646
2648#: src/nautilus-files-view.c:78532647#: src/nautilus-files-view.c:7859
2649msgid "Extract Here"2648msgid "Extract Here"
2650msgstr "在此處解開"2649msgstr "在此處解開"
26512650
2652#: src/nautilus-files-view.c:78542651#: src/nautilus-files-view.c:7860
2653msgid "Extract to…"2652msgid "Extract to…"
2654msgstr "解開到…"2653msgstr "解開到…"
26552654
2656#: src/nautilus-files-view.c:78582655#: src/nautilus-files-view.c:7864
2657msgid "Open"2656msgid "Open"
2658msgstr "開啟"2657msgstr "開啟"
26592658
2660#: src/nautilus-files-view.c:79152659#: src/nautilus-files-view.c:7921
2661#: src/resources/ui/nautilus-files-view-context-menus.ui:1252660#: src/resources/ui/nautilus-files-view-context-menus.ui:125
2662msgid "_Start"2661msgid "_Start"
2663msgstr "開啟(_S)"2662msgstr "開啟(_S)"
26642663
2665#: src/nautilus-files-view.c:7921 src/gtk/nautilusgtkplacesview.c:16852664#: src/nautilus-files-view.c:7927 src/gtk/nautilusgtkplacesview.c:1685
2666msgid "_Connect"2665msgid "_Connect"
2667msgstr "連接(_C)"2666msgstr "連接(_C)"
26682667
2669#: src/nautilus-files-view.c:79272668#: src/nautilus-files-view.c:7933
2670msgid "_Start Multi-disk Drive"2669msgid "_Start Multi-disk Drive"
2671msgstr "開啟多磁碟裝置(_S)"2670msgstr "開啟多磁碟裝置(_S)"
26722671
2673#: src/nautilus-files-view.c:79332672#: src/nautilus-files-view.c:7939
2674msgid "U_nlock Drive"2673msgid "U_nlock Drive"
2675msgstr "解鎖裝置(_N)"2674msgstr "解鎖裝置(_N)"
26762675
2677#: src/nautilus-files-view.c:79532676#: src/nautilus-files-view.c:7959
2678msgid "Stop Drive"2677msgid "Stop Drive"
2679msgstr "停止裝置"2678msgstr "停止裝置"
26802679
2681#: src/nautilus-files-view.c:79592680#: src/nautilus-files-view.c:7965
2682msgid "_Safely Remove Drive"2681msgid "_Safely Remove Drive"
2683msgstr "安全的移除裝置(_S)"2682msgstr "安全的移除裝置(_S)"
26842683
2685#: src/nautilus-files-view.c:7965 src/gtk/nautilusgtkplacesview.c:16752684#: src/nautilus-files-view.c:7971 src/gtk/nautilusgtkplacesview.c:1675
2686msgid "_Disconnect"2685msgid "_Disconnect"
2687msgstr "中斷(_D)"2686msgstr "中斷(_D)"
26882687
2689#: src/nautilus-files-view.c:79712688#: src/nautilus-files-view.c:7977
2690msgid "_Stop Multi-disk Drive"2689msgid "_Stop Multi-disk Drive"
2691msgstr "關閉多磁碟裝置(_S)"2690msgstr "關閉多磁碟裝置(_S)"
26922691
2693#: src/nautilus-files-view.c:79772692#: src/nautilus-files-view.c:7983
2694msgid "_Lock Drive"2693msgid "_Lock Drive"
2695msgstr "鎖定裝置(_L)"2694msgstr "鎖定裝置(_L)"
26962695
2697#: src/nautilus-files-view.c:96602696#: src/nautilus-files-view.c:9666
2698msgid "Content View"2697msgid "Content View"
2699msgstr "內容顯示模式"2698msgstr "內容顯示模式"
27002699
2701#: src/nautilus-files-view.c:96612700#: src/nautilus-files-view.c:9667
2702msgid "View of the current folder"2701msgid "View of the current folder"
2703msgstr "顯示目前的資料夾"2702msgstr "顯示目前的資料夾"
27042703
@@ -3326,18 +3325,18 @@ msgstr "(空的)"
3326msgid "Use Default"3325msgid "Use Default"
3327msgstr "使用預設值"3326msgstr "使用預設值"
33283327
3329#: src/nautilus-list-view.c:21143328#: src/nautilus-list-view.c:2117
3330#: src/resources/ui/nautilus-preferences-window.ui:903329#: src/resources/ui/nautilus-preferences-window.ui:90
3331#: src/resources/ui/nautilus-preferences-window.ui:11623330#: src/resources/ui/nautilus-preferences-window.ui:1162
3332msgid "List View"3331msgid "List View"
3333msgstr "清單檢視"3332msgstr "清單檢視"
33343333
3335#: src/nautilus-list-view.c:30233334#: src/nautilus-list-view.c:3026
3336#, c-format3335#, c-format
3337msgid "%s Visible Columns"3336msgid "%s Visible Columns"
3338msgstr "%s 可視欄位"3337msgstr "%s 可視欄位"
33393338
3340#: src/nautilus-list-view.c:30433339#: src/nautilus-list-view.c:3046
3341msgid "Choose the order of information to appear in this folder:"3340msgid "Choose the order of information to appear in this folder:"
3342msgstr "請選擇這個資料夾顯示資訊的次序:"3341msgstr "請選擇這個資料夾顯示資訊的次序:"
33433342
@@ -3419,7 +3418,7 @@ msgstr "要執行「%s」,還是顯示它的內容?"
3419#: src/nautilus-mime-actions.c:6413418#: src/nautilus-mime-actions.c:641
3420#, c-format3419#, c-format
3421msgid "“%s” is an executable text file."3420msgid "“%s” is an executable text file."
3422msgstr "「%s」不是可執行的文字檔。"3421msgstr "「%s」是可執行的文字檔。"
34233422
3424#: src/nautilus-mime-actions.c:6473423#: src/nautilus-mime-actions.c:647
3425msgid "Run in _Terminal"3424msgid "Run in _Terminal"
@@ -4190,49 +4189,49 @@ msgstr "清空(_E)"
4190msgid "Delete all items in the Trash"4189msgid "Delete all items in the Trash"
4191msgstr "刪除回收筒中的所有項目"4190msgstr "刪除回收筒中的所有項目"
41924191
4193#: src/nautilus-ui-utilities.c:3814192#: src/nautilus-ui-utilities.c:307
4194#, c-format4193#, c-format
4195msgid "Since %d day ago"4194msgid "Since %d day ago"
4196msgid_plural "Since %d days ago"4195msgid_plural "Since %d days ago"
4197msgstr[0] "%d 天前"4196msgstr[0] "%d 天前"
41984197
4199#: src/nautilus-ui-utilities.c:3824198#: src/nautilus-ui-utilities.c:308
4200#, c-format4199#, c-format
4201msgid "%d day ago"4200msgid "%d day ago"
4202msgid_plural "%d days ago"4201msgid_plural "%d days ago"
4203msgstr[0] "%d 天前"4202msgstr[0] "%d 天前"
42044203
4205#: src/nautilus-ui-utilities.c:3884204#: src/nautilus-ui-utilities.c:314
4206#, c-format4205#, c-format
4207msgid "Since last week"4206msgid "Since last week"
4208msgid_plural "Since %d weeks ago"4207msgid_plural "Since %d weeks ago"
4209msgstr[0] "%d 週前"4208msgstr[0] "%d 週前"
42104209
4211#: src/nautilus-ui-utilities.c:3894210#: src/nautilus-ui-utilities.c:315
4212#, c-format4211#, c-format
4213msgid "Last week"4212msgid "Last week"
4214msgid_plural "%d weeks ago"4213msgid_plural "%d weeks ago"
4215msgstr[0] "%d 週前"4214msgstr[0] "%d 週前"
42164215
4217#: src/nautilus-ui-utilities.c:3954216#: src/nautilus-ui-utilities.c:321
4218#, c-format4217#, c-format
4219msgid "Since last month"4218msgid "Since last month"
4220msgid_plural "Since %d months ago"4219msgid_plural "Since %d months ago"
4221msgstr[0] "%d 個月前"4220msgstr[0] "%d 個月前"
42224221
4223#: src/nautilus-ui-utilities.c:3964222#: src/nautilus-ui-utilities.c:322
4224#, c-format4223#, c-format
4225msgid "Last month"4224msgid "Last month"
4226msgid_plural "%d months ago"4225msgid_plural "%d months ago"
4227msgstr[0] "%d 個月前"4226msgstr[0] "%d 個月前"
42284227
4229#: src/nautilus-ui-utilities.c:4014228#: src/nautilus-ui-utilities.c:327
4230#, c-format4229#, c-format
4231msgid "Since last year"4230msgid "Since last year"
4232msgid_plural "Since %d years ago"4231msgid_plural "Since %d years ago"
4233msgstr[0] "%d 年前"4232msgstr[0] "%d 年前"
42344233
4235#: src/nautilus-ui-utilities.c:4024234#: src/nautilus-ui-utilities.c:328
4236#, c-format4235#, c-format
4237msgid "Last year"4236msgid "Last year"
4238msgid_plural "%d years ago"4237msgid_plural "%d years ago"
diff --git a/src/gtk/gtk-code-generator.sh b/src/gtk/gtk-code-generator.sh
index c740053..b30c479 100755
--- a/src/gtk/gtk-code-generator.sh
+++ b/src/gtk/gtk-code-generator.sh
@@ -5,8 +5,8 @@
5# action.5# action.
6# Also remove/add the neccesary bits to make it work inside nautilus6# Also remove/add the neccesary bits to make it work inside nautilus
77
8URL=https://git.gnome.org/browse/gtk+/plain/gtk/8URL=https://gitlab.gnome.org/GNOME/gtk/raw/gtk-3-22/gtk/
9URLUI=https://git.gnome.org/browse/gtk+/plain/gtk/ui/9URLUI=https://gitlab.gnome.org/GNOME/gtk/raw/gtk-3-22/gtk/ui/
10SUFIX=?h=gtk-3-2210SUFIX=?h=gtk-3-22
1111
12# Since comments are not allowed inside the sed line, this is what it will do12# Since comments are not allowed inside the sed line, this is what it will do
diff --git a/src/gtk/nautilusgtkplacesview.c b/src/gtk/nautilusgtkplacesview.c
index de0610e..b72085b 100644
--- a/src/gtk/nautilusgtkplacesview.c
+++ b/src/gtk/nautilusgtkplacesview.c
@@ -401,6 +401,9 @@ nautilus_gtk_places_view_destroy (GtkWidget *widget)
401 if (priv->network_monitor)401 if (priv->network_monitor)
402 g_signal_handlers_disconnect_by_func (priv->network_monitor, update_places, widget);402 g_signal_handlers_disconnect_by_func (priv->network_monitor, update_places, widget);
403403
404 if (priv->server_list_monitor)
405 g_signal_handlers_disconnect_by_func (priv->server_list_monitor, server_file_changed_cb, widget);
406
404 g_cancellable_cancel (priv->cancellable);407 g_cancellable_cancel (priv->cancellable);
405 g_cancellable_cancel (priv->networks_fetching_cancellable);408 g_cancellable_cancel (priv->networks_fetching_cancellable);
406409
@@ -1182,8 +1185,7 @@ update_places (NautilusGtkPlacesView *view)
1182 populate_servers (view);1185 populate_servers (view);
11831186
1184 /* fetch networks and add them asynchronously */1187 /* fetch networks and add them asynchronously */
1185 if (!nautilus_gtk_places_view_get_local_only (view))1188 fetch_networks (view);
1186 fetch_networks (view);
11871189
1188 update_view_mode (view);1190 update_view_mode (view);
1189 /* Check whether we still are in a loading state */1191 /* Check whether we still are in a loading state */
@@ -1405,6 +1407,7 @@ pulse_entry_cb (gpointer user_data)
1405 {1407 {
1406 gtk_entry_set_progress_pulse_step (GTK_ENTRY (priv->address_entry), 0.0);1408 gtk_entry_set_progress_pulse_step (GTK_ENTRY (priv->address_entry), 0.0);
1407 gtk_entry_set_progress_fraction (GTK_ENTRY (priv->address_entry), 0.0);1409 gtk_entry_set_progress_fraction (GTK_ENTRY (priv->address_entry), 0.0);
1410 priv->entry_pulse_timeout_id = 0;
14081411
1409 return G_SOURCE_REMOVE;1412 return G_SOURCE_REMOVE;
1410 }1413 }
@@ -1420,7 +1423,6 @@ unmount_mount (NautilusGtkPlacesView *view,
14201423
1421 priv = nautilus_gtk_places_view_get_instance_private (view);1424 priv = nautilus_gtk_places_view_get_instance_private (view);
1422 toplevel = gtk_widget_get_toplevel (GTK_WIDGET (view));1425 toplevel = gtk_widget_get_toplevel (GTK_WIDGET (view));
1423 operation = gtk_mount_operation_new (GTK_WINDOW (toplevel));
14241426
1425 g_cancellable_cancel (priv->cancellable);1427 g_cancellable_cancel (priv->cancellable);
1426 g_clear_object (&priv->cancellable);1428 g_clear_object (&priv->cancellable);
@@ -1898,10 +1900,45 @@ on_listbox_row_activated (NautilusGtkPlacesView *view,
1898 GtkWidget *listbox)1900 GtkWidget *listbox)
1899{1901{
1900 NautilusGtkPlacesViewPrivate *priv;1902 NautilusGtkPlacesViewPrivate *priv;
1903 GdkEvent *event;
1904 guint button;
1905 GtkPlacesOpenFlags open_flags;
19011906
1902 priv = nautilus_gtk_places_view_get_instance_private (view);1907 priv = nautilus_gtk_places_view_get_instance_private (view);
19031908
1904 activate_row (view, row, priv->current_open_flags);1909 event = gtk_get_current_event ();
1910 gdk_event_get_button (event, &button);
1911
1912 if (gdk_event_get_event_type (event) == GDK_BUTTON_RELEASE && button == GDK_BUTTON_MIDDLE)
1913 open_flags = GTK_PLACES_OPEN_NEW_TAB;
1914 else
1915 open_flags = priv->current_open_flags;
1916
1917 activate_row (view, row, open_flags);
1918}
1919
1920static gboolean
1921is_mount_locally_accessible (GMount *mount)
1922{
1923 GFile *base_file;
1924 gchar *path;
1925
1926 if (mount == NULL)
1927 return FALSE;
1928
1929 base_file = g_mount_get_root (mount);
1930
1931 if (base_file == NULL)
1932 return FALSE;
1933
1934 path = g_file_get_path (base_file);
1935 g_object_unref (base_file);
1936
1937 if (path == NULL)
1938 return FALSE;
1939
1940 g_free (path);
1941 return TRUE;
1905}1942}
19061943
1907static gboolean1944static gboolean
@@ -1911,6 +1948,7 @@ listbox_filter_func (GtkListBoxRow *row,
1911 NautilusGtkPlacesViewPrivate *priv;1948 NautilusGtkPlacesViewPrivate *priv;
1912 gboolean is_network;1949 gboolean is_network;
1913 gboolean is_placeholder;1950 gboolean is_placeholder;
1951 gboolean is_local = FALSE;
1914 gboolean retval;1952 gboolean retval;
1915 gboolean searching;1953 gboolean searching;
1916 gchar *name;1954 gchar *name;
@@ -1923,7 +1961,20 @@ listbox_filter_func (GtkListBoxRow *row,
1923 is_network = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "is-network"));1961 is_network = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "is-network"));
1924 is_placeholder = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "is-placeholder"));1962 is_placeholder = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "is-placeholder"));
19251963
1926 if (is_network && priv->local_only)1964 if (NAUTILUS_IS_GTK_PLACES_VIEW_ROW (row))
1965 {
1966 NautilusGtkPlacesViewRow *placesviewrow;
1967 GMount *mount;
1968
1969 placesviewrow = NAUTILUS_GTK_PLACES_VIEW_ROW (row);
1970 g_object_get(G_OBJECT (placesviewrow), "mount", &mount, NULL);
1971
1972 is_local = is_mount_locally_accessible (mount);
1973
1974 g_clear_object (&mount);
1975 }
1976
1977 if (is_network && priv->local_only && !is_local)
1927 return FALSE;1978 return FALSE;
19281979
1929 if (is_placeholder && searching)1980 if (is_placeholder && searching)
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 98e6f35..3ccbf54 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -159,7 +159,7 @@ check_required_directories (NautilusApplication *self)
159 GString *directories_as_string;159 GString *directories_as_string;
160 GSList *l;160 GSList *l;
161 char *error_string;161 char *error_string;
162 const char *detail_string;162 g_autofree char *detail_string = NULL;
163 GtkDialog *dialog;163 GtkDialog *dialog;
164164
165 ret = FALSE;165 ret = FALSE;
diff --git a/src/nautilus-canvas-container.c b/src/nautilus-canvas-container.c
index b85a2ad..fa28051 100644
--- a/src/nautilus-canvas-container.c
+++ b/src/nautilus-canvas-container.c
@@ -6965,6 +6965,7 @@ nautilus_canvas_container_add (NautilusCanvasContainer *container,
6965void6965void
6966nautilus_canvas_container_layout_now (NautilusCanvasContainer *container)6966nautilus_canvas_container_layout_now (NautilusCanvasContainer *container)
6967{6967{
6968 container->details->in_layout_now = TRUE;
6968 if (container->details->idle_id != 0)6969 if (container->details->idle_id != 0)
6969 {6970 {
6970 unschedule_redo_layout (container);6971 unschedule_redo_layout (container);
@@ -6975,6 +6976,7 @@ nautilus_canvas_container_layout_now (NautilusCanvasContainer *container)
6975 * newly added files may trigger a change in the size allocation and6976 * newly added files may trigger a change in the size allocation and
6976 * thus toggle scrollbars on */6977 * thus toggle scrollbars on */
6977 gtk_container_check_resize (GTK_CONTAINER (gtk_widget_get_parent (GTK_WIDGET (container))));6978 gtk_container_check_resize (GTK_CONTAINER (gtk_widget_get_parent (GTK_WIDGET (container))));
6979 container->details->in_layout_now = FALSE;
6978}6980}
69796981
6980/**6982/**
@@ -8241,6 +8243,10 @@ nautilus_canvas_container_accessible_icon_added_cb (NautilusCanvasContainer *con
8241 AtkObject *atk_parent;8243 AtkObject *atk_parent;
8242 AtkObject *atk_child;8244 AtkObject *atk_child;
82438245
8246 /* We don't want to emit children_changed signals during the initial load. */
8247 if (!container->details->in_layout_now)
8248 return;
8249
8244 icon = g_hash_table_lookup (container->details->icon_set, icon_data);8250 icon = g_hash_table_lookup (container->details->icon_set, icon_data);
8245 if (icon)8251 if (icon)
8246 {8252 {
diff --git a/src/nautilus-canvas-item.c b/src/nautilus-canvas-item.c
index 9767200..d1c7817 100644
--- a/src/nautilus-canvas-item.c
+++ b/src/nautilus-canvas-item.c
@@ -286,6 +286,7 @@ nautilus_canvas_item_set_property (GObject *object,
286 NautilusCanvasItem *item;286 NautilusCanvasItem *item;
287 NautilusCanvasItemDetails *details;287 NautilusCanvasItemDetails *details;
288 AtkObject *accessible;288 AtkObject *accessible;
289 gboolean is_rename;
289290
290 item = NAUTILUS_CANVAS_ITEM (object);291 item = NAUTILUS_CANVAS_ITEM (object);
291 accessible = atk_gobject_accessible_for_object (G_OBJECT (item));292 accessible = atk_gobject_accessible_for_object (G_OBJECT (item));
@@ -301,13 +302,15 @@ nautilus_canvas_item_set_property (GObject *object,
301 return;302 return;
302 }303 }
303304
305 is_rename = details->editable_text != NULL;
304 g_free (details->editable_text);306 g_free (details->editable_text);
305 details->editable_text = g_strdup (g_value_get_string (value));307 details->editable_text = g_strdup (g_value_get_string (value));
306 if (details->text_util)308 if (details->text_util)
307 {309 {
308 gail_text_util_text_setup (details->text_util,310 gail_text_util_text_setup (details->text_util,
309 details->editable_text);311 details->editable_text);
310 g_object_notify (G_OBJECT (accessible), "accessible-name");312 if (is_rename)
313 g_object_notify (G_OBJECT (accessible), "accessible-name");
311 }314 }
312315
313 nautilus_canvas_item_invalidate_label_size (item);316 nautilus_canvas_item_invalidate_label_size (item);
diff --git a/src/nautilus-canvas-private.h b/src/nautilus-canvas-private.h
index 0f3ad70..0a114ba 100644
--- a/src/nautilus-canvas-private.h
+++ b/src/nautilus-canvas-private.h
@@ -235,6 +235,7 @@ struct NautilusCanvasContainerDetails {
235 guint a11y_item_action_idle_handler;235 guint a11y_item_action_idle_handler;
236 GQueue* a11y_item_action_queue;236 GQueue* a11y_item_action_queue;
237237
238 eel_boolean_bit in_layout_now : 1;
238 eel_boolean_bit is_loading : 1;239 eel_boolean_bit is_loading : 1;
239 eel_boolean_bit needs_resort : 1;240 eel_boolean_bit needs_resort : 1;
240 eel_boolean_bit selection_needs_resort : 1;241 eel_boolean_bit selection_needs_resort : 1;
diff --git a/src/nautilus-directory.c b/src/nautilus-directory.c
index ad3bb03..19316e8 100644
--- a/src/nautilus-directory.c
+++ b/src/nautilus-directory.c
@@ -66,10 +66,14 @@ static void set_directory_location (NautilusDirectory *directory,
66G_DEFINE_TYPE (NautilusDirectory, nautilus_directory, G_TYPE_OBJECT);66G_DEFINE_TYPE (NautilusDirectory, nautilus_directory, G_TYPE_OBJECT);
6767
68static gboolean68static gboolean
69real_contains_file (NautilusDirectory *directory,69real_contains_file (NautilusDirectory *self,
70 NautilusFile *file)70 NautilusFile *file)
71{71{
72 return file->details->directory == directory;72 NautilusDirectory *directory;
73
74 directory = nautilus_file_get_directory (file);
75
76 return directory == self;
73}77}
7478
75static gboolean79static gboolean
@@ -1089,7 +1093,7 @@ call_files_added_free_list (gpointer key,
1089}1093}
10901094
1091static void1095static void
1092call_files_changed_common (NautilusDirectory *directory,1096call_files_changed_common (NautilusDirectory *self,
1093 GList *file_list)1097 GList *file_list)
1094{1098{
1095 GList *node;1099 GList *node;
@@ -1097,15 +1101,18 @@ call_files_changed_common (NautilusDirectory *directory,
10971101
1098 for (node = file_list; node != NULL; node = node->next)1102 for (node = file_list; node != NULL; node = node->next)
1099 {1103 {
1104 NautilusDirectory *directory;
1105
1100 file = node->data;1106 file = node->data;
1101 if (file->details->directory == directory)1107 directory = nautilus_file_get_directory (file);
1108
1109 if (directory == self)
1102 {1110 {
1103 nautilus_directory_add_file_to_work_queue (directory,1111 nautilus_directory_add_file_to_work_queue (self, file);
1104 file);
1105 }1112 }
1106 }1113 }
1107 nautilus_directory_async_state_changed (directory);1114 nautilus_directory_async_state_changed (self);
1108 nautilus_directory_emit_change_signals (directory, file_list);1115 nautilus_directory_emit_change_signals (self, file_list);
1109}1116}
11101117
1111static void1118static void
@@ -1292,6 +1299,10 @@ nautilus_directory_notify_files_changed (GList *files)
1292 file = nautilus_file_get_existing (location);1299 file = nautilus_file_get_existing (location);
1293 if (file != NULL)1300 if (file != NULL)
1294 {1301 {
1302 NautilusDirectory *directory;
1303
1304 directory = nautilus_file_get_directory (file);
1305
1295 /* Tell it to re-get info now, and later emit1306 /* Tell it to re-get info now, and later emit
1296 * a changed signal.1307 * a changed signal.
1297 */1308 */
@@ -1299,9 +1310,7 @@ nautilus_directory_notify_files_changed (GList *files)
1299 file->details->link_info_is_up_to_date = FALSE;1310 file->details->link_info_is_up_to_date = FALSE;
1300 nautilus_file_invalidate_extension_info_internal (file);1311 nautilus_file_invalidate_extension_info_internal (file);
13011312
1302 hash_table_list_prepend (changed_lists,1313 hash_table_list_prepend (changed_lists, directory, file);
1303 file->details->directory,
1304 file);
1305 }1314 }
1306 }1315 }
13071316
@@ -1343,11 +1352,14 @@ nautilus_directory_notify_files_removed (GList *files)
1343 file = nautilus_file_get_existing (location);1352 file = nautilus_file_get_existing (location);
1344 if (file != NULL && !nautilus_file_rename_in_progress (file))1353 if (file != NULL && !nautilus_file_rename_in_progress (file))
1345 {1354 {
1355 NautilusDirectory *directory;
1356
1357 directory = nautilus_file_get_directory (file);
1358
1346 /* Mark it gone and prepare to send the changed signal. */1359 /* Mark it gone and prepare to send the changed signal. */
1347 nautilus_file_mark_gone (file);1360 nautilus_file_mark_gone (file);
1348 hash_table_list_prepend (changed_lists,1361 hash_table_list_prepend (changed_lists,
1349 file->details->directory,1362 directory, nautilus_file_ref (file));
1350 nautilus_file_ref (file));
1351 }1363 }
1352 nautilus_file_unref (file);1364 nautilus_file_unref (file);
1353 }1365 }
@@ -1505,10 +1517,12 @@ nautilus_directory_moved (const char *old_uri,
1505 list = nautilus_directory_moved_internal (old_location, new_location);1517 list = nautilus_directory_moved_internal (old_location, new_location);
1506 for (node = list; node != NULL; node = node->next)1518 for (node = list; node != NULL; node = node->next)
1507 {1519 {
1520 NautilusDirectory *directory;
1521
1508 file = NAUTILUS_FILE (node->data);1522 file = NAUTILUS_FILE (node->data);
1509 hash_table_list_prepend (hash,1523 directory = nautilus_file_get_directory (file);
1510 file->details->directory,1524
1511 nautilus_file_ref (file));1525 hash_table_list_prepend (hash, directory, nautilus_file_ref (file));
1512 }1526 }
1513 nautilus_file_list_free (list);1527 nautilus_file_list_free (list);
15141528
@@ -1554,14 +1568,14 @@ nautilus_directory_notify_files_moved (GList *file_pairs)
1554 file = nautilus_file_get_existing (to_location);1568 file = nautilus_file_get_existing (to_location);
1555 if (file != NULL)1569 if (file != NULL)
1556 {1570 {
1571 NautilusDirectory *directory;
1572
1573 directory = nautilus_file_get_directory (file);
1574
1557 /* Mark it gone and prepare to send the changed signal. */1575 /* Mark it gone and prepare to send the changed signal. */
1558 nautilus_file_mark_gone (file);1576 nautilus_file_mark_gone (file);
1559 new_directory = file->details->directory;1577 hash_table_list_prepend (changed_lists, directory, file);
1560 hash_table_list_prepend (changed_lists,1578 collect_parent_directories (parent_directories, directory);
1561 new_directory,
1562 file);
1563 collect_parent_directories (parent_directories,
1564 new_directory);
1565 }1579 }
15661580
1567 /* Update any directory objects that are affected. */1581 /* Update any directory objects that are affected. */
@@ -1569,10 +1583,11 @@ nautilus_directory_notify_files_moved (GList *file_pairs)
1569 to_location);1583 to_location);
1570 for (node = affected_files; node != NULL; node = node->next)1584 for (node = affected_files; node != NULL; node = node->next)
1571 {1585 {
1586 NautilusDirectory *directory;
1587
1572 file = NAUTILUS_FILE (node->data);1588 file = NAUTILUS_FILE (node->data);
1573 hash_table_list_prepend (changed_lists,1589 directory = nautilus_file_get_directory (file);
1574 file->details->directory,1590 hash_table_list_prepend (changed_lists, directory, file);
1575 file);
1576 }1591 }
1577 unref_list = g_list_concat (unref_list, affected_files);1592 unref_list = g_list_concat (unref_list, affected_files);
15781593
@@ -1586,8 +1601,12 @@ nautilus_directory_notify_files_moved (GList *file_pairs)
1586 }1601 }
1587 else1602 else
1588 {1603 {
1604 NautilusDirectory *directory;
1605
1606 directory = nautilus_file_get_directory (file);
1607
1589 /* Handle notification in the old directory. */1608 /* Handle notification in the old directory. */
1590 old_directory = file->details->directory;1609 old_directory = directory;
1591 collect_parent_directories (parent_directories, old_directory);1610 collect_parent_directories (parent_directories, old_directory);
15921611
1593 /* Cancel loading of attributes in the old directory */1612 /* Cancel loading of attributes in the old directory */
diff --git a/src/nautilus-file-private.h b/src/nautilus-file-private.h
index adcfacf..cb2bebb 100644
--- a/src/nautilus-file-private.h
+++ b/src/nautilus-file-private.h
@@ -259,6 +259,8 @@ gboolean nautilus_file_set_display_name (NautilusFile
259 const char *display_name,259 const char *display_name,
260 const char *edit_name,260 const char *edit_name,
261 gboolean custom);261 gboolean custom);
262NautilusDirectory *
263 nautilus_file_get_directory (NautilusFile *file);
262void nautilus_file_set_directory (NautilusFile *file,264void nautilus_file_set_directory (NautilusFile *file,
263 NautilusDirectory *directory);265 NautilusDirectory *directory);
264void nautilus_file_set_mount (NautilusFile *file,266void nautilus_file_set_mount (NautilusFile *file,
diff --git a/src/nautilus-file-utilities.c b/src/nautilus-file-utilities.c
index 30dac56..e79f37b 100644
--- a/src/nautilus-file-utilities.c
+++ b/src/nautilus-file-utilities.c
@@ -623,7 +623,7 @@ nautilus_is_other_locations_directory (GFile *dir)
623GMount *623GMount *
624nautilus_get_mounted_mount_for_root (GFile *location)624nautilus_get_mounted_mount_for_root (GFile *location)
625{625{
626 GVolumeMonitor *volume_monitor;626 g_autoptr (GVolumeMonitor) volume_monitor = NULL;
627 GList *mounts;627 GList *mounts;
628 GList *l;628 GList *l;
629 GMount *mount;629 GMount *mount;
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index fc765be..0ac5398 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -556,6 +556,14 @@ nautilus_file_clear_info (NautilusFile *file)
556 clear_metadata (file);556 clear_metadata (file);
557}557}
558558
559NautilusDirectory *
560nautilus_file_get_directory (NautilusFile *file)
561{
562 g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
563
564 return file->details->directory;
565}
566
559void567void
560nautilus_file_set_directory (NautilusFile *file,568nautilus_file_set_directory (NautilusFile *file,
561 NautilusDirectory *directory)569 NautilusDirectory *directory)
@@ -2164,7 +2172,14 @@ nautilus_file_can_rename_file (NautilusFile *file,
2164 g_error_free (error);2172 g_error_free (error);
2165 return NULL;2173 return NULL;
2166 }2174 }
2167 new_file_name = g_strdup_printf ("%s.desktop", new_name);2175
2176 /* Only append `.desktop` if it doesn't already exist. */
2177 if (g_str_has_suffix (new_name, ".desktop")) {
2178 new_file_name = g_strdup (new_name);
2179 } else {
2180 new_file_name = g_strdup_printf ("%s.desktop", new_name);
2181 }
2182
2168 new_file_name = g_strdelimit (new_file_name, "/", '-');2183 new_file_name = g_strdelimit (new_file_name, "/", '-');
21692184
2170 if (name_is (file, new_file_name))2185 if (name_is (file, new_file_name))
@@ -5496,7 +5511,7 @@ nautilus_thumbnail_is_limited_by_zoom (int size,
54965511
5497 zoom_level = size * scale;5512 zoom_level = size * scale;
54985513
5499 if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_STANDARD)5514 if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_SMALL)
5500 {5515 {
5501 return TRUE;5516 return TRUE;
5502 }5517 }
@@ -8566,10 +8581,31 @@ nautilus_file_emit_changed (NautilusFile *file)
8566 link_files = get_link_files (file);8581 link_files = get_link_files (file);
8567 for (p = link_files; p != NULL; p = p->next)8582 for (p = link_files; p != NULL; p = p->next)
8568 {8583 {
8569 if (p->data != file)8584 /* Looking for directly recursive links. */
8585 GList *link_targets = NULL;
8586 NautilusDirectory *directory;
8587
8588 if (p->data == file)
8570 {8589 {
8571 nautilus_file_changed (NAUTILUS_FILE (p->data));8590 continue;
8572 }8591 }
8592
8593 link_targets = get_link_files (p->data);
8594 directory = nautilus_file_get_directory (p->data);
8595
8596 /* Reiterating (heh) that this will break with more complex cycles.
8597 * Users, stop trying to break things on purpose.
8598 */
8599 if (g_list_find (link_targets, file) != NULL &&
8600 directory == nautilus_file_get_directory (file))
8601 {
8602 g_signal_emit (p->data, signals[CHANGED], 0, p->data);
8603 nautilus_file_list_free (link_targets);
8604 continue;
8605 }
8606
8607 nautilus_file_changed (NAUTILUS_FILE (p->data));
8608 nautilus_file_list_free (link_targets);
8573 }8609 }
8574 nautilus_file_list_free (link_files);8610 nautilus_file_list_free (link_files);
8575}8611}
diff --git a/src/nautilus-file.h b/src/nautilus-file.h
index 3a83bd4..5b319f9 100644
--- a/src/nautilus-file.h
+++ b/src/nautilus-file.h
@@ -149,6 +149,8 @@ NautilusFile * nautilus_file_get_existing_by_uri (const c
149NautilusFile * nautilus_file_ref (NautilusFile *file);149NautilusFile * nautilus_file_ref (NautilusFile *file);
150void nautilus_file_unref (NautilusFile *file);150void nautilus_file_unref (NautilusFile *file);
151151
152G_DEFINE_AUTOPTR_CLEANUP_FUNC (NautilusFile, nautilus_file_unref)
153
152/* Monitor the file. */154/* Monitor the file. */
153void nautilus_file_monitor_add (NautilusFile *file,155void nautilus_file_monitor_add (NautilusFile *file,
154 gconstpointer client,156 gconstpointer client,
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 9b7b9b9..8784f63 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -2047,8 +2047,9 @@ static void
2047nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,2047nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,
2048 gboolean with_selection)2048 gboolean with_selection)
2049{2049{
2050 g_autoptr (NautilusDirectory) containing_directory = NULL;2050 NautilusDirectory *containing_directory;
2051 NautilusFilesViewPrivate *priv;2051 NautilusFilesViewPrivate *priv;
2052 GList *selection;
2052 g_autofree char *uri = NULL;2053 g_autofree char *uri = NULL;
2053 g_autofree char *common_prefix = NULL;2054 g_autofree char *common_prefix = NULL;
20542055
@@ -2062,13 +2063,8 @@ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,
2062 uri = nautilus_files_view_get_backing_uri (view);2063 uri = nautilus_files_view_get_backing_uri (view);
2063 containing_directory = nautilus_directory_get_by_uri (uri);2064 containing_directory = nautilus_directory_get_by_uri (uri);
20642065
2065 if (with_selection)2066 selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
2066 {2067 common_prefix = nautilus_get_common_filename_prefix (selection, MIN_COMMON_FILENAME_PREFIX_LENGTH);
2067 GList *selection;
2068 selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
2069 common_prefix = nautilus_get_common_filename_prefix (selection, MIN_COMMON_FILENAME_PREFIX_LENGTH);
2070 nautilus_file_list_free (selection);
2071 }
20722068
2073 priv->new_folder_controller =2069 priv->new_folder_controller =
2074 nautilus_new_folder_dialog_controller_new (nautilus_files_view_get_containing_window (view),2070 nautilus_new_folder_dialog_controller_new (nautilus_files_view_get_containing_window (view),
@@ -2084,6 +2080,9 @@ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view,
2084 "cancelled",2080 "cancelled",
2085 (GCallback) new_folder_dialog_controller_on_cancelled,2081 (GCallback) new_folder_dialog_controller_on_cancelled,
2086 view);2082 view);
2083
2084 nautilus_file_list_free (selection);
2085 nautilus_directory_unref (containing_directory);
2087}2086}
20882087
2089typedef struct2088typedef struct
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 9c168f9..2a0dfcd 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -592,16 +592,9 @@ button_press_callback (GtkWidget *widget,
592 nautilus_file_unref (file);592 nautilus_file_unref (file);
593 }593 }
594 }594 }
595 else595 else if ((event->button == GDK_BUTTON_PRIMARY || event->button == GDK_BUTTON_SECONDARY))
596 {596 {
597 if ((event->button == 1 || event->button == 3))597 activate_selected_items (view);
598 {
599 activate_selected_items (view);
600 }
601 else if (event->button == 2)
602 {
603 activate_selected_items_alternate (view, NULL, TRUE);
604 }
605 }598 }
606 }599 }
607 else600 else
@@ -695,6 +688,19 @@ button_press_callback (GtkWidget *widget,
695 {688 {
696 do_popup_menu (widget, view, event);689 do_popup_menu (widget, view, event);
697 }690 }
691
692 /* Don't open a new tab if we are in single click mode (this would open 2 tabs),
693 * or if CTRL or SHIFT is pressed.
694 */
695 if (event->button == GDK_BUTTON_MIDDLE &&
696 get_click_policy () != NAUTILUS_CLICK_POLICY_SINGLE &&
697 !button_event_modifies_selection (event))
698 {
699 gtk_tree_selection_unselect_all (selection);
700 gtk_tree_selection_select_path (selection, path);
701
702 activate_selected_items_alternate (view, NULL, TRUE);
703 }
698 }704 }
699705
700 gtk_tree_path_free (path);706 gtk_tree_path_free (path);
diff --git a/src/nautilus-notebook.c b/src/nautilus-notebook.c
index f2b3fbd..6e1db52 100644
--- a/src/nautilus-notebook.c
+++ b/src/nautilus-notebook.c
@@ -88,14 +88,11 @@ find_tab_num_at_pos (NautilusNotebook *notebook,
88 gint abs_x,88 gint abs_x,
89 gint abs_y)89 gint abs_y)
90{90{
91 GtkPositionType tab_pos;
92 int page_num = 0;91 int page_num = 0;
93 GtkNotebook *nb = GTK_NOTEBOOK (notebook);92 GtkNotebook *nb = GTK_NOTEBOOK (notebook);
94 GtkWidget *page;93 GtkWidget *page;
95 GtkAllocation allocation;94 GtkAllocation allocation;
9695
97 tab_pos = gtk_notebook_get_tab_pos (GTK_NOTEBOOK (notebook));
98
99 while ((page = gtk_notebook_get_nth_page (nb, page_num)))96 while ((page = gtk_notebook_get_nth_page (nb, page_num)))
100 {97 {
101 GtkWidget *tab;98 GtkWidget *tab;
@@ -118,15 +115,7 @@ find_tab_num_at_pos (NautilusNotebook *notebook,
118 max_x = x_root + allocation.x + allocation.width;115 max_x = x_root + allocation.x + allocation.width;
119 max_y = y_root + allocation.y + allocation.height;116 max_y = y_root + allocation.y + allocation.height;
120117
121 if (((tab_pos == GTK_POS_TOP)118 if (abs_x <= max_x && abs_y <= max_y)
122 || (tab_pos == GTK_POS_BOTTOM))
123 && (abs_x <= max_x))
124 {
125 return page_num;
126 }
127 else if (((tab_pos == GTK_POS_LEFT)
128 || (tab_pos == GTK_POS_RIGHT))
129 && (abs_y <= max_y))
130 {119 {
131 return page_num;120 return page_num;
132 }121 }
@@ -154,7 +143,7 @@ button_press_cb (NautilusNotebook *notebook,
154 /* consume event, so that we don't pop up the context menu when143 /* consume event, so that we don't pop up the context menu when
155 * the mouse if not over a tab label144 * the mouse if not over a tab label
156 */145 */
157 return TRUE;146 return GDK_EVENT_STOP;
158 }147 }
159148
160 /* switch to the page the mouse is over, but don't consume the event */149 /* switch to the page the mouse is over, but don't consume the event */
@@ -165,11 +154,16 @@ button_press_cb (NautilusNotebook *notebook,
165 {154 {
166 GtkWidget *slot;155 GtkWidget *slot;
167156
157 if (tab_clicked == -1)
158 {
159 return GDK_EVENT_PROPAGATE;
160 }
161
168 slot = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), tab_clicked);162 slot = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), tab_clicked);
169 g_signal_emit (notebook, signals[TAB_CLOSE_REQUEST], 0, slot);163 g_signal_emit (notebook, signals[TAB_CLOSE_REQUEST], 0, slot);
170 }164 }
171165
172 return FALSE;166 return GDK_EVENT_PROPAGATE;
173}167}
174168
175static void169static void
diff --git a/src/nautilus-trash-monitor.c b/src/nautilus-trash-monitor.c
index 97f4874..1e156e1 100644
--- a/src/nautilus-trash-monitor.c
+++ b/src/nautilus-trash-monitor.c
@@ -29,7 +29,7 @@
29#include <gio/gio.h>29#include <gio/gio.h>
30#include <string.h>30#include <string.h>
3131
32#define UPDATE_RATE_SECONDS 532#define UPDATE_RATE_SECONDS 1
3333
34struct NautilusTrashMonitorDetails34struct NautilusTrashMonitorDetails
35{35{
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index a9911ee..7b27244 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -1592,11 +1592,7 @@ handle_regular_file_if_needed (NautilusWindowSlot *self,
1592 if ((parent_file != NULL) &&1592 if ((parent_file != NULL) &&
1593 nautilus_file_get_file_type (file) == G_FILE_TYPE_REGULAR)1593 nautilus_file_get_file_type (file) == G_FILE_TYPE_REGULAR)
1594 {1594 {
1595 if (priv->pending_selection != NULL)1595 g_clear_pointer (&priv->pending_selection, nautilus_file_list_free);
1596 {
1597 nautilus_file_list_free (priv->pending_selection);
1598 }
1599
1600 g_clear_object (&priv->pending_location);1596 g_clear_object (&priv->pending_location);
1601 g_clear_object (&priv->pending_file_to_activate);1597 g_clear_object (&priv->pending_file_to_activate);
1602 g_free (priv->pending_scroll_to);1598 g_free (priv->pending_scroll_to);
@@ -2793,6 +2789,8 @@ nautilus_window_slot_dispose (GObject *object)
27932789
2794 nautilus_window_slot_remove_extra_location_widgets (self);2790 nautilus_window_slot_remove_extra_location_widgets (self);
27952791
2792 nautilus_window_slot_set_active (self, FALSE);
2793
2796 if (priv->content_view)2794 if (priv->content_view)
2797 {2795 {
2798 gtk_widget_destroy (GTK_WIDGET (priv->content_view));2796 gtk_widget_destroy (GTK_WIDGET (priv->content_view));
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 9eaae35..0bff4e0 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -2284,6 +2284,12 @@ nautilus_window_initialize_actions (NautilusWindow *window)
2284 "<ctrl>r",2284 "<ctrl>r",
2285 NULL2285 NULL
2286 };2286 };
2287 const gchar *prompt_home_location_accels[] =
2288 {
2289 "asciitilde",
2290 "dead_tilde",
2291 NULL
2292 };
22872293
2288 g_action_map_add_action_entries (G_ACTION_MAP (window),2294 g_action_map_add_action_entries (G_ACTION_MAP (window),
2289 win_entries, G_N_ELEMENTS (win_entries),2295 win_entries, G_N_ELEMENTS (win_entries),
@@ -2310,7 +2316,8 @@ nautilus_window_initialize_actions (NautilusWindow *window)
2310 nautilus_application_set_accelerator (app, "win.tab-move-left", "<shift><control>Page_Up");2316 nautilus_application_set_accelerator (app, "win.tab-move-left", "<shift><control>Page_Up");
2311 nautilus_application_set_accelerator (app, "win.tab-move-right", "<shift><control>Page_Down");2317 nautilus_application_set_accelerator (app, "win.tab-move-right", "<shift><control>Page_Down");
2312 nautilus_application_set_accelerator (app, "win.prompt-root-location", "slash");2318 nautilus_application_set_accelerator (app, "win.prompt-root-location", "slash");
2313 nautilus_application_set_accelerator (app, "win.prompt-home-location", "asciitilde");2319 /* Support keyboard layouts which have a dead tilde key but not a tilde key. */
2320 nautilus_application_set_accelerators (app, "win.prompt-home-location", prompt_home_location_accels);
2314 nautilus_application_set_accelerator (app, "win.view-menu", "F10");2321 nautilus_application_set_accelerator (app, "win.view-menu", "F10");
2315 nautilus_application_set_accelerator (app, "win.restore-tab", "<shift><control>t");2322 nautilus_application_set_accelerator (app, "win.restore-tab", "<shift><control>t");
23162323

Subscribers

People subscribed via source and target branches