Commit graph

22237 commits

Author SHA1 Message Date
Antoine Jacoutot
4e43e9efca tag-manager: Search for tracker3 in PATH
Tracker 3 migration code tries to spawn tracker3 binary using
G_SPAWN_SEARCH_PATH_FROM_ENVP flag. However, tracker3 is installed under
/usr/local/bin/ on OpenBSD which isn't searched by envp. So the migration fails
with the following warnings: "Tracker 2 migration: Couldn't run `tracker3`:
Failed to execute child process "tracker3" (No such file or directory)."
Let's use G_SPAWN_SEARCH_PATH instead of G_SPAWN_SEARCH_PATH_FROM_ENVP to fix
this issue.
2020-11-19 08:04:16 +00:00
Felipe Borges
23f91f2d7b ci: Add libportal-devel to Dockerfile
https://src.fedoraproject.org/rpms/libportal
2020-11-18 15:30:13 +00:00
Felipe Borges
ece6b82570 files-view: Use xdg-desktop-portal for setting Wallpaper
If libportal was found during build, we can use libportal to set
the Wallpaper. Otherwise, we fallback to the old Nautilus behavior
of directly copying the image and updating the gsetting.

Fixes #795
2020-11-18 15:30:13 +00:00
Felipe Borges
7cab1cd762 build, flatpak: Add libportal dependency
Fixes #795
2020-11-18 15:30:13 +00:00
James Westman
0645e3b9aa image properties: Handle rotated images
Images with EXIF metadata can contain an orientation tag, which indicates the
image should be rotated. In the Image tab of the Properties dialog, swap the
width and height if the image is rotated by 90 or 270 degrees.

Fixes #1590.
2020-11-18 15:17:43 +00:00
António Fernandes
9dbc32ded3 Revert "ci: Hardcode image version for style check job"
This reverts commit 831203e951.

The previous commit fixed the issue we were working around.
2020-11-18 15:02:55 +00:00
António Fernandes
3d68a895f0 canvas-dnd: Define function type the usual way
Defining an function type inline as a function parameter is a awkward
syntax and not used in our codebase except for this one occurence.

Although valid C, it confuses our style check tools, breaking the CI
style check [1] and failing to align parameters.

Instead, let's define a named function type to use as parameter type,
and fix parameter misalignment.

[1] 831203e951
2020-11-18 15:02:55 +00:00
Ondrej Holy
50edb805d2 batch-rename-utilities: Fix dialog crashes
The batch rename dialog crashes when it is opened for a second time.
This is because the TrackerSparqlConnection object is unreffed after
the first use. However, nautilus_tracker_get_miner_fs_connection
documentation clearly says that the returned should not be unreffed
because it is globally shared singleton. Let's remove the problematic
g_object_unref statement to fix the crashes.

https://gitlab.gnome.org/GNOME/nautilus/-/issues/1651
2020-11-18 08:49:44 +00:00
Emin Tufan Çetin
a875893386 Update Turkish translation 2020-11-11 16:42:08 +00:00
Bryan P
74e1e6098d properties-window.ui: Set "use_underline" property
To correctly setup the mnemonic character following an underscore in
a checkbox label.

Closes #1630
2020-11-01 23:09:44 +00:00
António Fernandes
3eb0a90f69 list-view: Fix double-click row check for gesture
Before porting to a GtkMultiPressGesture [1], for every double click,
we would get 2 events of type GDK_BUTTON_PRESS for each click and 1
event of type GDK_2BUTTON_PRESS after the second click [2]:

    1st click: GDK_BUTTON_PRESS
    2nd click: GDK_BUTTON_PRESS, followed by GDK_2BUTTON_PRESS

So, in order to ensure the double click happened within the same list
row, we used to save the clicked path for each GDK_BUTTON_PRESS event
and compare the last two saved paths during the GDK_2BUTTON_PRESS one.

However, now we only get a GtkMultiPressGEsture::pressed signal twice:

    1st click: ::pressed is emited with n_press = 1
    2st click: ::pressed is emited with n_press = 2

Yet, we are still saving the clicked path only when n_press = 1, so,
unless the user had already clicked this row before doing a double
click, the saved paths don't match and we ignore the double click.

Instead, it's enough to save the row path for the 1st click, as we
can compare it directly with row path on the 2nd click.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1599

[1] 13a8d3efac
[2] https://developer.gnome.org/gdk3/stable/gdk3-Events.html#GDK-2BUTTON-PRESS:CAPS
2020-10-27 13:29:25 +00:00
Juliano de Souza Camargo
e34325d3c7 Update Portuguese translation
(cherry picked from commit c1f7f3becf)
2020-10-23 11:29:47 +00:00
Fabio Tomat
5d9b631c80 Update Friulian translation 2020-10-18 15:15:37 +00:00
Juliano de Souza Camargo
4a09f99e53 Update Portuguese translation
(cherry picked from commit c31ed8fa3f)
2020-10-12 14:15:46 +00:00
Ondrej Holy
d584123d76 Post branch version bump to 40.alpha
Let's switch to the new versioning scheme:
https://discourse.gnome.org/t/new-gnome-versioning-scheme/4235
2020-10-02 14:37:52 +02:00
Ondrej Holy
8ed4a28f28 Release version 3.38.1 2020-10-02 14:18:30 +02:00
António Fernandes
6dfc1cd7b7 starred-directory: Remove unused variable
Leftover from 4ef151871b
2020-10-02 12:09:01 +01:00
António Fernandes
5a769fa178 tag-manager: Ignore starred files ouside $HOME
At the moment we restrict starring to within Home, but the database
might include URIs from outside of it. Such may happen after a file
move operation, as per the previous commit.

Keeping the moved URIs in the database is useful in case the move is
undone, because we change the URI back. But otherwise, the non-home
URIs remain in the database indefinitely.

So, let's filter them out when listing the starred files.
2020-10-02 12:09:00 +01:00
António Fernandes
135190900b tag-manager: Update starred URIs on move & rename
We don't rely on tracker-miner-fs's rename tracking for starred files
anymore, as explained in 29105fc9f6.

However, losing track of starred files, when they or their containing
folders are renamed or moved, is a major regression for this feature.

The common case is that the operation is performed using this very app,
so, we can largely restore the feature by updating URI on every rename
and move operation we perform.

Additionally, this allows us to finally close a couple of old issues.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/161
and fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/169
2020-10-02 09:32:12 +01:00
Yosef Or Boczko
8fd2e69730 Update Hebrew translation 2020-09-28 18:52:00 +00:00
Fabio Tomat
4592496792 Update Friulian translation 2020-09-24 13:29:30 +00:00
Stas Solovey
02b4367c3c Update Russian translation 2020-09-22 19:31:05 +00:00
Fabio Tomat
3b7aff56c9 Update Friulian translation 2020-09-22 07:25:50 +00:00
António Fernandes
553e59f68b file-utilities: Don't block main thread to restore from trash
The sync variants of file operations have been introduced for use in
integration tests. The async operations have been suffixed _async().

However, likely by mistake, in the restore from trash operation, the
call has been appended _sync rather than _async. [1]

This blocks the main thread until the operation task finishes, causing
a dead lock when the operation thread needs the main thread to show a
conflict dialog. This happens when restoring a file from trash if a new
file with the same name already exists in the original location.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/790

[1] commit ab31018cda
2020-09-21 12:50:57 +00:00
Ondrej Holy
36e505c12c file-operation: Prevent recursion to speed up emptying trash
Emptying trash within Nautilus is a bit slow in comparison to plain
`rm -r`. On my system, it took about 3 min to empty the trash with a
folder containing 600 000 files, which is not ideal as `rm -r` call
took just a few seconds. I found that `g_file_delete` is implemented
differently for locations provided by the trash backend. The trash
backend prevents modifications of trashed content thus the delete
operation is allowed only for the top-level files and folders. So it
is not necessary to recursive delete all files as the permission
denied error is returned anyway. Let's call `g_file_delete` only for
top-level items, which reduces the time necessary for emptying trash
from minutes to seconds...

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1589
2020-09-21 09:52:23 +00:00
Jwtiyar Nariman
9f344bfc2d Update Central Kurdish translation 2020-09-21 09:50:25 +00:00
António Fernandes
4ef151871b starred-directory: Deduplicate file unmonitoring 2020-09-19 13:51:13 +01:00
António Fernandes
f2237185a3 starred-directory: Actually implement ::force_reload
The code created to handle the NautilusTagManager::files-changed signal
has been reused for implemeting the NautilusDirectory::force_reload
virtual function.

This is conceptually wrong, because the update_files function doesn't
actually reload the file list. Also, as a side effect, it causes gone
files to reappear as "ghost files" (files without any attributes).

Instead, let's follow what NautilusSearchDirectory does: clear the
current file list after unmonitoring the files, and set the file list
anew the same way it's done on ::init.

Fixes:
https://gitlab.gnome.org/GNOME/nautilus/-/issues/162
https://gitlab.gnome.org/GNOME/nautilus/-/issues/167
2020-09-19 13:50:41 +01:00
Selyan Slimane AMIRI
3cdc56c44b Add Kabyle translation 2020-09-18 15:29:24 +00:00
Cheng-Chia Tseng
764fd74991 Update Chinese (Taiwan) translation 2020-09-18 12:17:48 +00:00
Juliano de Souza Camargo
c5fb0ca2a3 Update Portuguese translation 2020-09-16 17:38:02 +00:00
António Fernandes
ca6d56fef0 Revert "file: use emblems for files that use default icon"
This reverts commit 8efe356653.

It aggravated a performance bug. Reverting only on stable branches.

https://gitlab.gnome.org/GNOME/nautilus/-/issues/1226
2020-09-14 08:07:48 +02:00
Rūdolfs Mazurs
1de9f8ef3d Update Latvian translation 2020-09-12 09:40:18 +00:00
Ondrej Holy
5f1b9200cf Release version 3.38.0 2020-09-11 15:40:10 +02:00
Milo Casagrande
336950fefa Update Italian translation 2020-09-10 07:40:12 +00:00
António Fernandes
0b65c9d29c files-view: Add Extract/Compress menu section
"Extract Here", "Extract To…" and "Compress…" menu items are contained
by the extensions menu section, despite not being an extension.

This has worked fine until the extensions menu handling has been
reworked in commit bd81bd895f

This commit introduced a regressions which causes the Extract/Compress
items to disappear if actual extension menu items are added.

Since it was already conceptually wrong to have them in this section,
let's move these items into their own menu section to fix the bug.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1472
2020-09-08 19:30:05 +01:00
Ondrej Holy
831203e951 ci: Hardcode image version for style check job
The style check job currently fails as uncrustify from rawhide obviously
changed its behavior. It tries to change function pointer the following
way:

- gboolean (*each_function)(NautilusCanvasIcon *, gpointer),
+ gboolean ( *each_function )(NautilusCanvasIcon *, gpointer),

I don't think this is right, but don't know how to fix that ellegantly.
Note that this is because of "sp_before_ptr_star = false". Let's
hardcode the previous image varsion to avoid this change for now.
2020-09-07 09:59:59 +02:00
Ondrej Holy
a9d2562676 ci: Add missing git dependency
The style check job currently fails due to the missing git command, which
disappeared after the image update. Let's add the git command explicitely.
2020-09-07 09:59:59 +02:00
Dušan Kazik
b0b36a4c0b Update Slovak translation 2020-09-06 17:49:38 +00:00
Ask Hjorth Larsen
fed9dea410 Updated Danish translation 2020-09-06 14:37:12 +02:00
Balázs Meskó
455499aabb Update Hungarian translation 2020-09-05 21:36:22 +00:00
Ondrej Holy
b146c4fe4a ci: Add Tracker 3 dependencies
The fedora rawhide job fails currently as the image doesn't contain
Tracker 3 packages. Let's temporarily install the packages from
ssssam/tracker3 copr repository as they are not available yet in
rawhide repositories.
2020-09-04 17:48:32 +02:00
Ondrej Holy
af848924eb ci: Disable gpg signature checking
Creation of new image currently fails on gpg signature checking.
Let's use --nogpg temporarily to make it work again.
2020-09-04 17:48:32 +02:00
Ondrej Holy
b6f39cf87d Release version 3.37.92 2020-09-04 15:13:41 +02:00
Sam Thursfield
7cf268ab73 Import starred files data from Tracker 2.x
Starred files data is now migrated from the Tracker 2.x database if
found. This depends on the `tracker3` CLI tool, which should be
present anywhere that we find libtracker-sparql 3.0. The --2to3
export functionality was added in
https://gitlab.gnome.org/GNOME/tracker/-/merge_requests/308

If/when the migration completes successfully, a stamp file named
`~/.local/share/nautilus/tracker2-migration-complete` is created.
2020-09-02 18:50:17 +02:00
Sam Thursfield
bd30a21a0c Limit starred files to within user's home directory
Previously starred files were limited to directories indexed by Tracker.
Since the 'Port to Tracker 3' commit this is no longer the case.
However, to avoid unbounded growth in the starred files database we
want to prevent starring of network locations and removable devices
for now as these entries might go stale and we don't have any way
to clean them up.
2020-09-02 18:50:17 +02:00
Sam Thursfield
29105fc9f6 tag-manager: Track files rather than contents
Nautilus is a file manager, so we should star files.

Previously we starred the content resources extracted by Tracker Miner
FS, instead. This had the advantage that the stars would follow file
renames. It had the downside of being more complex and limited in
which files can be starred. In Tracker 2.x, the feature only worked
in folders indexed by Tracker Miner FS. With Tracker 3.x, it was
additionally limited to files where Tracker had extracted metadata
-- mainly just documents and media files.

This commit takes the simpler approach of storing the star against
the file URL. All files can now be starred, and stars will no longer
persist when a file is moved or renamed.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/160
2020-09-02 18:50:17 +02:00
Sam Thursfield
f9c79fce6d Use Tracker Miners inside Flatpak when not available on the host
This means the Nautilus flatpak will be able to use Tracker on systems
which don't have Tracker 3 available on the host. It comes at a cost of
increased resource consumption inside the Flatpak due running an extra
indexer process there.
2020-09-02 18:50:17 +02:00
Sam Thursfield
034a6a3394 flatpak: Update for Tracker Miners 3
Tracker 3 is provided in the Flatpak SDK, see
https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/630.

We still build tracker-miners inside the Flatpak bundle, so that the
org.freedesktop.Tracker3.Miner.Files settings schema is available, and
so that the tests that depend on Tracker can pass as part of the CI
build.

Access to the host's miners is controlled by the new
org.freedesktop.Tracker.portal process provided in Tracker 3.
2020-09-02 18:50:17 +02:00
Sam Thursfield
e3031953e4 search: Remove special characters from FTS searches
This fixes warnings that would appear of this form:

    ** (org.gnome.Nautilus:662563): WARNING **: 17:11:13.712: Provider NautilusSearchEngineTracker failed with error fts5: syntax error near "."
2020-09-02 18:50:17 +02:00