Merge ~3v1n0/ubuntu/+source/nautilus:ubuntu/master-fix-recursive-engines into ~ubuntu-desktop/ubuntu/+source/nautilus:ubuntu/master
- Git
- lp:~3v1n0/ubuntu/+source/nautilus
- ubuntu/master-fix-recursive-engines
- Merge into ubuntu/master
Status: | Superseded |
---|---|
Proposed branch: | ~3v1n0/ubuntu/+source/nautilus:ubuntu/master-fix-recursive-engines |
Merge into: | ~ubuntu-desktop/ubuntu/+source/nautilus:ubuntu/master |
Diff against target: |
1777 lines (+1267/-93) 14 files modified
NEWS (+3/-0) debian/changelog (+17/-1) debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch (+88/-46) debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch (+20/-14) debian/patches/0018-search-engine-add-locate-based-search-engine.patch (+25/-21) 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/nautilusgtkplacesview-show-error-if-volume-is-not-mounted.patch (+45/-0) debian/patches/query-add-recursive-flags-and-use-it-in-search-engines.patch (+977/-0) debian/patches/series (+4/-0) meson.build (+1/-1) src/nautilus-file.c (+1/-1) src/nautilus-files-view.c (+7/-8) src/nautilus-trash-monitor.c (+1/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrea Azzarone (community) | Approve | ||
Sebastien Bacher | Pending | ||
Review via email: mp+349670@code.launchpad.net |
This proposal has been superseded by a proposal from 2018-07-20.
Commit message
* New upstream release: 3.26.3.1
* debian/
debian/
debian/
- Follow nautilus settings to search only in current folder (LP: #1767027).
This doesn't apply to gnome-shell search provider for indexed searches.
* debian/
- Updated to respect upstream requested changes
* debian/
- don't crash if selecting a volume that is not mounted (LP: #1764779)
Description of the change
Andrea Azzarone (azzar1) wrote : | # |
- 2e57e79... by Marco Trevisan (Treviño)
-
debian/changelog: update to reflect new upstream release version
- 9965b64... by Marco Trevisan (Treviño)
-
Update upstream source from tag 'upstream/3.26.3.1'
Upstream version 3.26.3.1
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Ok, I've fixed both... I launched gbp import-orig wrongly, also in this case wasn't needed (just merging with upstream/3.26.3.1 was needed here, as the tag was already provided by debian).
So git-wise all should be fixed now.
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
I also have a bionic branch for this https:/
Amr Ibrahim (amribrahim1987) wrote : | # |
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:/
Revert "nautilus-file: Don't show thumbnails for the first 2 zoom levels"
https:/
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.
Andrea Azzarone (azzar1) wrote : | # |
Looks ok now thanks.
- 88fa3ad... by Marco Trevisan (Treviño)
-
Reverts the reverts introduced in 2.26.3.1 as they are in ubuntu already
Removing these would be a regression from our POV.
Unmerged commits
- 88fa3ad... by Marco Trevisan (Treviño)
-
Reverts the reverts introduced in 2.26.3.1 as they are in ubuntu already
Removing these would be a regression from our POV.
- 7f7269c... by Marco Trevisan (Treviño)
-
recent-
manager- update: Updated to respect upstream requested changes - a814f9a... by Marco Trevisan (Treviño)
-
search-engine: respect settings for recursive search
Follow nautilus settings to search only in current folder.
This doesn't apply to gnome-shell search provider for indexed searches.LP: #1767027
- c78269c... by Marco Trevisan (Treviño)
-
nautilusgtkplac
esview: show error if volume is not mounted LP: #1764779
- 2e57e79... by Marco Trevisan (Treviño)
-
debian/changelog: update to reflect new upstream release version
- 9965b64... by Marco Trevisan (Treviño)
-
Update upstream source from tag 'upstream/3.26.3.1'
Upstream version 3.26.3.1
- 92bfb4c... by Jeremy Bícha
-
New upstream version 3.26.3.1
- 513a3c8... by Display Name
-
release: Prepare for 3.26.3.1
- 945c32d... by Display Name
-
Revert "files-view: Remove new empty folder name suggestion"
This reverts commit c6b6c0c73d84283
d773e1ac40a55bf ffdb31342b. - d62c089... by Display Name
-
Revert "nautilus-file: Don't show thumbnails for the first 2 zoom levels"
This reverts commit 44ba721a18ada41
76ed24cf8bd4479 c062660a16.
Preview Diff
1 | diff --git a/NEWS b/NEWS |
2 | index 94f1bf4..c78d1d1 100644 |
3 | --- a/NEWS |
4 | +++ b/NEWS |
5 | @@ -1,3 +1,6 @@ |
6 | +Major changes in 3.26.3.1: |
7 | +* Revert accidental backports of behavioral and visual changes |
8 | + |
9 | Major changes in 3.26.3: |
10 | * Don’t strip extension from folders in compress dialog (Rahul Verma) |
11 | * Fix items not being focused when selected in list view (António Fernandes) |
12 | diff --git a/debian/changelog b/debian/changelog |
13 | index e8b534a..413520f 100644 |
14 | --- a/debian/changelog |
15 | +++ b/debian/changelog |
16 | @@ -1,9 +1,25 @@ |
17 | -nautilus (1:3.26.3-0ubuntu5) UNRELEASED; urgency=medium |
18 | +nautilus (1:3.26.3.1-0ubuntu1) UNRELEASED; urgency=medium |
19 | |
20 | + [ Sebastien Bacher ] |
21 | * debian/patches/git_middle_tab.patch: |
22 | - don't close the view when middle clicking on an item in the |
23 | "other locations" (lp: #1765776) |
24 | |
25 | + [ Marco Trevisan (Treviño) ] |
26 | + * New upstream release: 3.26.3.1 |
27 | + * debian/patches/query-add-recursive-flags-and-use-it-in-search-engines.patch, |
28 | + debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch, |
29 | + debian/patches/0018-search-engine-add-locate-based-search-engine.patch: |
30 | + - Follow nautilus settings to search only in current folder (LP: #1767027). |
31 | + This doesn't apply to gnome-shell search provider for indexed searches. |
32 | + * debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch: |
33 | + - Updated to respect upstream requested changes |
34 | + * debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mounted.patch: |
35 | + - don't crash if selecting a volume that is not mounted (LP: #1764779) |
36 | + * debian/patches/Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch, |
37 | + debian/patches/Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch: |
38 | + - Reverts the reverts introduced in 2.26.3.1 as they are in ubuntu already |
39 | + |
40 | -- Sebastien Bacher <seb128@ubuntu.com> Mon, 30 Apr 2018 16:12:53 +0200 |
41 | |
42 | nautilus (1:3.26.3-0ubuntu4) bionic; urgency=medium |
43 | 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 |
44 | index 1a4ee1c..0ec13f1 100644 |
45 | --- a/debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch |
46 | +++ b/debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch |
47 | @@ -7,19 +7,19 @@ Using GtkRecent items as search engine source in nautilus |
48 | --- |
49 | src/meson.build | 2 + |
50 | src/nautilus-file.h | 1 + |
51 | - src/nautilus-search-engine-recent.c | 385 ++++++++++++++++++++++++++++++++++++ |
52 | - src/nautilus-search-engine-recent.h | 36 ++++ |
53 | - src/nautilus-search-engine.c | 11 ++ |
54 | - 5 files changed, 435 insertions(+) |
55 | + src/nautilus-search-engine-recent.c | 427 ++++++++++++++++++++++++++++++++++++ |
56 | + src/nautilus-search-engine-recent.h | 36 +++ |
57 | + src/nautilus-search-engine.c | 11 + |
58 | + 5 files changed, 477 insertions(+) |
59 | create mode 100644 src/nautilus-search-engine-recent.c |
60 | create mode 100644 src/nautilus-search-engine-recent.h |
61 | |
62 | diff --git a/src/meson.build b/src/meson.build |
63 | -index a771d12..0ea9165 100644 |
64 | +index 73aafe9..213b35f 100644 |
65 | --- a/src/meson.build |
66 | +++ b/src/meson.build |
67 | -@@ -228,6 +228,8 @@ libnautilus_sources = [ |
68 | - 'nautilus-search-engine.h', |
69 | +@@ -229,6 +229,8 @@ libnautilus_sources = [ |
70 | + 'nautilus-search-engine-private.h', |
71 | 'nautilus-search-engine-model.c', |
72 | 'nautilus-search-engine-model.h', |
73 | + 'nautilus-search-engine-recent.c', |
74 | @@ -28,7 +28,7 @@ index a771d12..0ea9165 100644 |
75 | 'nautilus-search-engine-simple.h', |
76 | 'nautilus-search-hit.c', |
77 | diff --git a/src/nautilus-file.h b/src/nautilus-file.h |
78 | -index 3a83bd4..fd72d7a 100644 |
79 | +index af8c003..20ec6f3 100644 |
80 | --- a/src/nautilus-file.h |
81 | +++ b/src/nautilus-file.h |
82 | @@ -49,6 +49,7 @@ typedef struct NautilusFile NautilusFile; |
83 | @@ -41,10 +41,10 @@ index 3a83bd4..fd72d7a 100644 |
84 | NAUTILUS_FILE_SORT_NONE, |
85 | diff --git a/src/nautilus-search-engine-recent.c b/src/nautilus-search-engine-recent.c |
86 | new file mode 100644 |
87 | -index 0000000..f052e8f |
88 | +index 0000000..bbd0d82 |
89 | --- /dev/null |
90 | +++ b/src/nautilus-search-engine-recent.c |
91 | -@@ -0,0 +1,385 @@ |
92 | +@@ -0,0 +1,427 @@ |
93 | +/* |
94 | + * Copyright (C) 2018 Canonical Ltd |
95 | + * |
96 | @@ -69,6 +69,7 @@ index 0000000..f052e8f |
97 | +#include "nautilus-search-hit.h" |
98 | +#include "nautilus-search-provider.h" |
99 | +#include "nautilus-search-engine-recent.h" |
100 | ++#include "nautilus-search-engine-private.h" |
101 | +#include "nautilus-ui-utilities.h" |
102 | +#define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH |
103 | +#include "nautilus-debug.h" |
104 | @@ -161,6 +162,51 @@ index 0000000..f052e8f |
105 | + return FALSE; |
106 | +} |
107 | + |
108 | ++static gboolean |
109 | ++is_file_valid_recursive (NautilusSearchEngineRecent *self, |
110 | ++ GFile *file, |
111 | ++ GError **error) |
112 | ++{ |
113 | ++ g_autofree gchar *path = NULL; |
114 | ++ g_autoptr (GFileInfo) file_info = NULL; |
115 | ++ |
116 | ++ file_info = g_file_query_info (file, FILE_ATTRIBS, |
117 | ++ G_FILE_QUERY_INFO_NONE, |
118 | ++ self->cancellable, error); |
119 | ++ if (*error != NULL) |
120 | ++ { |
121 | ++ return FALSE; |
122 | ++ } |
123 | ++ |
124 | ++ if (!g_file_info_get_attribute_boolean (file_info, |
125 | ++ G_FILE_ATTRIBUTE_ACCESS_CAN_READ)) |
126 | ++ { |
127 | ++ return FALSE; |
128 | ++ } |
129 | ++ |
130 | ++ path = g_file_get_path (file); |
131 | ++ |
132 | ++ if (!nautilus_query_get_show_hidden_files (self->query)) |
133 | ++ { |
134 | ++ if (!g_file_info_get_is_hidden (file_info) && |
135 | ++ !g_file_info_get_is_backup (file_info)) |
136 | ++ { |
137 | ++ g_autoptr (GFile) parent = g_file_get_parent (file); |
138 | ++ |
139 | ++ if (parent) |
140 | ++ { |
141 | ++ return is_file_valid_recursive (self, parent, error); |
142 | ++ } |
143 | ++ } |
144 | ++ else |
145 | ++ { |
146 | ++ return FALSE; |
147 | ++ } |
148 | ++ } |
149 | ++ |
150 | ++ return TRUE; |
151 | ++} |
152 | ++ |
153 | +static gpointer |
154 | +recent_thread_func (gpointer user_data) |
155 | +{ |
156 | @@ -199,44 +245,24 @@ index 0000000..f052e8f |
157 | + |
158 | + if (gtk_recent_info_is_local (info)) |
159 | + { |
160 | -+ g_autofree gchar *path = NULL; |
161 | -+ g_autoptr (GFileInfo) file_info = NULL; |
162 | + g_autoptr (GError) error = NULL; |
163 | + |
164 | -+ file_info = g_file_query_info (file, FILE_ATTRIBS, |
165 | -+ G_FILE_QUERY_INFO_NONE, |
166 | -+ self->cancellable, &error); |
167 | -+ if (error != NULL) |
168 | ++ if (!is_file_valid_recursive (self, file, &error)) |
169 | + { |
170 | + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) |
171 | + { |
172 | + break; |
173 | + } |
174 | + |
175 | -+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS)) |
176 | ++ if (error != NULL && |
177 | ++ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS)) |
178 | + { |
179 | -+ g_debug("Impossible to read locate file info: %s", |
180 | ++ g_debug("Impossible to read recent file info: %s", |
181 | + error->message); |
182 | + } |
183 | + |
184 | + continue; |
185 | + } |
186 | -+ |
187 | -+ if (!g_file_info_get_attribute_boolean (file_info, |
188 | -+ G_FILE_ATTRIBUTE_ACCESS_CAN_READ)) |
189 | -+ { |
190 | -+ continue; |
191 | -+ } |
192 | -+ |
193 | -+ path = g_file_get_path (file); |
194 | -+ |
195 | -+ if (!nautilus_query_get_show_hidden_files (self->query) && |
196 | -+ (g_file_info_get_is_hidden (file_info) || |
197 | -+ g_file_info_get_is_backup (file_info) || |
198 | -+ g_strrstr (path, G_DIR_SEPARATOR_S ".") != NULL)) |
199 | -+ { |
200 | -+ continue; |
201 | -+ } |
202 | + } |
203 | + |
204 | + if (g_cancellable_is_cancelled (self->cancellable)) |
205 | @@ -333,6 +359,7 @@ index 0000000..f052e8f |
206 | +nautilus_search_engine_recent_start (NautilusSearchProvider *provider) |
207 | +{ |
208 | + NautilusSearchEngineRecent *self = NAUTILUS_SEARCH_ENGINE_RECENT (provider); |
209 | ++ g_autoptr (GFile) location = NULL; |
210 | + GThread *thread; |
211 | + |
212 | + g_return_if_fail (self->query); |
213 | @@ -340,6 +367,21 @@ index 0000000..f052e8f |
214 | + |
215 | + g_object_ref (self); |
216 | + g_object_ref (self->query); |
217 | ++ |
218 | ++ location = nautilus_query_get_location (self->query); |
219 | ++ |
220 | ++ if (!is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED, |
221 | ++ nautilus_query_get_recursive (self->query), |
222 | ++ location)) |
223 | ++ { |
224 | ++ SearchHitsData *search_hits; |
225 | ++ search_hits = g_new0 (SearchHitsData, 1); |
226 | ++ search_hits->recent = self; |
227 | ++ |
228 | ++ g_idle_add (search_thread_add_hits_idle, search_hits); |
229 | ++ return; |
230 | ++ } |
231 | ++ |
232 | + self->cancellable = g_cancellable_new (); |
233 | + |
234 | + thread = g_thread_new ("nautilus-search-recent", recent_thread_func, self); |
235 | @@ -473,18 +515,18 @@ index 0000000..bcd73b9 |
236 | + |
237 | +#endif /* __NAUTILUS_SEARCH_ENGINE_RECENT_H__ */ |
238 | diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c |
239 | -index 209bd4f..aef91b7 100644 |
240 | +index a545160..68b6a4d 100644 |
241 | --- a/src/nautilus-search-engine.c |
242 | +++ b/src/nautilus-search-engine.c |
243 | -@@ -24,6 +24,7 @@ |
244 | - #include <glib/gi18n.h> |
245 | - #include "nautilus-search-provider.h" |
246 | +@@ -21,6 +21,7 @@ |
247 | + |
248 | + #include <config.h> |
249 | #include "nautilus-search-engine.h" |
250 | +#include "nautilus-search-engine-recent.h" |
251 | #include "nautilus-search-engine-simple.h" |
252 | - #include "nautilus-search-engine-model.h" |
253 | - #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH |
254 | -@@ -33,6 +34,7 @@ |
255 | + #include "nautilus-search-engine-private.h" |
256 | + |
257 | +@@ -35,6 +36,7 @@ |
258 | typedef struct |
259 | { |
260 | NautilusSearchEngineTracker *tracker; |
261 | @@ -492,7 +534,7 @@ index 209bd4f..aef91b7 100644 |
262 | NautilusSearchEngineSimple *simple; |
263 | NautilusSearchEngineModel *model; |
264 | |
265 | -@@ -74,6 +76,7 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider, |
266 | +@@ -76,6 +78,7 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider, |
267 | priv = nautilus_search_engine_get_instance_private (engine); |
268 | |
269 | nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->tracker), query); |
270 | @@ -500,7 +542,7 @@ index 209bd4f..aef91b7 100644 |
271 | nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->model), query); |
272 | nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->simple), query); |
273 | } |
274 | -@@ -98,6 +101,9 @@ search_engine_start_real (NautilusSearchEngine *engine) |
275 | +@@ -100,6 +103,9 @@ search_engine_start_real (NautilusSearchEngine *engine) |
276 | nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->tracker)); |
277 | priv->providers_running++; |
278 | |
279 | @@ -510,7 +552,7 @@ index 209bd4f..aef91b7 100644 |
280 | if (nautilus_search_engine_model_get_model (priv->model)) |
281 | { |
282 | nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->model)); |
283 | -@@ -159,6 +165,7 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider) |
284 | +@@ -161,6 +167,7 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider) |
285 | DEBUG ("Search engine stop"); |
286 | |
287 | nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->tracker)); |
288 | @@ -518,7 +560,7 @@ index 209bd4f..aef91b7 100644 |
289 | nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->model)); |
290 | nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->simple)); |
291 | |
292 | -@@ -334,6 +341,7 @@ nautilus_search_engine_finalize (GObject *object) |
293 | +@@ -336,6 +343,7 @@ nautilus_search_engine_finalize (GObject *object) |
294 | g_hash_table_destroy (priv->uris); |
295 | |
296 | g_clear_object (&priv->tracker); |
297 | @@ -526,7 +568,7 @@ index 209bd4f..aef91b7 100644 |
298 | g_clear_object (&priv->model); |
299 | g_clear_object (&priv->simple); |
300 | |
301 | -@@ -395,6 +403,9 @@ nautilus_search_engine_init (NautilusSearchEngine *engine) |
302 | +@@ -397,6 +405,9 @@ nautilus_search_engine_init (NautilusSearchEngine *engine) |
303 | |
304 | priv->simple = nautilus_search_engine_simple_new (); |
305 | connect_provider_signals (engine, NAUTILUS_SEARCH_PROVIDER (priv->simple)); |
306 | 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 |
307 | index 99abe37..d0125f5 100644 |
308 | --- a/debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch |
309 | +++ b/debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch |
310 | @@ -1,5 +1,5 @@ |
311 | From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net> |
312 | -Date: Wed, 11 Apr 2018 18:51:34 -0400 |
313 | +Date: Thu, 12 Apr 2018 00:51:34 +0200 |
314 | Subject: recent: add function to update manager on file rename or move |
315 | |
316 | When files have been moved or renamed nautilus should inform |
317 | @@ -7,10 +7,10 @@ recent manager about this change for the files that |
318 | are listed there. |
319 | --- |
320 | src/nautilus-directory.c | 8 +++ |
321 | - src/nautilus-file.c | 25 +++++----- |
322 | - src/nautilus-recent.c | 126 +++++++++++++++++++++++++++++++++++++++++++++++ |
323 | + src/nautilus-file.c | 25 +++++---- |
324 | + src/nautilus-recent.c | 132 +++++++++++++++++++++++++++++++++++++++++++++++ |
325 | src/nautilus-recent.h | 8 ++- |
326 | - 4 files changed, 152 insertions(+), 15 deletions(-) |
327 | + 4 files changed, 158 insertions(+), 15 deletions(-) |
328 | |
329 | diff --git a/src/nautilus-directory.c b/src/nautilus-directory.c |
330 | index ad3bb03..f1a3bf8 100644 |
331 | @@ -49,7 +49,7 @@ index ad3bb03..f1a3bf8 100644 |
332 | |
333 | /* Now send out the changed and added signals for existing file objects. */ |
334 | diff --git a/src/nautilus-file.c b/src/nautilus-file.c |
335 | -index 2135801..15e5d05 100644 |
336 | +index e862c13..21846d0 100644 |
337 | --- a/src/nautilus-file.c |
338 | +++ b/src/nautilus-file.c |
339 | @@ -34,6 +34,7 @@ |
340 | @@ -128,17 +128,18 @@ index 2135801..15e5d05 100644 |
341 | |
342 | static void |
343 | diff --git a/src/nautilus-recent.c b/src/nautilus-recent.c |
344 | -index ab50fef..c69a3a7 100644 |
345 | +index ab50fef..6676465 100644 |
346 | --- a/src/nautilus-recent.c |
347 | +++ b/src/nautilus-recent.c |
348 | -@@ -1,5 +1,6 @@ |
349 | +@@ -1,5 +1,7 @@ |
350 | /* |
351 | * Copyright (C) 2002 James Willcox |
352 | + * Copyright (C) 2018 Canonical Ltd |
353 | ++ * Copyright (C) 2018 Marco Trevisan |
354 | * |
355 | * This program is free software; you can redistribute it and/or modify |
356 | * it under the terms of the GNU General Public License as published by |
357 | -@@ -17,6 +18,7 @@ |
358 | +@@ -17,6 +19,7 @@ |
359 | |
360 | #include "config.h" |
361 | #include "nautilus-recent.h" |
362 | @@ -146,16 +147,16 @@ index ab50fef..c69a3a7 100644 |
363 | |
364 | #include <eel/eel-vfs-extensions.h> |
365 | |
366 | -@@ -85,3 +87,127 @@ nautilus_recent_add_file (NautilusFile *file, |
367 | +@@ -85,3 +88,132 @@ nautilus_recent_add_file (NautilusFile *file, |
368 | |
369 | g_free (uri); |
370 | } |
371 | + |
372 | +void |
373 | -+nautilus_recent_update_file_moved (const gchar *old_uri, |
374 | -+ const gchar *new_uri, |
375 | -+ const gchar *old_display_name, |
376 | -+ const gchar *new_display_name) |
377 | ++nautilus_recent_update_file_moved (const gchar *old_uri, |
378 | ++ const gchar *new_uri, |
379 | ++ const gchar *old_display_name, |
380 | ++ const gchar *new_display_name) |
381 | +{ |
382 | + GtkRecentManager *recent_manager = nautilus_recent_get_manager (); |
383 | + g_autoptr (NautilusFile) file = NULL; |
384 | @@ -191,9 +192,11 @@ index ab50fef..c69a3a7 100644 |
385 | + |
386 | + if (nautilus_file_is_directory (file)) |
387 | + { |
388 | ++ g_autoptr (GFile) location = NULL; |
389 | + GList *recent_items; |
390 | + GList *l; |
391 | + |
392 | ++ location = g_file_new_for_uri (old_uri); |
393 | + recent_items = gtk_recent_manager_get_items (recent_manager); |
394 | + |
395 | + for (l = recent_items; l; l = l->next) |
396 | @@ -203,9 +206,12 @@ index ab50fef..c69a3a7 100644 |
397 | + |
398 | + if (g_str_has_prefix (item_uri, old_uri)) |
399 | + { |
400 | -+ const gchar *relative_path = item_uri + strlen (old_uri); |
401 | ++ g_autoptr (GFile) item_file = NULL; |
402 | ++ g_autofree gchar *relative_path = NULL; |
403 | + g_autofree gchar *new_item_uri = NULL; |
404 | + |
405 | ++ item_file = g_file_new_for_uri (item_uri); |
406 | ++ relative_path = g_file_get_relative_path (location, item_file); |
407 | + new_item_uri = g_build_filename (new_uri, relative_path, NULL); |
408 | + |
409 | + gtk_recent_manager_move_item (recent_manager, |
410 | 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 |
411 | index 5140963..c0d37b9 100644 |
412 | --- a/debian/patches/0018-search-engine-add-locate-based-search-engine.patch |
413 | +++ b/debian/patches/0018-search-engine-add-locate-based-search-engine.patch |
414 | @@ -7,19 +7,19 @@ command line and parsing output to provide more and |
415 | quicker results to the shell and nautilus |
416 | --- |
417 | src/meson.build | 2 + |
418 | - src/nautilus-search-engine-locate.c | 597 ++++++++++++++++++++++++++++++++++++ |
419 | + src/nautilus-search-engine-locate.c | 601 ++++++++++++++++++++++++++++++++++++ |
420 | src/nautilus-search-engine-locate.h | 37 +++ |
421 | src/nautilus-search-engine.c | 11 + |
422 | - 4 files changed, 647 insertions(+) |
423 | + 4 files changed, 651 insertions(+) |
424 | create mode 100644 src/nautilus-search-engine-locate.c |
425 | create mode 100644 src/nautilus-search-engine-locate.h |
426 | |
427 | diff --git a/src/meson.build b/src/meson.build |
428 | -index 0ea9165..06e6633 100644 |
429 | +index 213b35f..a0bf109 100644 |
430 | --- a/src/meson.build |
431 | +++ b/src/meson.build |
432 | -@@ -228,6 +228,8 @@ libnautilus_sources = [ |
433 | - 'nautilus-search-engine.h', |
434 | +@@ -229,6 +229,8 @@ libnautilus_sources = [ |
435 | + 'nautilus-search-engine-private.h', |
436 | 'nautilus-search-engine-model.c', |
437 | 'nautilus-search-engine-model.h', |
438 | + 'nautilus-search-engine-locate.c', |
439 | @@ -29,10 +29,10 @@ index 0ea9165..06e6633 100644 |
440 | 'nautilus-search-engine-simple.c', |
441 | diff --git a/src/nautilus-search-engine-locate.c b/src/nautilus-search-engine-locate.c |
442 | new file mode 100644 |
443 | -index 0000000..16f9f21 |
444 | +index 0000000..d152a23 |
445 | --- /dev/null |
446 | +++ b/src/nautilus-search-engine-locate.c |
447 | -@@ -0,0 +1,597 @@ |
448 | +@@ -0,0 +1,601 @@ |
449 | +/* |
450 | + * Copyright (C) 2018 Canonical Ltd |
451 | + * |
452 | @@ -57,6 +57,7 @@ index 0000000..16f9f21 |
453 | +#include "nautilus-search-hit.h" |
454 | +#include "nautilus-search-provider.h" |
455 | +#include "nautilus-search-engine-locate.h" |
456 | ++#include "nautilus-search-engine-private.h" |
457 | +#include "nautilus-ui-utilities.h" |
458 | +#define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH |
459 | +#include "nautilus-debug.h" |
460 | @@ -452,7 +453,12 @@ index 0000000..16f9f21 |
461 | + sdata = g_new0 (LocateSearchData, 1); |
462 | + sdata->locate = g_object_ref (self); |
463 | + |
464 | -+ if (!(self->locate_features & LOCATE_INSTALLED)) |
465 | ++ query_location = nautilus_query_get_location (self->query); |
466 | ++ |
467 | ++ if (!(self->locate_features & LOCATE_INSTALLED) || |
468 | ++ !is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED, |
469 | ++ nautilus_query_get_recursive (self->query), |
470 | ++ query_location)) |
471 | + { |
472 | + g_idle_add ((GSourceFunc) submit_results, sdata); |
473 | + return; |
474 | @@ -493,8 +499,6 @@ index 0000000..16f9f21 |
475 | + return; |
476 | + } |
477 | + |
478 | -+ query_location = nautilus_query_get_location (self->query); |
479 | -+ |
480 | + sdata->query = g_object_ref (self->query); |
481 | + sdata->date_range = nautilus_query_get_date_range (self->query); |
482 | + sdata->mime_types = nautilus_query_get_mime_types (self->query); |
483 | @@ -674,18 +678,18 @@ index 0000000..ac5e3fc |
484 | + |
485 | +#endif /* __NAUTILUS_SEARCH_ENGINE_LOCATE_H__ */ |
486 | diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c |
487 | -index aef91b7..bf0e85d 100644 |
488 | +index 68b6a4d..84a88fa 100644 |
489 | --- a/src/nautilus-search-engine.c |
490 | +++ b/src/nautilus-search-engine.c |
491 | -@@ -25,6 +25,7 @@ |
492 | - #include "nautilus-search-provider.h" |
493 | +@@ -22,6 +22,7 @@ |
494 | + #include <config.h> |
495 | #include "nautilus-search-engine.h" |
496 | #include "nautilus-search-engine-recent.h" |
497 | +#include "nautilus-search-engine-locate.h" |
498 | #include "nautilus-search-engine-simple.h" |
499 | - #include "nautilus-search-engine-model.h" |
500 | - #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH |
501 | -@@ -35,6 +36,7 @@ typedef struct |
502 | + #include "nautilus-search-engine-private.h" |
503 | + |
504 | +@@ -37,6 +38,7 @@ typedef struct |
505 | { |
506 | NautilusSearchEngineTracker *tracker; |
507 | NautilusSearchEngineRecent *recent; |
508 | @@ -693,7 +697,7 @@ index aef91b7..bf0e85d 100644 |
509 | NautilusSearchEngineSimple *simple; |
510 | NautilusSearchEngineModel *model; |
511 | |
512 | -@@ -77,6 +79,7 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider, |
513 | +@@ -79,6 +81,7 @@ nautilus_search_engine_set_query (NautilusSearchProvider *provider, |
514 | |
515 | nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->tracker), query); |
516 | nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->recent), query); |
517 | @@ -701,7 +705,7 @@ index aef91b7..bf0e85d 100644 |
518 | nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->model), query); |
519 | nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (priv->simple), query); |
520 | } |
521 | -@@ -104,6 +107,9 @@ search_engine_start_real (NautilusSearchEngine *engine) |
522 | +@@ -106,6 +109,9 @@ search_engine_start_real (NautilusSearchEngine *engine) |
523 | priv->providers_running++; |
524 | nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->recent)); |
525 | |
526 | @@ -711,7 +715,7 @@ index aef91b7..bf0e85d 100644 |
527 | if (nautilus_search_engine_model_get_model (priv->model)) |
528 | { |
529 | nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (priv->model)); |
530 | -@@ -166,6 +172,7 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider) |
531 | +@@ -168,6 +174,7 @@ nautilus_search_engine_stop (NautilusSearchProvider *provider) |
532 | |
533 | nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->tracker)); |
534 | nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->recent)); |
535 | @@ -719,7 +723,7 @@ index aef91b7..bf0e85d 100644 |
536 | nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->model)); |
537 | nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (priv->simple)); |
538 | |
539 | -@@ -342,6 +349,7 @@ nautilus_search_engine_finalize (GObject *object) |
540 | +@@ -344,6 +351,7 @@ nautilus_search_engine_finalize (GObject *object) |
541 | |
542 | g_clear_object (&priv->tracker); |
543 | g_clear_object (&priv->recent); |
544 | @@ -727,7 +731,7 @@ index aef91b7..bf0e85d 100644 |
545 | g_clear_object (&priv->model); |
546 | g_clear_object (&priv->simple); |
547 | |
548 | -@@ -406,6 +414,9 @@ nautilus_search_engine_init (NautilusSearchEngine *engine) |
549 | +@@ -408,6 +416,9 @@ nautilus_search_engine_init (NautilusSearchEngine *engine) |
550 | |
551 | priv->recent = nautilus_search_engine_recent_new (); |
552 | connect_provider_signals (engine, NAUTILUS_SEARCH_PROVIDER (priv->recent)); |
553 | 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 |
554 | new file mode 100644 |
555 | index 0000000..46660e5 |
556 | --- /dev/null |
557 | +++ b/debian/patches/Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch |
558 | @@ -0,0 +1,53 @@ |
559 | +From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net> |
560 | +Date: Wed, 18 Jul 2018 18:46:28 +0200 |
561 | +Subject: Revert "Revert "files-view: Remove new empty folder name |
562 | + suggestion"" |
563 | + |
564 | +This reverts commit 945c32dec747855047aa9b380d53588c5fcfb57a. |
565 | + |
566 | +This feature was already provided in Ubuntu, so would be a regression if we drop it |
567 | +--- |
568 | + src/nautilus-files-view.c | 15 ++++++++------- |
569 | + 1 file changed, 8 insertions(+), 7 deletions(-) |
570 | + |
571 | +diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c |
572 | +index 46a11bd..f916b05 100644 |
573 | +--- a/src/nautilus-files-view.c |
574 | ++++ b/src/nautilus-files-view.c |
575 | +@@ -2077,9 +2077,8 @@ static void |
576 | + nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view, |
577 | + gboolean with_selection) |
578 | + { |
579 | +- NautilusDirectory *containing_directory; |
580 | ++ g_autoptr (NautilusDirectory) containing_directory = NULL; |
581 | + NautilusFilesViewPrivate *priv; |
582 | +- GList *selection; |
583 | + g_autofree char *uri = NULL; |
584 | + g_autofree char *common_prefix = NULL; |
585 | + |
586 | +@@ -2093,8 +2092,13 @@ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view, |
587 | + uri = nautilus_files_view_get_backing_uri (view); |
588 | + containing_directory = nautilus_directory_get_by_uri (uri); |
589 | + |
590 | +- selection = nautilus_view_get_selection (NAUTILUS_VIEW (view)); |
591 | +- common_prefix = nautilus_get_common_filename_prefix (selection, MIN_COMMON_FILENAME_PREFIX_LENGTH); |
592 | ++ if (with_selection) |
593 | ++ { |
594 | ++ GList *selection; |
595 | ++ selection = nautilus_view_get_selection (NAUTILUS_VIEW (view)); |
596 | ++ common_prefix = nautilus_get_common_filename_prefix (selection, MIN_COMMON_FILENAME_PREFIX_LENGTH); |
597 | ++ nautilus_file_list_free (selection); |
598 | ++ } |
599 | + |
600 | + priv->new_folder_controller = |
601 | + nautilus_new_folder_dialog_controller_new (nautilus_files_view_get_containing_window (view), |
602 | +@@ -2110,9 +2114,6 @@ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view, |
603 | + "cancelled", |
604 | + (GCallback) new_folder_dialog_controller_on_cancelled, |
605 | + view); |
606 | +- |
607 | +- nautilus_file_list_free (selection); |
608 | +- nautilus_directory_unref (containing_directory); |
609 | + } |
610 | + |
611 | + typedef struct |
612 | 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 |
613 | new file mode 100644 |
614 | index 0000000..90cbfe1 |
615 | --- /dev/null |
616 | +++ b/debian/patches/Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch |
617 | @@ -0,0 +1,25 @@ |
618 | +From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net> |
619 | +Date: Wed, 18 Jul 2018 18:46:16 +0200 |
620 | +Subject: Revert "Revert "nautilus-file: Don't show thumbnails for the first 2 |
621 | + zoom levels"" |
622 | + |
623 | +This reverts commit d62c0899f34665bdc4752ce8b6844328889f4638. |
624 | + |
625 | +This feature was already provided in Ubuntu, so would be a regression if we drop it |
626 | +--- |
627 | + src/nautilus-file.c | 2 +- |
628 | + 1 file changed, 1 insertion(+), 1 deletion(-) |
629 | + |
630 | +diff --git a/src/nautilus-file.c b/src/nautilus-file.c |
631 | +index 21846d0..ede9c46 100644 |
632 | +--- a/src/nautilus-file.c |
633 | ++++ b/src/nautilus-file.c |
634 | +@@ -5554,7 +5554,7 @@ nautilus_thumbnail_is_limited_by_zoom (int size, |
635 | + |
636 | + zoom_level = size * scale; |
637 | + |
638 | +- if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_SMALL) |
639 | ++ if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_STANDARD) |
640 | + { |
641 | + return TRUE; |
642 | + } |
643 | diff --git a/debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mounted.patch b/debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mounted.patch |
644 | new file mode 100644 |
645 | index 0000000..37081f7 |
646 | --- /dev/null |
647 | +++ b/debian/patches/nautilusgtkplacesview-show-error-if-volume-is-not-mounted.patch |
648 | @@ -0,0 +1,45 @@ |
649 | +From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net> |
650 | +Date: Tue, 17 Jul 2018 04:23:58 +0200 |
651 | +Subject: nautilusgtkplacesview: show error if volume is not mounted |
652 | + |
653 | +Fixes crash as location would be NULL afterwards. |
654 | + |
655 | +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1764779 |
656 | +Forwarded: not-needed |
657 | +--- |
658 | + src/gtk/nautilusgtkplacesview.c | 20 +++++++++++++++----- |
659 | + 1 file changed, 15 insertions(+), 5 deletions(-) |
660 | + |
661 | +diff --git a/src/gtk/nautilusgtkplacesview.c b/src/gtk/nautilusgtkplacesview.c |
662 | +index 041849f..e13c313 100644 |
663 | +--- a/src/gtk/nautilusgtkplacesview.c |
664 | ++++ b/src/gtk/nautilusgtkplacesview.c |
665 | +@@ -1330,13 +1330,23 @@ volume_mount_ready_cb (GObject *source_volume, |
666 | + GFile *root; |
667 | + |
668 | + mount = g_volume_get_mount (volume); |
669 | +- root = g_mount_get_default_location (mount); |
670 | + |
671 | +- if (priv->should_open_location) |
672 | +- emit_open_location (NAUTILUS_GTK_PLACES_VIEW (user_data), root, priv->open_flags); |
673 | ++ if (G_IS_MOUNT (mount)) |
674 | ++ { |
675 | ++ root = g_mount_get_default_location (mount); |
676 | + |
677 | +- g_object_unref (mount); |
678 | +- g_object_unref (root); |
679 | ++ if (priv->should_open_location) |
680 | ++ emit_open_location (NAUTILUS_GTK_PLACES_VIEW (user_data), root, priv->open_flags); |
681 | ++ |
682 | ++ g_object_unref (mount); |
683 | ++ g_object_unref (root); |
684 | ++ } |
685 | ++ else |
686 | ++ { |
687 | ++ emit_show_error_message (NAUTILUS_GTK_PLACES_VIEW(user_data), |
688 | ++ _("Unable to access location"), |
689 | ++ _("volume not mounted")); |
690 | ++ } |
691 | + } |
692 | + |
693 | + update_places (view); |
694 | 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 |
695 | new file mode 100644 |
696 | index 0000000..c1ee4a7 |
697 | --- /dev/null |
698 | +++ b/debian/patches/query-add-recursive-flags-and-use-it-in-search-engines.patch |
699 | @@ -0,0 +1,977 @@ |
700 | +From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net> |
701 | +Date: Tue, 17 Jul 2018 02:35:20 +0200 |
702 | +Subject: query: add recursive flags and use it in search-engines |
703 | + |
704 | +Forwarded: yes, https://gitlab.gnome.org/GNOME/nautilus/merge_requests/249 |
705 | +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1767027 |
706 | +--- |
707 | + src/meson.build | 1 + |
708 | + src/nautilus-application.c | 11 ++---- |
709 | + src/nautilus-application.h | 3 +- |
710 | + src/nautilus-directory-async.c | 5 ++- |
711 | + src/nautilus-file-private.h | 3 +- |
712 | + src/nautilus-file.c | 28 ++++++++++++++ |
713 | + src/nautilus-file.h | 2 + |
714 | + src/nautilus-query-editor.c | 61 +++++++++++++++++------------- |
715 | + src/nautilus-query.c | 28 +++++++------- |
716 | + src/nautilus-query.h | 14 +++++-- |
717 | + src/nautilus-search-directory.c | 6 --- |
718 | + src/nautilus-search-engine-private.h | 34 +++++++++++++++++ |
719 | + src/nautilus-search-engine-simple.c | 72 ++++++++---------------------------- |
720 | + src/nautilus-search-engine-tracker.c | 16 ++++---- |
721 | + src/nautilus-search-engine.c | 36 ++++++++++++++---- |
722 | + src/nautilus-search-engine.h | 2 - |
723 | + src/nautilus-shell-search-provider.c | 40 +++++++++++--------- |
724 | + src/nautilus-window-slot.c | 19 ++++------ |
725 | + src/nautilus-window-slot.h | 2 +- |
726 | + src/nautilus-window.c | 4 +- |
727 | + src/nautilus-window.h | 2 +- |
728 | + 21 files changed, 222 insertions(+), 167 deletions(-) |
729 | + create mode 100644 src/nautilus-search-engine-private.h |
730 | + |
731 | +diff --git a/src/meson.build b/src/meson.build |
732 | +index a771d12..73aafe9 100644 |
733 | +--- a/src/meson.build |
734 | ++++ b/src/meson.build |
735 | +@@ -226,6 +226,7 @@ libnautilus_sources = [ |
736 | + 'nautilus-search-provider.h', |
737 | + 'nautilus-search-engine.c', |
738 | + 'nautilus-search-engine.h', |
739 | ++ 'nautilus-search-engine-private.h', |
740 | + 'nautilus-search-engine-model.c', |
741 | + 'nautilus-search-engine-model.h', |
742 | + 'nautilus-search-engine-simple.c', |
743 | +diff --git a/src/nautilus-application.c b/src/nautilus-application.c |
744 | +index 6293a89..13753a5 100644 |
745 | +--- a/src/nautilus-application.c |
746 | ++++ b/src/nautilus-application.c |
747 | +@@ -1621,15 +1621,12 @@ nautilus_application_new (void) |
748 | + |
749 | + void |
750 | + nautilus_application_search (NautilusApplication *self, |
751 | +- const gchar *uri, |
752 | +- const gchar *text) |
753 | ++ NautilusQuery *query) |
754 | + { |
755 | ++ g_autoptr (GFile) location = NULL; |
756 | + NautilusWindow *window; |
757 | +- GFile *location; |
758 | + |
759 | +- location = g_file_new_for_uri (uri); |
760 | ++ location = nautilus_query_get_location (query); |
761 | + window = open_window (self, location); |
762 | +- nautilus_window_search (window, text); |
763 | +- |
764 | +- g_object_unref (location); |
765 | ++ nautilus_window_search (window, query); |
766 | + } |
767 | +diff --git a/src/nautilus-application.h b/src/nautilus-application.h |
768 | +index 9cb32c8..47adcc4 100644 |
769 | +--- a/src/nautilus-application.h |
770 | ++++ b/src/nautilus-application.h |
771 | +@@ -86,8 +86,7 @@ GtkWidget * nautilus_application_connect_server (NautilusApplication *applicatio |
772 | + NautilusWindow *window); |
773 | + |
774 | + void nautilus_application_search (NautilusApplication *application, |
775 | +- const gchar *uri, |
776 | +- const gchar *text); |
777 | ++ NautilusQuery *query); |
778 | + void nautilus_application_startup_common (NautilusApplication *application); |
779 | + |
780 | + void nautilus_application_update_dbus_opened_locations (NautilusApplication *app); |
781 | +diff --git a/src/nautilus-directory-async.c b/src/nautilus-directory-async.c |
782 | +index 05a87e3..b519e20 100644 |
783 | +--- a/src/nautilus-directory-async.c |
784 | ++++ b/src/nautilus-directory-async.c |
785 | +@@ -4383,6 +4383,8 @@ got_filesystem_info (FilesystemInfoState *state, |
786 | + file->details->filesystem_readonly = |
787 | + g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY); |
788 | + filesystem_type = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE); |
789 | ++ file->details->filesystem_remote = |
790 | ++ g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE); |
791 | + if (g_strcmp0 (eel_ref_str_peek (file->details->filesystem_type), filesystem_type) != 0) |
792 | + { |
793 | + eel_ref_str_unref (file->details->filesystem_type); |
794 | +@@ -4465,7 +4467,8 @@ filesystem_info_start (NautilusDirectory *directory, |
795 | + g_file_query_filesystem_info_async (location, |
796 | + G_FILE_ATTRIBUTE_FILESYSTEM_READONLY "," |
797 | + G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW "," |
798 | +- G_FILE_ATTRIBUTE_FILESYSTEM_TYPE, |
799 | ++ G_FILE_ATTRIBUTE_FILESYSTEM_TYPE "," |
800 | ++ G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE, |
801 | + G_PRIORITY_DEFAULT, |
802 | + state->cancellable, |
803 | + query_filesystem_info_callback, |
804 | +diff --git a/src/nautilus-file-private.h b/src/nautilus-file-private.h |
805 | +index adcfacf..1566589 100644 |
806 | +--- a/src/nautilus-file-private.h |
807 | ++++ b/src/nautilus-file-private.h |
808 | +@@ -202,7 +202,8 @@ struct NautilusFileDetails |
809 | + eel_boolean_bit filesystem_readonly : 1; |
810 | + eel_boolean_bit filesystem_use_preview : 2; /* GFilesystemPreviewType */ |
811 | + eel_boolean_bit filesystem_info_is_up_to_date : 1; |
812 | +- eel_ref_str filesystem_type; |
813 | ++ eel_boolean_bit filesystem_remote : 1; |
814 | ++ eel_ref_str filesystem_type; |
815 | + |
816 | + time_t trash_time; /* 0 is unknown */ |
817 | + time_t recency; /* 0 is unknown */ |
818 | +diff --git a/src/nautilus-file.c b/src/nautilus-file.c |
819 | +index 2135801..6a28229 100644 |
820 | +--- a/src/nautilus-file.c |
821 | ++++ b/src/nautilus-file.c |
822 | +@@ -4960,6 +4960,29 @@ nautilus_file_get_filesystem_type (NautilusFile *file) |
823 | + return filesystem_type; |
824 | + } |
825 | + |
826 | ++gboolean |
827 | ++nautilus_file_get_filesystem_remote (NautilusFile *file) |
828 | ++{ |
829 | ++ NautilusFile *parent; |
830 | ++ |
831 | ++ g_assert (NAUTILUS_IS_FILE (file)); |
832 | ++ |
833 | ++ if (nautilus_file_is_directory (file)) |
834 | ++ { |
835 | ++ return file->details->filesystem_remote; |
836 | ++ } |
837 | ++ else |
838 | ++ { |
839 | ++ parent = nautilus_file_get_parent (file); |
840 | ++ if (parent != NULL) |
841 | ++ { |
842 | ++ return parent->details->filesystem_remote; |
843 | ++ } |
844 | ++ } |
845 | ++ |
846 | ++ return FALSE; |
847 | ++} |
848 | ++ |
849 | + gboolean |
850 | + nautilus_file_should_show_thumbnail (NautilusFile *file) |
851 | + { |
852 | +@@ -8361,6 +8384,11 @@ nautilus_file_is_remote (NautilusFile *file) |
853 | + |
854 | + g_assert (NAUTILUS_IS_FILE (file)); |
855 | + |
856 | ++ if (nautilus_file_get_filesystem_remote (file)) |
857 | ++ { |
858 | ++ return TRUE; |
859 | ++ } |
860 | ++ |
861 | + filesystem_type = nautilus_file_get_filesystem_type (file); |
862 | + |
863 | + return filesystem_type != NULL && g_strv_contains (remote_types, filesystem_type); |
864 | +diff --git a/src/nautilus-file.h b/src/nautilus-file.h |
865 | +index 3a83bd4..af8c003 100644 |
866 | +--- a/src/nautilus-file.h |
867 | ++++ b/src/nautilus-file.h |
868 | +@@ -251,6 +251,8 @@ char * nautilus_file_get_filesystem_id (Nautilu |
869 | + |
870 | + char * nautilus_file_get_filesystem_type (NautilusFile *file); |
871 | + |
872 | ++gboolean nautilus_file_get_filesystem_remote (NautilusFile *file); |
873 | ++ |
874 | + NautilusFile * nautilus_file_get_trash_original_file (NautilusFile *file); |
875 | + |
876 | + /* Permissions. */ |
877 | +diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c |
878 | +index 94b9c4d..f5260c9 100644 |
879 | +--- a/src/nautilus-query-editor.c |
880 | ++++ b/src/nautilus-query-editor.c |
881 | +@@ -80,33 +80,47 @@ static void nautilus_query_editor_changed (NautilusQueryEditor *editor); |
882 | + |
883 | + G_DEFINE_TYPE_WITH_PRIVATE (NautilusQueryEditor, nautilus_query_editor, GTK_TYPE_SEARCH_BAR); |
884 | + |
885 | +-static gboolean |
886 | +-settings_search_is_recursive (NautilusQueryEditor *editor) |
887 | ++static NautilusQueryRecursive |
888 | ++settings_search_get_recursive (void) |
889 | ++{ |
890 | ++ switch (g_settings_get_enum (nautilus_preferences, "recursive-search")) |
891 | ++ { |
892 | ++ case NAUTILUS_SPEED_TRADEOFF_ALWAYS: |
893 | ++ return NAUTILUS_QUERY_RECURSIVE_ALWAYS; |
894 | ++ case NAUTILUS_SPEED_TRADEOFF_LOCAL_ONLY: |
895 | ++ return NAUTILUS_QUERY_RECURSIVE_LOCAL_ONLY; |
896 | ++ case NAUTILUS_SPEED_TRADEOFF_NEVER: |
897 | ++ return NAUTILUS_QUERY_RECURSIVE_NEVER; |
898 | ++ } |
899 | ++ |
900 | ++ return NAUTILUS_QUERY_RECURSIVE_ALWAYS; |
901 | ++} |
902 | ++ |
903 | ++static NautilusQueryRecursive |
904 | ++settings_search_get_recursive_for_location (NautilusQueryEditor *editor) |
905 | + { |
906 | + NautilusQueryEditorPrivate *priv; |
907 | +- NautilusFile *file; |
908 | +- gboolean recursive; |
909 | ++ NautilusQueryRecursive recursive; |
910 | + |
911 | + priv = nautilus_query_editor_get_instance_private (editor); |
912 | ++ recursive = settings_search_get_recursive (); |
913 | + |
914 | +- if (!priv->location) |
915 | ++ if (priv->location == NULL) |
916 | + { |
917 | +- return TRUE; |
918 | ++ return recursive; |
919 | + } |
920 | + |
921 | +- file = nautilus_file_get (priv->location); |
922 | +- |
923 | +- if (nautilus_file_is_remote (file)) |
924 | ++ if (recursive == NAUTILUS_QUERY_RECURSIVE_LOCAL_ONLY) |
925 | + { |
926 | +- recursive = g_settings_get_enum (nautilus_preferences, "recursive-search") == NAUTILUS_SPEED_TRADEOFF_ALWAYS; |
927 | +- } |
928 | +- else |
929 | +- { |
930 | +- recursive = g_settings_get_enum (nautilus_preferences, "recursive-search") == NAUTILUS_SPEED_TRADEOFF_LOCAL_ONLY || |
931 | +- g_settings_get_enum (nautilus_preferences, "recursive-search") == NAUTILUS_SPEED_TRADEOFF_ALWAYS; |
932 | +- } |
933 | ++ NautilusFile *file = nautilus_file_get (priv->location); |
934 | + |
935 | +- nautilus_file_unref (file); |
936 | ++ if (nautilus_file_is_remote (file)) |
937 | ++ { |
938 | ++ recursive = NAUTILUS_QUERY_RECURSIVE_NEVER; |
939 | ++ } |
940 | ++ |
941 | ++ nautilus_file_unref (file); |
942 | ++ } |
943 | + |
944 | + return recursive; |
945 | + } |
946 | +@@ -144,12 +158,12 @@ update_information_label (NautilusQueryEditor *editor) |
947 | + fts_sensitive = FALSE; |
948 | + } |
949 | + else if (nautilus_file_is_remote (file) && |
950 | +- !settings_search_is_recursive (editor)) |
951 | ++ settings_search_get_recursive_for_location (editor) == NAUTILUS_QUERY_RECURSIVE_NEVER) |
952 | + { |
953 | + label = _("Remote location — only searching the current folder"); |
954 | + fts_sensitive = FALSE; |
955 | + } |
956 | +- else if (!settings_search_is_recursive (editor)) |
957 | ++ else if (settings_search_get_recursive_for_location (editor) == NAUTILUS_QUERY_RECURSIVE_NEVER) |
958 | + { |
959 | + label = _("Only searching the current folder"); |
960 | + } |
961 | +@@ -171,7 +185,7 @@ recursive_search_preferences_changed (GSettings *settings, |
962 | + NautilusQueryEditor *editor) |
963 | + { |
964 | + NautilusQueryEditorPrivate *priv; |
965 | +- gboolean recursive; |
966 | ++ NautilusQueryRecursive recursive; |
967 | + |
968 | + priv = nautilus_query_editor_get_instance_private (editor); |
969 | + |
970 | +@@ -180,7 +194,7 @@ recursive_search_preferences_changed (GSettings *settings, |
971 | + return; |
972 | + } |
973 | + |
974 | +- recursive = settings_search_is_recursive (editor); |
975 | ++ recursive = settings_search_get_recursive (); |
976 | + if (recursive != nautilus_query_get_recursive (priv->query)) |
977 | + { |
978 | + nautilus_query_set_recursive (priv->query, recursive); |
979 | +@@ -382,7 +396,6 @@ create_query (NautilusQueryEditor *editor) |
980 | + NautilusQueryEditorPrivate *priv; |
981 | + NautilusQuery *query; |
982 | + NautilusFile *file; |
983 | +- gboolean recursive; |
984 | + gboolean fts_enabled; |
985 | + |
986 | + priv = nautilus_query_editor_get_instance_private (editor); |
987 | +@@ -396,11 +409,9 @@ create_query (NautilusQueryEditor *editor) |
988 | + |
989 | + nautilus_query_set_search_content (query, fts_enabled); |
990 | + |
991 | +- recursive = settings_search_is_recursive (editor); |
992 | +- |
993 | + nautilus_query_set_text (query, gtk_entry_get_text (GTK_ENTRY (priv->entry))); |
994 | + nautilus_query_set_location (query, priv->location); |
995 | +- nautilus_query_set_recursive (query, recursive); |
996 | ++ nautilus_query_set_recursive (query, settings_search_get_recursive ()); |
997 | + |
998 | + nautilus_query_editor_set_query (editor, query); |
999 | + |
1000 | +diff --git a/src/nautilus-query.c b/src/nautilus-query.c |
1001 | +index 59600d1..c3e4ef4 100644 |
1002 | +--- a/src/nautilus-query.c |
1003 | ++++ b/src/nautilus-query.c |
1004 | +@@ -44,11 +44,11 @@ struct _NautilusQuery |
1005 | + GList *mime_types; |
1006 | + gboolean show_hidden; |
1007 | + GPtrArray *date_range; |
1008 | ++ NautilusQueryRecursive recursive; |
1009 | + NautilusQuerySearchType search_type; |
1010 | + NautilusQuerySearchContent search_content; |
1011 | + |
1012 | + gboolean searching; |
1013 | +- gboolean recursive; |
1014 | + char **prepared_words; |
1015 | + GMutex prepared_words_mutex; |
1016 | + }; |
1017 | +@@ -118,7 +118,7 @@ nautilus_query_get_property (GObject *object, |
1018 | + |
1019 | + case PROP_RECURSIVE: |
1020 | + { |
1021 | +- g_value_set_boolean (value, self->recursive); |
1022 | ++ g_value_set_enum (value, self->recursive); |
1023 | + } |
1024 | + break; |
1025 | + |
1026 | +@@ -181,7 +181,7 @@ nautilus_query_set_property (GObject *object, |
1027 | + |
1028 | + case PROP_RECURSIVE: |
1029 | + { |
1030 | +- nautilus_query_set_recursive (self, g_value_get_boolean (value)); |
1031 | ++ nautilus_query_set_recursive (self, g_value_get_enum (value)); |
1032 | + } |
1033 | + break; |
1034 | + |
1035 | +@@ -272,11 +272,12 @@ nautilus_query_class_init (NautilusQueryClass *class) |
1036 | + */ |
1037 | + g_object_class_install_property (gobject_class, |
1038 | + PROP_RECURSIVE, |
1039 | +- g_param_spec_boolean ("recursive", |
1040 | +- "Whether the query is being performed on subdirectories", |
1041 | +- "Whether the query is being performed on subdirectories or not", |
1042 | +- FALSE, |
1043 | +- G_PARAM_READWRITE)); |
1044 | ++ g_param_spec_enum ("recursive", |
1045 | ++ "Whether the query is being performed on subdirectories", |
1046 | ++ "Whether the query is being performed on subdirectories or not", |
1047 | ++ NAUTILUS_TYPE_QUERY_RECURSIVE, |
1048 | ++ NAUTILUS_QUERY_RECURSIVE_ALWAYS, |
1049 | ++ G_PARAM_READWRITE)); |
1050 | + |
1051 | + /** |
1052 | + * NautilusQuery::search-type: |
1053 | +@@ -636,22 +637,21 @@ nautilus_query_set_searching (NautilusQuery *query, |
1054 | + } |
1055 | + } |
1056 | + |
1057 | +-gboolean |
1058 | ++NautilusQueryRecursive |
1059 | + nautilus_query_get_recursive (NautilusQuery *query) |
1060 | + { |
1061 | +- g_return_val_if_fail (NAUTILUS_IS_QUERY (query), FALSE); |
1062 | ++ g_return_val_if_fail (NAUTILUS_IS_QUERY (query), |
1063 | ++ NAUTILUS_QUERY_RECURSIVE_ALWAYS); |
1064 | + |
1065 | + return query->recursive; |
1066 | + } |
1067 | + |
1068 | + void |
1069 | +-nautilus_query_set_recursive (NautilusQuery *query, |
1070 | +- gboolean recursive) |
1071 | ++nautilus_query_set_recursive (NautilusQuery *query, |
1072 | ++ NautilusQueryRecursive recursive) |
1073 | + { |
1074 | + g_return_if_fail (NAUTILUS_IS_QUERY (query)); |
1075 | + |
1076 | +- recursive = !!recursive; |
1077 | +- |
1078 | + if (query->recursive != recursive) |
1079 | + { |
1080 | + query->recursive = recursive; |
1081 | +diff --git a/src/nautilus-query.h b/src/nautilus-query.h |
1082 | +index 2264f50..0e04061 100644 |
1083 | +--- a/src/nautilus-query.h |
1084 | ++++ b/src/nautilus-query.h |
1085 | +@@ -35,6 +35,13 @@ typedef enum { |
1086 | + NAUTILUS_QUERY_SEARCH_CONTENT_FULL_TEXT, |
1087 | + } NautilusQuerySearchContent; |
1088 | + |
1089 | ++typedef enum { |
1090 | ++ NAUTILUS_QUERY_RECURSIVE_NEVER, |
1091 | ++ NAUTILUS_QUERY_RECURSIVE_ALWAYS, |
1092 | ++ NAUTILUS_QUERY_RECURSIVE_LOCAL_ONLY, |
1093 | ++ NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY, |
1094 | ++} NautilusQueryRecursive; |
1095 | ++ |
1096 | + #define NAUTILUS_TYPE_QUERY (nautilus_query_get_type ()) |
1097 | + |
1098 | + G_DECLARE_FINAL_TYPE (NautilusQuery, nautilus_query, NAUTILUS, QUERY, GObject) |
1099 | +@@ -67,10 +74,9 @@ GPtrArray* nautilus_query_get_date_range (NautilusQuery *query); |
1100 | + void nautilus_query_set_date_range (NautilusQuery *query, |
1101 | + GPtrArray *date_range); |
1102 | + |
1103 | +-gboolean nautilus_query_get_recursive (NautilusQuery *query); |
1104 | +- |
1105 | +-void nautilus_query_set_recursive (NautilusQuery *query, |
1106 | +- gboolean recursive); |
1107 | ++NautilusQueryRecursive nautilus_query_get_recursive (NautilusQuery *query); |
1108 | ++void nautilus_query_set_recursive (NautilusQuery *query, |
1109 | ++ NautilusQueryRecursive recursive); |
1110 | + |
1111 | + gboolean nautilus_query_get_searching (NautilusQuery *query); |
1112 | + |
1113 | +diff --git a/src/nautilus-search-directory.c b/src/nautilus-search-directory.c |
1114 | +index ae710f3..d86fda2 100644 |
1115 | +--- a/src/nautilus-search-directory.c |
1116 | ++++ b/src/nautilus-search-directory.c |
1117 | +@@ -176,8 +176,6 @@ static void |
1118 | + start_search (NautilusSearchDirectory *self) |
1119 | + { |
1120 | + NautilusSearchEngineModel *model_provider; |
1121 | +- NautilusSearchEngineSimple *simple_provider; |
1122 | +- gboolean recursive; |
1123 | + |
1124 | + if (!self->query) |
1125 | + { |
1126 | +@@ -205,10 +203,6 @@ start_search (NautilusSearchDirectory *self) |
1127 | + model_provider = nautilus_search_engine_get_model_provider (self->engine); |
1128 | + nautilus_search_engine_model_set_model (model_provider, self->base_model); |
1129 | + |
1130 | +- simple_provider = nautilus_search_engine_get_simple_provider (self->engine); |
1131 | +- recursive = nautilus_query_get_recursive (self->query); |
1132 | +- g_object_set (simple_provider, "recursive", recursive, NULL); |
1133 | +- |
1134 | + reset_file_list (self); |
1135 | + |
1136 | + nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (self->engine)); |
1137 | +diff --git a/src/nautilus-search-engine-private.h b/src/nautilus-search-engine-private.h |
1138 | +new file mode 100644 |
1139 | +index 0000000..8e28ad7 |
1140 | +--- /dev/null |
1141 | ++++ b/src/nautilus-search-engine-private.h |
1142 | +@@ -0,0 +1,34 @@ |
1143 | ++/* |
1144 | ++ * Copyright (C) 2018 Canonical Ltd. |
1145 | ++ * |
1146 | ++ * Nautilus is free software; you can redistribute it and/or |
1147 | ++ * modify it under the terms of the GNU General Public License as |
1148 | ++ * published by the Free Software Foundation; either version 2 of the |
1149 | ++ * License, or (at your option) any later version. |
1150 | ++ * |
1151 | ++ * Nautilus is distributed in the hope that it will be useful, |
1152 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1153 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1154 | ++ * General Public License for more details. |
1155 | ++ * |
1156 | ++ * You should have received a copy of the GNU General Public |
1157 | ++ * License along with this program; see the file COPYING. If not, |
1158 | ++ * see <http://www.gnu.org/licenses/>. |
1159 | ++ * |
1160 | ++ * Author: Marco Trevisan <marco@ubuntu.com> |
1161 | ++ * |
1162 | ++ */ |
1163 | ++ |
1164 | ++#ifndef NAUTILUS_SEARCH_ENGINE_PRIVATE_H |
1165 | ++#define NAUTILUS_SEARCH_ENGINE_PRIVATE_H |
1166 | ++ |
1167 | ++#include "nautilus-query.h" |
1168 | ++ |
1169 | ++typedef enum { |
1170 | ++ NAUTILUS_SEARCH_ENGINE_TYPE_NON_INDEXED, |
1171 | ++ NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED, |
1172 | ++} NautilusSearchEngineType; |
1173 | ++ |
1174 | ++gboolean is_recursive_search (NautilusSearchEngineType engine_type, NautilusQueryRecursive recursive, GFile *location); |
1175 | ++ |
1176 | ++#endif /* NAUTILUS_SEARCH_ENGINE_PRIVATE_H */ |
1177 | +diff --git a/src/nautilus-search-engine-simple.c b/src/nautilus-search-engine-simple.c |
1178 | +index 3ec9eb3..0c9ea81 100644 |
1179 | +--- a/src/nautilus-search-engine-simple.c |
1180 | ++++ b/src/nautilus-search-engine-simple.c |
1181 | +@@ -20,9 +20,11 @@ |
1182 | + */ |
1183 | + |
1184 | + #include <config.h> |
1185 | ++ |
1186 | + #include "nautilus-search-hit.h" |
1187 | + #include "nautilus-search-provider.h" |
1188 | + #include "nautilus-search-engine-simple.h" |
1189 | ++#include "nautilus-search-engine-private.h" |
1190 | + #include "nautilus-ui-utilities.h" |
1191 | + #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH |
1192 | + #include "nautilus-debug.h" |
1193 | +@@ -35,7 +37,7 @@ |
1194 | + |
1195 | + enum |
1196 | + { |
1197 | +- PROP_RECURSIVE = 1, |
1198 | ++ PROP_0, |
1199 | + PROP_RUNNING, |
1200 | + NUM_PROPERTIES |
1201 | + }; |
1202 | +@@ -52,7 +54,6 @@ typedef struct |
1203 | + |
1204 | + GHashTable *visited; |
1205 | + |
1206 | +- gboolean recursive; |
1207 | + gint n_processed_files; |
1208 | + GList *hits; |
1209 | + |
1210 | +@@ -66,8 +67,6 @@ struct _NautilusSearchEngineSimple |
1211 | + NautilusQuery *query; |
1212 | + |
1213 | + SearchThreadData *active_search; |
1214 | +- |
1215 | +- gboolean recursive; |
1216 | + }; |
1217 | + |
1218 | + static void nautilus_search_provider_init (NautilusSearchProviderInterface *iface); |
1219 | +@@ -208,6 +207,9 @@ static void |
1220 | + visit_directory (GFile *dir, |
1221 | + SearchThreadData *data) |
1222 | + { |
1223 | ++ g_autoptr (GPtrArray) date_range = NULL; |
1224 | ++ NautilusQuerySearchType type; |
1225 | ++ NautilusQueryRecursive recursive; |
1226 | + GFileEnumerator *enumerator; |
1227 | + GFileInfo *info; |
1228 | + GFile *child; |
1229 | +@@ -238,10 +240,12 @@ visit_directory (GFile *dir, |
1230 | + return; |
1231 | + } |
1232 | + |
1233 | ++ type = nautilus_query_get_search_type (data->query); |
1234 | ++ recursive = nautilus_query_get_recursive (data->query); |
1235 | ++ date_range = nautilus_query_get_date_range (data->query); |
1236 | ++ |
1237 | + while ((info = g_file_enumerator_next_file (enumerator, data->cancellable, NULL)) != NULL) |
1238 | + { |
1239 | +- g_autoptr (GPtrArray) date_range = NULL; |
1240 | +- |
1241 | + display_name = g_file_info_get_display_name (info); |
1242 | + if (display_name == NULL) |
1243 | + { |
1244 | +@@ -276,15 +280,12 @@ visit_directory (GFile *dir, |
1245 | + mtime = g_file_info_get_attribute_uint64 (info, "time::modified"); |
1246 | + atime = g_file_info_get_attribute_uint64 (info, "time::access"); |
1247 | + |
1248 | +- date_range = nautilus_query_get_date_range (data->query); |
1249 | + if (found && date_range != NULL) |
1250 | + { |
1251 | +- NautilusQuerySearchType type; |
1252 | + guint64 current_file_time; |
1253 | + |
1254 | + initial_date = g_ptr_array_index (date_range, 0); |
1255 | + end_date = g_ptr_array_index (date_range, 1); |
1256 | +- type = nautilus_query_get_search_type (data->query); |
1257 | + |
1258 | + if (type == NAUTILUS_QUERY_SEARCH_TYPE_LAST_ACCESS) |
1259 | + { |
1260 | +@@ -322,7 +323,10 @@ visit_directory (GFile *dir, |
1261 | + send_batch (data); |
1262 | + } |
1263 | + |
1264 | +- if (data->engine->recursive && g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY) |
1265 | ++ if (recursive != NAUTILUS_QUERY_RECURSIVE_NEVER && |
1266 | ++ g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY && |
1267 | ++ is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_NON_INDEXED, |
1268 | ++ recursive, child)) |
1269 | + { |
1270 | + id = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_ID_FILE); |
1271 | + visited = FALSE; |
1272 | +@@ -438,9 +442,9 @@ nautilus_search_engine_simple_set_query (NautilusSearchProvider *provider, |
1273 | + { |
1274 | + NautilusSearchEngineSimple *simple = NAUTILUS_SEARCH_ENGINE_SIMPLE (provider); |
1275 | + |
1276 | +- g_object_ref (query); |
1277 | + g_clear_object (&simple->query); |
1278 | +- simple->query = query; |
1279 | ++ |
1280 | ++ simple->query = g_object_ref (query); |
1281 | + } |
1282 | + |
1283 | + static gboolean |
1284 | +@@ -453,30 +457,6 @@ nautilus_search_engine_simple_is_running (NautilusSearchProvider *provider) |
1285 | + return simple->active_search != NULL; |
1286 | + } |
1287 | + |
1288 | +-static void |
1289 | +-nautilus_search_engine_simple_set_property (GObject *object, |
1290 | +- guint arg_id, |
1291 | +- const GValue *value, |
1292 | +- GParamSpec *pspec) |
1293 | +-{ |
1294 | +- NautilusSearchEngineSimple *engine = NAUTILUS_SEARCH_ENGINE_SIMPLE (object); |
1295 | +- |
1296 | +- switch (arg_id) |
1297 | +- { |
1298 | +- case PROP_RECURSIVE: |
1299 | +- { |
1300 | +- engine->recursive = g_value_get_boolean (value); |
1301 | +- } |
1302 | +- break; |
1303 | +- |
1304 | +- default: |
1305 | +- { |
1306 | +- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, arg_id, pspec); |
1307 | +- } |
1308 | +- break; |
1309 | +- } |
1310 | +-} |
1311 | +- |
1312 | + static void |
1313 | + nautilus_search_engine_simple_get_property (GObject *object, |
1314 | + guint arg_id, |
1315 | +@@ -492,12 +472,6 @@ nautilus_search_engine_simple_get_property (GObject *object, |
1316 | + g_value_set_boolean (value, nautilus_search_engine_simple_is_running (NAUTILUS_SEARCH_PROVIDER (engine))); |
1317 | + } |
1318 | + break; |
1319 | +- |
1320 | +- case PROP_RECURSIVE: |
1321 | +- { |
1322 | +- g_value_set_boolean (value, engine->recursive); |
1323 | +- } |
1324 | +- break; |
1325 | + } |
1326 | + } |
1327 | + |
1328 | +@@ -518,20 +492,6 @@ nautilus_search_engine_simple_class_init (NautilusSearchEngineSimpleClass *class |
1329 | + gobject_class = G_OBJECT_CLASS (class); |
1330 | + gobject_class->finalize = finalize; |
1331 | + gobject_class->get_property = nautilus_search_engine_simple_get_property; |
1332 | +- gobject_class->set_property = nautilus_search_engine_simple_set_property; |
1333 | +- |
1334 | +- /** |
1335 | +- * NautilusSearchEngineSimple::recursive: |
1336 | +- * |
1337 | +- * Whether the search is recursive or not. |
1338 | +- */ |
1339 | +- g_object_class_install_property (gobject_class, |
1340 | +- PROP_RECURSIVE, |
1341 | +- g_param_spec_boolean ("recursive", |
1342 | +- "recursive", |
1343 | +- "recursive", |
1344 | +- FALSE, |
1345 | +- G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); |
1346 | + |
1347 | + /** |
1348 | + * NautilusSearchEngine::running: |
1349 | +diff --git a/src/nautilus-search-engine-tracker.c b/src/nautilus-search-engine-tracker.c |
1350 | +index 8218ea3..98f3c79 100644 |
1351 | +--- a/src/nautilus-search-engine-tracker.c |
1352 | ++++ b/src/nautilus-search-engine-tracker.c |
1353 | +@@ -22,7 +22,7 @@ |
1354 | + #include <config.h> |
1355 | + #include "nautilus-search-engine-tracker.h" |
1356 | + |
1357 | +-#include "nautilus-global-preferences.h" |
1358 | ++#include "nautilus-search-engine-private.h" |
1359 | + #include "nautilus-search-hit.h" |
1360 | + #include "nautilus-search-provider.h" |
1361 | + #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH |
1362 | +@@ -296,7 +296,6 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider) |
1363 | + GString *sparql; |
1364 | + GList *mimetypes, *l; |
1365 | + gint mime_count; |
1366 | +- gboolean recursive; |
1367 | + GPtrArray *date_range; |
1368 | + |
1369 | + tracker = NAUTILUS_SEARCH_ENGINE_TRACKER (provider); |
1370 | +@@ -325,10 +324,6 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider) |
1371 | + return; |
1372 | + } |
1373 | + |
1374 | +- recursive = g_settings_get_enum (nautilus_preferences, "recursive-search") == NAUTILUS_SPEED_TRADEOFF_LOCAL_ONLY || |
1375 | +- g_settings_get_enum (nautilus_preferences, "recursive-search") == NAUTILUS_SPEED_TRADEOFF_ALWAYS; |
1376 | +- tracker->recursive = recursive; |
1377 | +- |
1378 | + tracker->fts_enabled = nautilus_query_get_search_content (tracker->query); |
1379 | + |
1380 | + query_text = nautilus_query_get_text (tracker->query); |
1381 | +@@ -476,16 +471,21 @@ static void |
1382 | + nautilus_search_engine_tracker_set_query (NautilusSearchProvider *provider, |
1383 | + NautilusQuery *query) |
1384 | + { |
1385 | ++ g_autoptr(GFile) location = NULL; |
1386 | + NautilusSearchEngineTracker *tracker; |
1387 | + |
1388 | + tracker = NAUTILUS_SEARCH_ENGINE_TRACKER (provider); |
1389 | ++ location = nautilus_query_get_location (query); |
1390 | + |
1391 | + if (!tracker->available) |
1392 | + return; |
1393 | + |
1394 | +- g_object_ref (query); |
1395 | + g_clear_object (&tracker->query); |
1396 | +- tracker->query = query; |
1397 | ++ |
1398 | ++ tracker->query = g_object_ref (query); |
1399 | ++ tracker->recursive = is_recursive_search (NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED, |
1400 | ++ nautilus_query_get_recursive (query), |
1401 | ++ location); |
1402 | + } |
1403 | + |
1404 | + static gboolean |
1405 | +diff --git a/src/nautilus-search-engine.c b/src/nautilus-search-engine.c |
1406 | +index 209bd4f..a545160 100644 |
1407 | +--- a/src/nautilus-search-engine.c |
1408 | ++++ b/src/nautilus-search-engine.c |
1409 | +@@ -20,12 +20,14 @@ |
1410 | + */ |
1411 | + |
1412 | + #include <config.h> |
1413 | +- |
1414 | +-#include <glib/gi18n.h> |
1415 | +-#include "nautilus-search-provider.h" |
1416 | + #include "nautilus-search-engine.h" |
1417 | + #include "nautilus-search-engine-simple.h" |
1418 | ++#include "nautilus-search-engine-private.h" |
1419 | ++ |
1420 | + #include "nautilus-search-engine-model.h" |
1421 | ++#include "nautilus-search-provider.h" |
1422 | ++#include "nautilus-file.h" |
1423 | ++#include <glib/gi18n.h> |
1424 | + #define DEBUG_FLAG NAUTILUS_DEBUG_SEARCH |
1425 | + #include "nautilus-debug.h" |
1426 | + #include "nautilus-search-engine-tracker.h" |
1427 | +@@ -417,12 +419,30 @@ nautilus_search_engine_get_model_provider (NautilusSearchEngine *engine) |
1428 | + return priv->model; |
1429 | + } |
1430 | + |
1431 | +-NautilusSearchEngineSimple * |
1432 | +-nautilus_search_engine_get_simple_provider (NautilusSearchEngine *engine) |
1433 | ++gboolean |
1434 | ++is_recursive_search (NautilusSearchEngineType engine_type, |
1435 | ++ NautilusQueryRecursive recursive, |
1436 | ++ GFile *location) |
1437 | + { |
1438 | +- NautilusSearchEnginePrivate *priv; |
1439 | ++ switch (recursive) |
1440 | ++ { |
1441 | ++ case NAUTILUS_QUERY_RECURSIVE_NEVER: |
1442 | ++ return FALSE; |
1443 | + |
1444 | +- priv = nautilus_search_engine_get_instance_private (engine); |
1445 | ++ case NAUTILUS_QUERY_RECURSIVE_ALWAYS: |
1446 | ++ return TRUE; |
1447 | ++ |
1448 | ++ case NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY: |
1449 | ++ return engine_type == NAUTILUS_SEARCH_ENGINE_TYPE_INDEXED; |
1450 | ++ |
1451 | ++ case NAUTILUS_QUERY_RECURSIVE_LOCAL_ONLY: |
1452 | ++ { |
1453 | ++ NautilusFile *file = nautilus_file_get (location); |
1454 | ++ gboolean remote = !nautilus_file_is_remote (file); |
1455 | ++ nautilus_file_unref (file); |
1456 | ++ return remote; |
1457 | ++ } |
1458 | ++ } |
1459 | + |
1460 | +- return priv->simple; |
1461 | ++ return TRUE; |
1462 | + } |
1463 | +diff --git a/src/nautilus-search-engine.h b/src/nautilus-search-engine.h |
1464 | +index 0416e83..435908a 100644 |
1465 | +--- a/src/nautilus-search-engine.h |
1466 | ++++ b/src/nautilus-search-engine.h |
1467 | +@@ -42,8 +42,6 @@ struct _NautilusSearchEngineClass |
1468 | + NautilusSearchEngine *nautilus_search_engine_new (void); |
1469 | + NautilusSearchEngineModel * |
1470 | + nautilus_search_engine_get_model_provider (NautilusSearchEngine *engine); |
1471 | +-NautilusSearchEngineSimple * |
1472 | +- nautilus_search_engine_get_simple_provider (NautilusSearchEngine *engine); |
1473 | + |
1474 | + G_END_DECLS |
1475 | + |
1476 | +diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c |
1477 | +index cdadc08..b95babf 100644 |
1478 | +--- a/src/nautilus-shell-search-provider.c |
1479 | ++++ b/src/nautilus-shell-search-provider.c |
1480 | +@@ -426,15 +426,32 @@ search_add_volumes_and_bookmarks (PendingSearch *search) |
1481 | + g_object_unref (volume_monitor); |
1482 | + } |
1483 | + |
1484 | ++static NautilusQuery* |
1485 | ++shell_query_new (gchar **terms) |
1486 | ++{ |
1487 | ++ NautilusQuery *query; |
1488 | ++ g_autoptr (GFile) home = NULL; |
1489 | ++ g_autofree gchar *terms_joined = NULL; |
1490 | ++ |
1491 | ++ terms_joined = g_strjoinv (" ", terms); |
1492 | ++ home = g_file_new_for_path (g_get_home_dir ()); |
1493 | ++ |
1494 | ++ query = nautilus_query_new (); |
1495 | ++ nautilus_query_set_show_hidden_files (query, FALSE); |
1496 | ++ nautilus_query_set_recursive (query, NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY); |
1497 | ++ nautilus_query_set_text (query, terms_joined); |
1498 | ++ nautilus_query_set_location (query, home); |
1499 | ++ |
1500 | ++ return query; |
1501 | ++} |
1502 | ++ |
1503 | + static void |
1504 | + execute_search (NautilusShellSearchProvider *self, |
1505 | + GDBusMethodInvocation *invocation, |
1506 | + gchar **terms) |
1507 | + { |
1508 | +- gchar *terms_joined; |
1509 | + NautilusQuery *query; |
1510 | + PendingSearch *pending_search; |
1511 | +- GFile *home; |
1512 | + |
1513 | + cancel_current_search (self); |
1514 | + |
1515 | +@@ -446,13 +463,7 @@ execute_search (NautilusShellSearchProvider *self, |
1516 | + return; |
1517 | + } |
1518 | + |
1519 | +- terms_joined = g_strjoinv (" ", terms); |
1520 | +- home = g_file_new_for_path (g_get_home_dir ()); |
1521 | +- |
1522 | +- query = nautilus_query_new (); |
1523 | +- nautilus_query_set_show_hidden_files (query, FALSE); |
1524 | +- nautilus_query_set_text (query, terms_joined); |
1525 | +- nautilus_query_set_location (query, home); |
1526 | ++ query = shell_query_new (terms); |
1527 | + |
1528 | + pending_search = g_slice_new0 (PendingSearch); |
1529 | + pending_search->invocation = g_object_ref (invocation); |
1530 | +@@ -479,9 +490,6 @@ execute_search (NautilusShellSearchProvider *self, |
1531 | + nautilus_search_provider_set_query (NAUTILUS_SEARCH_PROVIDER (pending_search->engine), |
1532 | + query); |
1533 | + nautilus_search_provider_start (NAUTILUS_SEARCH_PROVIDER (pending_search->engine)); |
1534 | +- |
1535 | +- g_clear_object (&home); |
1536 | +- g_free (terms_joined); |
1537 | + } |
1538 | + |
1539 | + static gboolean |
1540 | +@@ -713,13 +721,9 @@ handle_launch_search (NautilusShellSearchProvider2 *skeleton, |
1541 | + gpointer user_data) |
1542 | + { |
1543 | + GApplication *app = g_application_get_default (); |
1544 | +- gchar *string = g_strjoinv (" ", terms); |
1545 | +- gchar *uri = nautilus_get_home_directory_uri (); |
1546 | ++ g_autoptr (NautilusQuery) query = shell_query_new (terms); |
1547 | + |
1548 | +- nautilus_application_search (NAUTILUS_APPLICATION (app), uri, string); |
1549 | +- |
1550 | +- g_free (string); |
1551 | +- g_free (uri); |
1552 | ++ nautilus_application_search (NAUTILUS_APPLICATION (app), query); |
1553 | + |
1554 | + nautilus_shell_search_provider2_complete_launch_search (skeleton, invocation); |
1555 | + return TRUE; |
1556 | +diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c |
1557 | +index a9911ee..6935de3 100644 |
1558 | +--- a/src/nautilus-window-slot.c |
1559 | ++++ b/src/nautilus-window-slot.c |
1560 | +@@ -100,6 +100,7 @@ typedef struct |
1561 | + |
1562 | + /* Query editor */ |
1563 | + NautilusQueryEditor *query_editor; |
1564 | ++ NautilusQuery *pending_search_query; |
1565 | + gulong qe_changed_id; |
1566 | + gulong qe_cancel_id; |
1567 | + gulong qe_activated_id; |
1568 | +@@ -110,7 +111,6 @@ typedef struct |
1569 | + * finish. Used for showing a spinner to provide feedback to the user. */ |
1570 | + gboolean allow_stop; |
1571 | + gboolean needs_reload; |
1572 | +- gchar *pending_search_text; |
1573 | + |
1574 | + /* New location. */ |
1575 | + GFile *pending_location; |
1576 | +@@ -361,9 +361,9 @@ update_search_visible (NautilusWindowSlot *self) |
1577 | + g_object_unref (query); |
1578 | + } |
1579 | + |
1580 | +- if (priv->pending_search_text) |
1581 | ++ if (priv->pending_search_query) |
1582 | + { |
1583 | +- nautilus_window_slot_search (self, g_strdup (priv->pending_search_text)); |
1584 | ++ nautilus_window_slot_search (self, g_object_ref (priv->pending_search_query)); |
1585 | + } |
1586 | + } |
1587 | + |
1588 | +@@ -589,17 +589,13 @@ nautilus_window_slot_get_search_visible (NautilusWindowSlot *self) |
1589 | + |
1590 | + void |
1591 | + nautilus_window_slot_search (NautilusWindowSlot *self, |
1592 | +- const gchar *text) |
1593 | ++ NautilusQuery *query) |
1594 | + { |
1595 | + NautilusWindowSlotPrivate *priv; |
1596 | + NautilusView *view; |
1597 | + |
1598 | + priv = nautilus_window_slot_get_instance_private (self); |
1599 | +- if (priv->pending_search_text) |
1600 | +- { |
1601 | +- g_free (priv->pending_search_text); |
1602 | +- priv->pending_search_text = NULL; |
1603 | +- } |
1604 | ++ g_clear_object (&priv->pending_search_query); |
1605 | + |
1606 | + view = nautilus_window_slot_get_current_view (self); |
1607 | + /* We could call this when the location is still being checked in the |
1608 | +@@ -608,11 +604,11 @@ nautilus_window_slot_search (NautilusWindowSlot *self, |
1609 | + if (view) |
1610 | + { |
1611 | + nautilus_window_slot_set_search_visible (self, TRUE); |
1612 | +- nautilus_query_editor_set_text (priv->query_editor, text); |
1613 | ++ nautilus_query_editor_set_query (priv->query_editor, query); |
1614 | + } |
1615 | + else |
1616 | + { |
1617 | +- priv->pending_search_text = g_strdup (text); |
1618 | ++ priv->pending_search_query = g_object_ref (query); |
1619 | + } |
1620 | + } |
1621 | + |
1622 | +@@ -2814,6 +2810,7 @@ nautilus_window_slot_dispose (GObject *object) |
1623 | + g_clear_object (&priv->current_location_bookmark); |
1624 | + g_clear_object (&priv->last_location_bookmark); |
1625 | + g_clear_object (&priv->slot_action_group); |
1626 | ++ g_clear_object (&priv->pending_search_query); |
1627 | + |
1628 | + g_clear_pointer (&priv->find_mount_cancellable, g_cancellable_cancel); |
1629 | + |
1630 | +diff --git a/src/nautilus-window-slot.h b/src/nautilus-window-slot.h |
1631 | +index 573357d..f67b6ab 100644 |
1632 | +--- a/src/nautilus-window-slot.h |
1633 | ++++ b/src/nautilus-window-slot.h |
1634 | +@@ -112,7 +112,7 @@ void nautilus_window_slot_set_active (NautilusWindowSlot * |
1635 | + gboolean nautilus_window_slot_get_loading (NautilusWindowSlot *slot); |
1636 | + |
1637 | + void nautilus_window_slot_search (NautilusWindowSlot *slot, |
1638 | +- const gchar *text); |
1639 | ++ NautilusQuery *query); |
1640 | + |
1641 | + gboolean nautilus_window_slot_handles_location (NautilusWindowSlot *self, |
1642 | + GFile *location); |
1643 | +diff --git a/src/nautilus-window.c b/src/nautilus-window.c |
1644 | +index a23d515..8eab985 100644 |
1645 | +--- a/src/nautilus-window.c |
1646 | ++++ b/src/nautilus-window.c |
1647 | +@@ -3100,14 +3100,14 @@ nautilus_window_show_about_dialog (NautilusWindow *window) |
1648 | + |
1649 | + void |
1650 | + nautilus_window_search (NautilusWindow *window, |
1651 | +- const gchar *text) |
1652 | ++ NautilusQuery *query) |
1653 | + { |
1654 | + NautilusWindowSlot *active_slot; |
1655 | + |
1656 | + active_slot = nautilus_window_get_active_slot (window); |
1657 | + if (active_slot) |
1658 | + { |
1659 | +- nautilus_window_slot_search (active_slot, text); |
1660 | ++ nautilus_window_slot_search (active_slot, query); |
1661 | + } |
1662 | + else |
1663 | + { |
1664 | +diff --git a/src/nautilus-window.h b/src/nautilus-window.h |
1665 | +index 39b16e7..c1196d3 100644 |
1666 | +--- a/src/nautilus-window.h |
1667 | ++++ b/src/nautilus-window.h |
1668 | +@@ -135,7 +135,7 @@ void nautilus_window_end_dnd (NautilusWindow *window, |
1669 | + GdkDragContext *context); |
1670 | + |
1671 | + void nautilus_window_search (NautilusWindow *window, |
1672 | +- const gchar *text); |
1673 | ++ NautilusQuery *query); |
1674 | + |
1675 | + void nautilus_window_initialize_slot (NautilusWindow *window, |
1676 | + NautilusWindowSlot *slot, |
1677 | diff --git a/debian/patches/series b/debian/patches/series |
1678 | index 0db84cf..be13b9e 100644 |
1679 | --- a/debian/patches/series |
1680 | +++ b/debian/patches/series |
1681 | @@ -1,3 +1,5 @@ |
1682 | +Revert-Revert-nautilus-file-Don-t-show-thumbnails-for-the.patch |
1683 | +Revert-Revert-files-view-Remove-new-empty-folder-name-sug.patch |
1684 | multiarch_fallback.patch |
1685 | 03_translations_list_update.patch |
1686 | 04_suppress_umount_in_ltsp.patch |
1687 | @@ -15,6 +17,7 @@ ubuntu_backspace_behaviour.patch |
1688 | #Needs updating |
1689 | #16_unity_new_documents.patch |
1690 | 0015-tracker-search-engine-don-t-start-it-if-not-availabl.patch |
1691 | +query-add-recursive-flags-and-use-it-in-search-engines.patch |
1692 | 0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch |
1693 | 0017-recent-add-function-to-update-manager-on-file-rename.patch |
1694 | 0018-search-engine-add-locate-based-search-engine.patch |
1695 | @@ -22,3 +25,4 @@ appstream-compulsory.patch |
1696 | server_list_segfault.patch |
1697 | clear_pending_selection.patch |
1698 | git_middle_tab.patch |
1699 | +nautilusgtkplacesview-show-error-if-volume-is-not-mounted.patch |
1700 | diff --git a/meson.build b/meson.build |
1701 | index 18e645a..6256193 100644 |
1702 | --- a/meson.build |
1703 | +++ b/meson.build |
1704 | @@ -1,5 +1,5 @@ |
1705 | project ('nautilus', 'c', |
1706 | - version: '3.26.3', |
1707 | + version: '3.26.3.1', |
1708 | meson_version: '>=0.40.0', |
1709 | license: 'GPL3+') |
1710 | |
1711 | diff --git a/src/nautilus-file.c b/src/nautilus-file.c |
1712 | index fc765be..d6ac35a 100644 |
1713 | --- a/src/nautilus-file.c |
1714 | +++ b/src/nautilus-file.c |
1715 | @@ -5496,7 +5496,7 @@ nautilus_thumbnail_is_limited_by_zoom (int size, |
1716 | |
1717 | zoom_level = size * scale; |
1718 | |
1719 | - if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_STANDARD) |
1720 | + if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_SMALL) |
1721 | { |
1722 | return TRUE; |
1723 | } |
1724 | diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c |
1725 | index 9b7b9b9..8784f63 100644 |
1726 | --- a/src/nautilus-files-view.c |
1727 | +++ b/src/nautilus-files-view.c |
1728 | @@ -2047,8 +2047,9 @@ static void |
1729 | nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view, |
1730 | gboolean with_selection) |
1731 | { |
1732 | - g_autoptr (NautilusDirectory) containing_directory = NULL; |
1733 | + NautilusDirectory *containing_directory; |
1734 | NautilusFilesViewPrivate *priv; |
1735 | + GList *selection; |
1736 | g_autofree char *uri = NULL; |
1737 | g_autofree char *common_prefix = NULL; |
1738 | |
1739 | @@ -2062,13 +2063,8 @@ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view, |
1740 | uri = nautilus_files_view_get_backing_uri (view); |
1741 | containing_directory = nautilus_directory_get_by_uri (uri); |
1742 | |
1743 | - if (with_selection) |
1744 | - { |
1745 | - GList *selection; |
1746 | - selection = nautilus_view_get_selection (NAUTILUS_VIEW (view)); |
1747 | - common_prefix = nautilus_get_common_filename_prefix (selection, MIN_COMMON_FILENAME_PREFIX_LENGTH); |
1748 | - nautilus_file_list_free (selection); |
1749 | - } |
1750 | + selection = nautilus_view_get_selection (NAUTILUS_VIEW (view)); |
1751 | + common_prefix = nautilus_get_common_filename_prefix (selection, MIN_COMMON_FILENAME_PREFIX_LENGTH); |
1752 | |
1753 | priv->new_folder_controller = |
1754 | nautilus_new_folder_dialog_controller_new (nautilus_files_view_get_containing_window (view), |
1755 | @@ -2084,6 +2080,9 @@ nautilus_files_view_new_folder_dialog_new (NautilusFilesView *view, |
1756 | "cancelled", |
1757 | (GCallback) new_folder_dialog_controller_on_cancelled, |
1758 | view); |
1759 | + |
1760 | + nautilus_file_list_free (selection); |
1761 | + nautilus_directory_unref (containing_directory); |
1762 | } |
1763 | |
1764 | typedef struct |
1765 | diff --git a/src/nautilus-trash-monitor.c b/src/nautilus-trash-monitor.c |
1766 | index 97f4874..1e156e1 100644 |
1767 | --- a/src/nautilus-trash-monitor.c |
1768 | +++ b/src/nautilus-trash-monitor.c |
1769 | @@ -29,7 +29,7 @@ |
1770 | #include <gio/gio.h> |
1771 | #include <string.h> |
1772 | |
1773 | -#define UPDATE_RATE_SECONDS 5 |
1774 | +#define UPDATE_RATE_SECONDS 1 |
1775 | |
1776 | struct NautilusTrashMonitorDetails |
1777 | { |
Commit message here looks broken: https:/ /git.launchpad. net/~3v1n0/ ubuntu/ +source/ nautilus/ commit/ ?h=ubuntu/ master- fix-recursive- engines& id=817d15262ba3 38c873f1595a042 957895e926f79