Some rows have title-lines=1, but it's unlikely that their
titles will get ellipsized, as they are fixed and predictable,
unlike their subtitles. So remove this property as it's
unnecessary in this case.
Since NautilusFileChangesQueue is called from multiple threads,
a simple NULL check can't prevent init from happening twice.
Use GOnce to make sure we only init once and gain some (tiny)
performance benefit over the NULL check.
Set the used hash table functions via parameters. This gives the caller
full control over enqueued item life times.
We still take a NautilsFile, which is a GObject, but that's about to
change.
Nautilus crashes if the user with a cut selection rapidly opens then closes a tab.
This is because update_cut_status_callback is called after the files view has already been finalized. GIO guarantees that our callback will always be called even if we cancel the clipboard cancellable in dispose.
Check cancellation status in update_cut_status_callback and proceed no further if cancelled.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/3434
When the user enter keystrokes to search, the first item sometimes gets deselected before being reselected.
This is due to the gtk_bitset_is_empty check in display_pending_files, which occurs before the delayed clear signals are emitted. On the first display_pending_files call after the keystroke, there may still be a non-empty selection. Since the check happens before clear is emitted, we errorneously believe there was a selection so we do not select first until display_pending_files is called again.
Move the no_selection bitset check to after we have emitted the delayed clear signal. Ensure there is at least 1 item in the model before we select the 0th index.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/3420
Change the style of the floating bar so it's not tucked directly in the
corner but is a small margin from the edge so it looks less out of place
in the mobile/narrow-width view.
Use "—" as a placeholder for the "Original Folder" row/attribute
(attribute_trash_orig_path_q). Doing so, the "Original Folder" row
title won't appear centralized, which looks odd. This placeholder
is already used by the "Created On" row/attribute.
AdwStatusPage isn't meant to be used with another widgets,
as it's a page. Placing the status page inside a GtkBox
causes the page contents to not be vertically centralized.
Also, the scrolling can break, because AdwStatusPage has a
built-in GtkScrolledWindow.
The disk usage indicators/circles from "volume_usage_row"
are actual characters (●). However, Orca also reads these
indicators, something that is unnecessary, which also can
be confusing.
When switching view mode from list to grid, the grid view may set its view model sorter before the list view has been disposed.
If this happens and dispose runs, we would have cleared the grid view model sorter and file ordering would break upon reload.
Keep track of the sorter created in list-view and check if the sorter belongs to us before clearing it to NULL.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/3383
AdwButtonRow is a new widget to present actions at the end of a
boxed list. Requires a bump of libadwaita dependency to v1.6.alpha.
Also, add a mnemonic to this button row.
Unlike other preferences change callbacks, it doesn't do anything other
than asking to updating the cached setting value.
Also, it has an unamed and unused `gpointer` parameter, which is unusual.
This function used to be unnecessarily long and complex, so it has been
simplified by commit e3052ab1c8
However, now it's too cryptic/obfuscated. This is partly dues to the
clash between boolean logic (`0` being FALSE) and the requirements of
g_list_find_custom() (`0` being a positive match). And partly because
of nested ternary operator, dereferencing a union, and unfortunate
naming (`callback` having double meaning).
To make the code easily readable and auditable by humans, let's break
up the comparisons and use explicit return value literals.
This partially reverts commit c5216c47da
G_DIR_SEPARATOR_S exists primarily as convenience to make GLib-based
code portable to Microsoft Windows, which is not relevant to this app.
We can still use it anyway when we want to be clear that a slash is
being used as a dir separator.
The root directory's path is "/". While that's the exact same character
as a directory separator, its meaning is completely different.
This reverts commit ba665f5371.
NautilusFilesView should be agnostic to the inner widgetry. So,
it should not be GtkListItemWidget|listitem.select action.
Also, moving this whole function is not necessary. The true cause of
the bug[0] was that NautilusFilesView was not forwarding the focus
event its child. Which turned out to be an AdwBin bug. Good news is
this bug has been fixed in libadwaita main[1] and stable[2] branches.
So let's revert this workaround.
[0] https://gitlab.gnome.org/GNOME/nautilus/-/issues/3354
[1] 0e30d48f66
[2] 9962168906
This is a follow-up to commit 1206af7d12
It fixed a bug where we were validating but not accepting the filename.
try_accept() and validate() do almost the same job except the first also emits
::name-accepted if valid, or, if duplicate, shows feedback without delay.