There is no need to use g_list_free_1() when we can achieve the same
result using g_list_delete_link() instead of g_list_remove_link().
There is also no need to free 1 link when it can be reinserted in
another position.
Also other style rearrangements, mixing declarations with code, etc.
This partially reverts commit [1] and [2].
We didn't need these when the sidebar lived in
GTK, but now the sidebar has come back and we should prefer
our code over the gtkbookmarkmanager.
[1] 380124b5cf.
[2] e13b3e2fcd
If "Image/Audio/Video Properties" rows aren't present, a blank space
will unnecessarily be shown at the bottom of the properties window.
To fix this, hide the AdwPreferencesGroup that contains these rows.
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.