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