Commit graph

23936 commits

Author SHA1 Message Date
Sabri Ünal 179bce22ca Update Turkish translation 2023-05-01 10:25:05 +00:00
Andre Klapper 3136eea5bf DOAP: GNOME Discourse is a support-forum, not a mailing-list 2023-04-28 12:43:02 +02:00
Fabio Tomat 82c63ce4f8 Update Friulian translation 2023-04-28 08:09:54 +00:00
Corey Berla 93a714dfea view: Port to GtkColumnViewCell
This doesn't give us anything currently, but it's the direction that
GtkColumnView is going in, so let's use it.  Some minor modifications
are necessary to list-base where GridView and ColumnView share code.
2023-04-24 22:48:10 +00:00
Sayan Bhattacharjee 57b5cd68a6 window: fix incorrect string when moving files to trash
When moving multiple files to trash, the toast currently
says: "%d files deleted". However, "deleted" implies permanent
loss of data. But, in this case, we are just moving files to the trash.
This commit corrects the string to show the actual action:
"%d files moved to trash".

Also correct Translators comments to make it consistent with the action.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2830
2023-04-24 22:40:41 +00:00
Peter Eisenmann ce4fbafde7 progress-info-widget: use different icon for stopping operation
Using the same icon as for closing windows and dialogs can lead to user
confusion and thus accidental cancellation of operations.

This adds and uses a new icon, inspired by Builder's use of it to stop
ongoing operations.

Fixes #985
2023-04-24 22:33:13 +00:00
Peter Eisenmann d295140833 progress-info-widget: remove unused image definition 2023-04-24 22:33:13 +00:00
Ondrej Holy a986445936 freedesktop-dbus: Drop the connection property
The `NautilusFreedesktopDBus` class has a `connection` property, which
is not needed anymore after the commit 765b4d24. Let's drop that property
now. This effectively reverts a big part of commit 2293e813.

Related: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1134
2023-04-24 14:29:55 +00:00
Corey Berla f20441f7ed file-operations: Handle errors properly in delete_files_recursively
The callback function in delete_files_recursively() uses the results
from its GError to determine if it should call
nautilus_file_changes_queue_file_removed() (which ultimately calls the
list-base remove_file() function).

This normally, works as expected, except when one of the child
files fails to delete.  We check for recursive deletion failures, but
we never get the error that caused that failure.  This means that the
callback function will believe that the parent folder was deleted
(when it really wasn't), and the item will disappear from the view in
Nautilus because of the call to nautilus_file_changes_queue_file_removed().

If we weren't successful at deleting, but there's no error, that means
that a recursive call to delete failed.  In that case let's generate
our own error.

Fixes: #517
2023-04-24 14:20:54 +00:00
Corey Berla 7c9df6a7fc Apply 1 suggestion(s) to 1 file(s) 2023-04-24 13:44:22 +00:00
Corey Berla f949b3ab39 properties-window: Port GtkComboBox to GtkDropDown 2023-04-24 13:44:22 +00:00
António Fernandes 1454c03e7c gitignore: Ignore flatpak-builder state dir 2023-04-24 09:46:03 +01:00
António Fernandes fc8feaea80 general: Fix indentation nitpicks
Pass new uncrustify criteria. No logic changes.
2023-04-23 22:33:28 +01:00
António Fernandes eb6f82495e README: Provide instructions to update default branch
Adapted from gnome-software
2023-04-23 17:56:37 +00:00
Peter Eisenmann 403cfb9755 general: Adjust to renamed development branch
Part of https://gitlab.gnome.org/GNOME/nautilus/-/issues/2678
2023-04-23 15:23:33 +00:00
António Fernandes dba5684c99 Post-branching version bump 2023-04-23 15:14:30 +00:00
António Fernandes a3fda22858 Release version 44.1 2023-04-23 00:12:42 +01:00
António Fernandes ee1d823737 build: Bump gtk depencency micro version
It includes the GTK bugfix mentioned in 2e10ed11d9

As we have removed the workaround, we cannot accept a GTK
version without that bugfix, because that would cause a
regression.

And we can't restore the workaround either, because it
misbehaves when using the fixed GTK version.

This leaves us with no other choice than requiring the
fixed GTK version.
2023-04-22 21:54:36 +01:00
Corey Berla f1bb8e4301 Revert "files-view: Focus view items directly"
This reverts commit 9ecd422cc7.

Its commit message is misleading. Maybe it had such a side effect, 
but the issue it fixed was actually a GTK bug which got fixed in the 
meantime: https://gitlab.gnome.org/GNOME/gtk/-/commit/8455b9ac74d5337429a1a14eb>

Also, reverting it fixes a new bug: the first item is selected when
the item which was selected has been deleted. Next item should be 
selected instead.
2023-04-22 20:43:10 +00:00
Peter Eisenmann b68219157a grid-cell-ui: use dim-label style for captions
In 098f6a43d7 the style was changed from
dim-label to caption. For consistency with list-view columns and to have
less visual noise, add the dim-label style class back.

Fixes #2876
2023-04-21 16:12:28 +00:00
Carlos Garnacho 9ff35c642d flatpak: Fix Tracker3 access to portal
At some point, the flatpak command line interface changed so it is not
possible to add multiple values to a same key with a single --add-policy
call. Doing this now results in a single value added, with the ';'
escaped, this breaks Tracker portal access and results in Nautilus resorting
to the built-in miner instance.

It is however possible to call --add-policy multiple times to make
a multi-valued key, this restores the intended behavior and provides
access to the two tracker:FileSystem and tracker:Documents graphs.
Adapt the flatpak manifest to do this.

Closes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2838
2023-04-21 07:26:32 +00:00
Corey Berla f763e1f97c window: Dismiss previous undo toast when undo action has changed
We present a new toast every time the undo action changed which
is confusing because you might have several undo toasts appearing
over each other.  To complicate matters, the previous undo toasts
lie (undo'ing would actually undo a different action).

There was a proposal in #2350 to batch undo toasts, but that's problematic
because our undo manager is designed to undo exactly 1 action,
we do not have an undo stack.

The more straightforward solution seems to be simply dismissing the
old undo toasts, when we popup a new undo toast.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2350
2023-04-21 06:54:06 +00:00
Sebastian Keller a76d23f79e file: Re-use local time zone when generating date string
Whenever g_time_zone_new_local() is called it has to check the file
system for changes, because the system's time zone might have changed
since the last call. This function was called multiple times for each
file when generating the date string, which was causing some unnecessary
overhead.

This changes the code to re-use the local time zone from the first call.
2023-04-20 21:28:10 +02:00
António Fernandes ad18733aca window-slot: Make ownership transfer of pending location explicit 2023-04-20 13:44:55 +00:00
Gary Li c02b2204c7 nautilusgtkplacessidebar: simplify setter logic with g_set_object
Use g_set_object to simplify setter logic and avoid issues if
current_location == location.
2023-04-20 13:44:55 +00:00
Gary Li 59cb3c4529 application: Take reference of GFile location when cloning window
Nautilus crashes under d45b820d when we open a second window and
in both windows navigate to a common new location.

This is caused by incorrect reference management in action_clone_window,
where neither nautilus_window_slot_get_location nor
nautilus_window_slot_get_pending_location increases the ref count of
the GFile location. g_autoptr would cause location to be prematurely
freed.

Take the reference of location to allow g_autoptr to work correctly for
all branches of action_clone_window.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2858
2023-04-20 13:44:55 +00:00
Peter Eisenmann 4b646bcd1d properties-window: use property row style for security context
Fixes #2767
2023-04-20 01:00:42 +00:00
Sam Hewitt 9a7e8832f5 style: Add HC outlines for list view
Grid view selections feature a border for increased visibility.

Our list view lacks that because it adds custom padding, so we need
to add it as a custom style.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2909
2023-04-15 22:04:49 +01:00
António Fernandes b33bc6428c style: Drop view item color overrides
We've added them because the colors assigned by the default stylesheet
were not adequate as per design review: d7b0365621

Libadwaita 1.3 updated the stylesheet to use the design-choosen colors
by default in views. [0]

So, we should drop our overrides which are now unnecessary and even
harmful (they may be out of sync). Also, require the stable release of
the dependency, because 1.3.alpha didn't include [0].

[0] fd83834f83
2023-04-15 22:00:32 +01:00
António Fernandes 8ba2ebb450 search-engine-tracker: Don't try to parse NULL time strings
TrackerCursor returns NULL if it doesn't have information on the date.
https://gnome.pages.gitlab.gnome.org/tracker/docs/developer/method.SparqlCursor.get_string.html

We try to parse NULL as a date string. This is obviously wrong and
gets us a precondition failure warning, as it should.

So, if a string is NULL, just skip it.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2160
2023-04-15 07:28:04 +00:00
António Fernandes ed2dbd69b8 Revert "nautils-search-engine-tracker: Only parse non-null dates"
This reverts commit 5f1680f9df.

It avoids a warning from g_date_time_new_from_iso8601() by pushing
the code flow into another warning. A different solution is to follow.
2023-04-15 07:28:04 +00:00
Peter Eisenmann f0f6c37280 files-view: Handle canceled clipboard update
Correctly handle the cancellation of a clipboard update by checking
the return value of gdk_clipboard_read_value_finish() and returning
early on cancellation.

Fixes: #2868
2023-04-14 22:18:58 +00:00
Corey Berla 2e10ed11d9 list-view: Drop selection click workaround
There was an issue selecting using ctrl+select which was fixed in
GTK. Our workaround is now making it break.

Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/5669
2023-04-13 23:18:43 +00:00
Corey Berla 9dd4a7f87c files-view: Don't add non-existent files
Under certain circumstances (i.e. moving a file), we end up adding
a non-existent file. This causes selection problems because the
non-existent file is selected and then removed (causing another file
to be selected).  I'm not sure where the root cause is (between
directory-async, directory notify, etc), but lets simply not add
a file that we know shouldn't be added.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2828
2023-04-12 19:54:16 +00:00
Corey Berla a417d86b74 ci: Dockerfile install appstream dependency for libadwaita
Similar to the last commit, we are using fedora:latest which doesn't
know about a new dependency for libadwait (appstream).  Install it
manually after the dnf builddep.
2023-04-12 19:46:44 +00:00
Ondrej Holy f0f8a11c08 ci: Add gnome-autoar master in Dockerfile
The pages job currently fails as the gnome-autoar dependency has been
bumped without updating the image. However, the image is based on
fedora:latest, which is still Fedora 37. So it doesn't include the latest
gnome-autoar release anyways. Let's build the gnome-autoar master to
fix the pipeline.
2023-04-12 19:46:44 +00:00
Corey Berla 5144b43b21 list-view: Get proper backing-uri for tree expanders
When using tree expanders, we have special cases for the backing uri.
In GridView or ColumnView (without expanders), the backing uri is
always the current view directory.  With tree expanders, the backing
uri is either the parent of the currently selected item, or the
currently selected item (if it is an expanded directory).  The same
rules apply for multiple selection if there is a common parent.

This was the case in 42, and the code was dropped in
6708861ed1, and as an oversight wasn't added
back in when tree expanders were reintroduced.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2888
2023-04-12 15:30:25 +00:00
Ondrej Holy 92f088a319 desktop: Add application/zstd to supported mime-types
Currently, it isn't possible to use Nautilus for the extraction of the
".zstd" and ".tar.zst" archives. However, it seems that this compression
is supported by the libarchive library nowadays. Let's add the
`application/zstd` and `application/x-zstd-compressed-tar` mime-types
to the list of supported. This will allow Nautilus to show the "Extract"
and "Extract to..."  actions. Also, bump the gnome-autoar dependency to
the version with a corresponding change.

Related: https://gitlab.gnome.org/GNOME/gnome-autoar/-/merge_requests/38
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2860
2023-04-11 14:11:11 +00:00
Gary Li ce367695f2 batch-rename-dialog: fix tag intersection for zero-length deletions
Dead keys insert a provisional visual indication, which looks like a
text insertion, but is actually signaled as `::delete-text`. Unlike
regular emissions of `::delete-text`, here the start and end positions
are exactly the same (so you know nothing is actually deleted).

Nautilus deletes the neighbouring tag
When a dead key is entered into the batch rename entry, it deletes 
the neighbouring tag. This occurs for just before, inside and just
after the tag.

This happens because our logic for knowing when to delete special
text tags is assuming end_position > start_position, which is not
the case with dead keys.

Add conditions to ensure intersecting selections cannot be zero-length.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2821
2023-04-09 11:21:05 +00:00
Марко Костић 4f04d447fd Update Serbian translation 2023-04-09 09:37:27 +00:00
António Fernandes 032d7d001a grid-cell, name-cell: Allow displaying unthemed emblems
nautilus-dropbox and probably other such extensions use emblems to
indicate sync status.

If these icons are installed as unthemed icons, then we don't
display them at all. This is because the way we are checking that
an icon exists ignores the unthemed icons completely, which is
arguably a GTK bug (https://gitlab.gnome.org/GNOME/gtk/-/issues/5709)

While the GTK inconsistency is not addressed, let's use a workaround
to check more effectively whether an icon exits.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2789
2023-04-08 11:50:29 +01:00
Khalid Abu Shawarib f7ccb4e731 files-view: Disable properties shortcut for unwanted directories
Open properties on the search directory crashes Nautilus.
Exclude search, recent, and starred from opening
current directory properties when no file is selected.

Fixes #2903
2023-04-07 23:31:09 +00:00
Sayan Bhattacharjee b44ebcfb6a sidebar: Prevent auto folder opening on hover when re-ordering bookmarks
In the sidebar, when dragging to re-order bookmarks,
other bookmarked folders are automatically opening while hovering
over them as it happens during a drag-and-drop operation.

This action should not be permitted because it is inconceivable to
drag-and-drop a bookmark into another bookmark.

Implement a check to prevent automatically navigating
into the bookmarked folders if they are hovered on while dragging
a bookmark with the intent to just re-order them.
It achieves this behavior by not adding a navigation hover timeout
if we are dragging a row (bookmark) in the sidebar.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2820
2023-04-07 19:16:15 +00:00
Alexander Shopov f0e2a3166c Update Bulgarian translation 2023-04-07 17:39:28 +00:00
Gary Li c10be39c03 pathbar: do not use finalized pathbar to bind menu model to popover
Nautilus fails critical assertions if the user opens then closes a
new window in rapid succession in a large folder.

This is because the GSource created by
nautilus_path_bar_set_templates_menu to bind menu model to popover is
not removed even if the pathbar has already been finalized by the user
closing the window.

Keep track of the source id and remove source if the pathbar is
being disposed of.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2867
2023-04-07 17:21:38 +00:00
Alexander Shopov 9ddf0c1989 Update Bulgarian translation 2023-04-07 16:56:22 +00:00
Alexander Shopov ae2946a8a9 Update Bulgarian translation 2023-04-07 16:13:30 +00:00
António Fernandes baab8d3ad5 grid-cell, name-cell: Have thumbnail cover allocation
Otherwise, due to some modular arithmetic artifacts, there is an
unsightly 1px transparent line between the picture and its css border.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2779
2023-04-05 12:30:45 +01:00
Ondrej Holy b0e28bc19c window-slot: Try current location even if it is marked as gone
When the current location is marked as gone, Nautilus jumps to the
first existing parent currently (except for non-native locations and
mount roots). This is fine in most cases, but not for autofs locations
as Nautilus jumps to parent everytime autofs mount timeouted. It would
be better to stay in the same folder in this case. Let's try the current
location first even if it is marked as gone to ensure that. It would be
perhaps even better to prevent autofs locations somehow from timeouting
at all, or avoid immediate remounting at least, but those solutions
don't look easy to implement.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1514
2023-04-05 11:03:55 +00:00
Alexander Shopov 0e90eef468 Update Bulgarian translation 2023-03-31 10:10:07 +00:00